public static string GetApprovalTestName() { var frames = new StackTrace().GetFrames(); foreach (var frame in frames) { if (IsTestAttribute(frame) && frame.HasAttribute(ApproveFirstFrameScreenshotAttribute)) return frames.GetClassName() + "." + frames.GetTestMethodName(); if (!String.IsNullOrEmpty(unitTestMethodName) && IsInTestSetUp(frame) && HasRunningTestAttribute(ApproveFirstFrameScreenshotAttribute)) return unitTestClassName + "." + unitTestMethodName; } return ""; }