diff --git a/SpecLight/Infrastructure/ConsoleOutcomePrinter.cs b/SpecLight/Infrastructure/ConsoleOutcomePrinter.cs index b8212e0..b997085 100644 --- a/SpecLight/Infrastructure/ConsoleOutcomePrinter.cs +++ b/SpecLight/Infrastructure/ConsoleOutcomePrinter.cs @@ -46,6 +46,7 @@ public static void PrintOutcomes(Spec spec, Action writeLine) { s += ExceptionCaught; } + s += $"\t({o.ExecutionTime.ToString("s\\.fff")}) sec."; var cells = new[] { message.PadRight(maxMessageWidth), diff --git a/SpecLight/Infrastructure/StepOutcome.cs b/SpecLight/Infrastructure/StepOutcome.cs index 960c983..4a76b6a 100644 --- a/SpecLight/Infrastructure/StepOutcome.cs +++ b/SpecLight/Infrastructure/StepOutcome.cs @@ -12,6 +12,7 @@ public StepOutcome(Step step) public Step Step { get; private set; } public Status Status { get; set; } + public TimeSpan ExecutionTime { get; set; } public Exception Error { get; set; } public ExceptionDispatchInfo ExceptionDispatchInfo { get; set; } diff --git a/SpecLight/Output/SinglePageRazorTemplate.cshtml b/SpecLight/Output/SinglePageRazorTemplate.cshtml index 068f0cf..7b61141 100644 --- a/SpecLight/Output/SinglePageRazorTemplate.cshtml +++ b/SpecLight/Output/SinglePageRazorTemplate.cshtml @@ -118,6 +118,7 @@ } @TagBox(o.Step.Tags) @ExtraData(o.Step.DataDictionary) + (@o.ExecutionTime.ToString("s\\.fff") sec.) } diff --git a/SpecLight/Output/SinglePageRazorTemplate.generated.cs b/SpecLight/Output/SinglePageRazorTemplate.generated.cs index b97a5c0..02c686b 100644 --- a/SpecLight/Output/SinglePageRazorTemplate.generated.cs +++ b/SpecLight/Output/SinglePageRazorTemplate.generated.cs @@ -1027,11 +1027,21 @@ function updateHighlight() { #line default #line hidden -WriteLiteral("\r\n\t\t\t\t\t\t\t\t\r\n"); +WriteLiteral("\r\n ("); - #line 122 "..\..\Output\SinglePageRazorTemplate.cshtml" + #line 121 "..\..\Output\SinglePageRazorTemplate.cshtml" + Write(o.ExecutionTime.ToString("s\\.fff")); + + + #line default + #line hidden +WriteLiteral(" sec.)\r\n\t\t\t\t\t\t\t\t\r\n"); + + + + #line 123 "..\..\Output\SinglePageRazorTemplate.cshtml" } diff --git a/SpecLight/Output/Style.css b/SpecLight/Output/Style.css index f6b6f76..8da8c7a 100644 --- a/SpecLight/Output/Style.css +++ b/SpecLight/Output/Style.css @@ -38,6 +38,9 @@ li.pending { li.notrun { color: #000000; } +.executionTime { + color: #8c8c8c; +} #TableOfContents { display: block; position: fixed; diff --git a/SpecLight/Output/Style.less b/SpecLight/Output/Style.less index a37cde6..ea8944f 100644 --- a/SpecLight/Output/Style.less +++ b/SpecLight/Output/Style.less @@ -86,6 +86,10 @@ li{ } } +.executionTime { + color: rgba(140, 140, 140, 1); +} + #TableOfContents { @tcbg: darken(@bg, 6%); diff --git a/SpecLight/Output/Style.min.css b/SpecLight/Output/Style.min.css index 9ff909a..8513045 100644 --- a/SpecLight/Output/Style.min.css +++ b/SpecLight/Output/Style.min.css @@ -1 +1 @@ -body{font-size:110%;font-family:"segoe ui",helvetica,calibri,arial;background:#eeeef1}h1,h2,h3,h4,h5{font-family:calibri,"segoe ui",helvetica,arial;margin-bottom:4px}div{margin:0;padding:0}.graph{padding:2px;border:1px solid #373743;text-align:center;font-size:70%;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.7)}li.passed{list-style-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVDjLvZPZLkNhFIV75zjvYm7VGFNCqoZUJ+roKUUpjRuqp61Wq0NKDMelGGqOxBSUIBKXWtWGZxAvobr8lWjChRgSF//dv9be+9trCwAI/vIE/26gXmviW5bqnb8yUK028qZjPfoPWEj4Ku5HBspgAz941IXZeze8N1bottSo8BTZviVWrEh546EO03EXpuJOdG63otJbjBKHkEp/Ml6yNYYzpuezWL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ApRMY9mnuVMvAAAAAElFTkSuQmCC')}li.pending{list-style-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFUSURBVDjLrZM/SAJxGIZdWwuDlnCplkAEm1zkaIiGFFpyMIwGK5KGoK2lphDKkMDg3LLUSIJsSKhIi+684CokOtTiMizCGuzEU5K3vOEgKvtBDe/2Pc8H3x8NAM1fQlx4H9M3pcOWp6TXWmM8A7j0629v1nraiAVC0IrrwATKIgs5xyG5QiE+Z4iQdoeU2oAsnqCSO1NSTu+D9VhqRLD8nIB8F0Q2MgmJDyipCzjvYJkIfpN2UBLG8MpP4dxvQ3ZzGuyyBQ2H+AnOOCBd9aL6soh81A5hyYSGWyCFvxUcerqI4S+CvYVOFPMHxLAq8I3qdHVY5LbBhJzEsCrwutpRFBlUHy6wO2tEYtWAzLELPN2P03kjfj3luqDycV2F8AgefWbEnVqEHa2IznSD6BdsVDNStB0lfh0FPoQjdx8RrAqGzC0YprSgxzsUMOY2bf37N/6Ud1Vc9yYcH50CAAAAAElFTkSuQmCC')}li.notrun{color:#000}#TableOfContents{display:block;position:fixed;left:0;top:0;bottom:0;width:450px;background:#dddde3;border:1px solid #b6b6c3;padding-bottom:60px;overflow-y:scroll}#TableOfContents h4{text-align:center;margin:10px}#TableOfContents ul{list-style:disc;padding-bottom:5px;padding-top:3px;padding-left:30px}#TableOfContents ul.scenarios{font-size:83%}#TableOfContents ul li.notrun{color:#000}#TableOfContents ul li.folder{list-style:none;position:relative;border:1px solid rgba(0,0,0,.13);border-right-width:0;background-color:rgba(0,0,0,.06);margin-top:8px}#TableOfContents ul li.folder span.folderName{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;cursor:default;background:no-repeat left 3px;color:#444;font-weight:bold;display:block;margin-left:-26px;position:relative}#TableOfContents ul li.folder span.folderName span.folderGlyph{position:absolute;left:7px;top:3px;width:0;height:0;display:block;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid rgba(0,0,0,.6);-webkit-transform-origin:10% 50%;-moz-transform-origin:10% 50%;-ms-transform-origin:10% 50%;-o-transform-origin:10% 50%;transform-origin:10% 50%;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);-webkit-transition:all 100ms ease;-moz-transition:all 100ms ease;-ms-transition:all 100ms ease;-o-transition:all 100ms ease;transition:all 100ms ease}#TableOfContents ul li.folder span.folderName span.folderNameText{position:relative;left:30px}#TableOfContents ul li.folder span.folderName:hover{color:#000}#TableOfContents ul li.folder.collapsed span.folderName span.folderGlyph{-webkit-transform:rotate(0);-moz-transform:rotate(0);-ms-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0)}#TableOfContents ul li.folder.collapsed>ul{display:none !important}#TableOfContents ul li.folder .graph{display:block;position:absolute;right:3px;width:60px;top:5px;height:9px}#TableOfContents ul a,#TableOfContents ul a:visited{color:#23e;text-decoration:none;border-radius:4px;padding:0 3px}#TableOfContents ul a.current{background:rgba(255,255,255,.4);box-shadow:0 0 4px rgba(255,255,255,.6)}#TableOfContents ul a:hover{text-decoration:underline}#TableOfContents .tagCloud{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;text-align:center}#TableOfContents .tagCloud input{display:none}#TableOfContents .tagCloud label{border-radius:5px;padding:2px 4px;margin:3px;display:inline-block;font-style:italic;opacity:.6;border:1px solid #000;-webkit-transition:all 100ms ease;-moz-transition:all 100ms ease;-ms-transition:all 100ms ease;-o-transition:all 100ms ease;transition:all 100ms ease}#TableOfContents .tagCloud label:hover{border-color:#000;opacity:.7}#TableOfContents .tagCloud input:checked+label{border-color:#4e4e5f;box-shadow:inset 0 3px 14px rgba(0,0,0,.6);opacity:1}#Content{display:block;position:fixed;left:470px;top:0;bottom:0;right:0;overflow-y:scroll}.tags{color:#a06;font-style:italic}.description,.errorMessage,.multilineTextArgument{white-space:pre;padding:4px}.placeholder{border:1px dashed #999;background-color:rgba(0,0,0,.04)}.multilineTextArgument{background:#e6e6ea;border:1px solid #ccccd5;padding:5px}table{width:100%;background:#e6e6ea;border-collapse:collapse}table th{border:1px solid #797990;background:#d5d5dc;padding:6px}table td{border:1px solid #9595a7;margin:0;padding:4px}table td.number{text-align:right}.examplesTable table{margin-bottom:10px}.examplesTable table tr{-webkit-transition:background 100ms ease;-moz-transition:background 100ms ease;-ms-transition:background 100ms ease;-o-transition:background 100ms ease;transition:background 100ms ease;background:#ddd}.examplesTable table tr:hover{background:#eee}.examplesTable table tr.selected{background:#fff;font-weight:bold}.examplesTable table td.passed{background-color:rgba(86,158,78,.3)}.examplesTable table td.failed{background-color:rgba(238,66,68,.3)}.examplesTable table td.skipped{background-color:rgba(245,184,81,.3)}.examplesTable table td.pending{background-color:rgba(245,220,95,.3)}.scenario{border:1px solid #b6b6c3;margin:10px;margin-left:0;padding:10px}.scenario.passed{background-color:#e2e8e4}.scenario.failed{background-color:#eee0e3}.scenario.skipped{background-color:#efeae4}.scenario.pending{background-color:#efede5}.scenario li.failed{background-color:rgba(238,66,68,.2)}.scenario li.pending,.scenario li.skipped,.scenario li.passed.empty{color:#888}.scenario .errorMessage{background:#e6e6ea;border:1px solid #ccccd5;overflow:auto}.scenario.pending .errorMessage{display:none}.populatedExample{display:none;overflow:hidden}.extra-data{font-size:90%;font-weight:bold}.class-description{margin:15px;padding:15px;border-radius:5px;background-color:#e0e0e5}.markdown-host code{background:#d2d2da;border:1px solid #a8a8b7;border-radius:2px}.markdown-host ul>br{display:none}#environment{color:#a8a8b7} \ No newline at end of file +body{font-size:110%;font-family:"segoe ui",helvetica,calibri,arial;background:#eeeef1}h1,h2,h3,h4,h5{font-family:calibri,"segoe ui",helvetica,arial;margin-bottom:4px}div{margin:0;padding:0}.graph{padding:2px;border:1px solid #373743;text-align:center;font-size:70%;color:#fff;text-shadow:1px 1px 0 rgba(0,0,0,.7)}li.passed{list-style-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGrSURBVDjLvZPZLkNhFIV75zjvYm7VGFNCqoZUJ+roKUUpjRuqp61Wq0NKDMelGGqOxBSUIBKXWtWGZxAvobr8lWjChRgSF//dv9be+9trCwAI/vIE/26gXmviW5bqnb8yUK028qZjPfoPWEj4Ku5HBspgAz941IXZeze8N1bottSo8BTZviVWrEh546EO03EXpuJOdG63otJbjBKHkEp/Ml6yNYYzpuezWL4s5VMtT8acCMQcb5XL3eJE8VgBlR7BeMGW9Z4yT9y1CeyucuhdTGDxfftaBO7G4L+zg91UocxVmCiy51NpiP3n2treUPujL8xhOjYOzZYsQWANyRYlU4Y9Br6oHd5bDh0bCpSOixJiWx71YY09J5pM/WEbzFcDmHvwwBu2wnikg+lEj4mwBe5bC5h1OUqcwpdC60dxegRmR06TyjCF9G9z+qM2uCJmuMJmaNZaUrCSIi6X+jJIBBYtW5Cge7cd7sgoHDfDaAvKQGAlRZYc6ltJlMxX03UzlaRlBdQrzSCwksLRbOpHUSb7pcsnxCCwngvM2Rm/ugUCi84fycr4l2t8Bb6iqTxSCgNIAAAAAElFTkSuQmCC')}li.failed{list-style-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAIhSURBVDjLlZPrThNRFIWJicmJz6BWiYbIkYDEG0JbBiitDQgm0PuFXqSAtKXtpE2hNuoPTXwSnwtExd6w0pl2OtPlrphKLSXhx07OZM769qy19wwAGLhM1ddC184+d18QMzoq3lfsD3LZ7Y3XbE5DL6Atzuyilc5Ciyd7IHVfgNcDYTQ2tvDr5crn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VNjaO3K2NpAeK90ZCqtgcrjkP9aUCXp0moetDFEeRXnYCKXhm+uTW0CkBFu4JlxzZkFlbASz4CQGQVBFeEwZm8geyiMuRVntzsL3oXV+YMkvjRsydC1U+lhwZsWXgHb+oWVAEzIwvzyVlk5igsi7DymmHlHsFQR50rjl+981Jy1Fw6Gu0ObTtnU+cgs28AKgDiy+Awpj5OACBAhZ/qh2HOo6i+NeA73jUAML4/qWux8mt6NjW1w599CS9xb0mSEqQBEDAtwqALUmBaG5FV3oYPnTHMjAwetlWksyByaukxQg2wQ9FlccaK/OXA3/uAEUDp3rNIDQ1ctSk6kHh1/jRFoaL4M4snEMeD73gQx4M4PsT1IZ5AfYH68tZY7zv/ApRMY9mnuVMvAAAAAElFTkSuQmCC')}li.pending{list-style-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFUSURBVDjLrZM/SAJxGIZdWwuDlnCplkAEm1zkaIiGFFpyMIwGK5KGoK2lphDKkMDg3LLUSIJsSKhIi+684CokOtTiMizCGuzEU5K3vOEgKvtBDe/2Pc8H3x8NAM1fQlx4H9M3pcOWp6TXWmM8A7j0629v1nraiAVC0IrrwATKIgs5xyG5QiE+Z4iQdoeU2oAsnqCSO1NSTu+D9VhqRLD8nIB8F0Q2MgmJDyipCzjvYJkIfpN2UBLG8MpP4dxvQ3ZzGuyyBQ2H+AnOOCBd9aL6soh81A5hyYSGWyCFvxUcerqI4S+CvYVOFPMHxLAq8I3qdHVY5LbBhJzEsCrwutpRFBlUHy6wO2tEYtWAzLELPN2P03kjfj3luqDycV2F8AgefWbEnVqEHa2IznSD6BdsVDNStB0lfh0FPoQjdx8RrAqGzC0YprSgxzsUMOY2bf37N/6Ud1Vc9yYcH50CAAAAAElFTkSuQmCC')}li.notrun{color:#000}.executionTime{color:#8c8c8c}#TableOfContents{display:block;position:fixed;left:0;top:0;bottom:0;width:450px;background:#dddde3;border:1px solid #b6b6c3;padding-bottom:60px;overflow-y:scroll}#TableOfContents h4{text-align:center;margin:10px}#TableOfContents ul{list-style:disc;padding-bottom:5px;padding-top:3px;padding-left:30px}#TableOfContents ul.scenarios{font-size:83%}#TableOfContents ul li.notrun{color:#000}#TableOfContents ul li.folder{list-style:none;position:relative;border:1px solid rgba(0,0,0,.13);border-right-width:0;background-color:rgba(0,0,0,.06);margin-top:8px}#TableOfContents ul li.folder span.folderName{-ms-user-select:none;-webkit-user-select:none;user-select:none;cursor:default;background:no-repeat left 3px;color:#444;font-weight:bold;display:block;margin-left:-26px;position:relative}#TableOfContents ul li.folder span.folderName span.folderGlyph{position:absolute;left:7px;top:3px;width:0;height:0;display:block;border-top:8px solid transparent;border-bottom:8px solid transparent;border-left:8px solid rgba(0,0,0,.6);transform-origin:10% 50%;transform:rotate(45deg);transition:all 100ms ease}#TableOfContents ul li.folder span.folderName span.folderNameText{position:relative;left:30px}#TableOfContents ul li.folder span.folderName:hover{color:#000}#TableOfContents ul li.folder.collapsed span.folderName span.folderGlyph{transform:rotate(0)}#TableOfContents ul li.folder.collapsed>ul{display:none !important}#TableOfContents ul li.folder .graph{display:block;position:absolute;right:3px;width:60px;top:5px;height:9px}#TableOfContents ul a,#TableOfContents ul a:visited{color:#23e;text-decoration:none;border-radius:4px;padding:0 3px}#TableOfContents ul a.current{background:rgba(255,255,255,.4);box-shadow:0 0 4px rgba(255,255,255,.6)}#TableOfContents ul a:hover{text-decoration:underline}#TableOfContents .tagCloud{-ms-user-select:none;-webkit-user-select:none;user-select:none;text-align:center}#TableOfContents .tagCloud input{display:none}#TableOfContents .tagCloud label{border-radius:5px;padding:2px 4px;margin:3px;display:inline-block;font-style:italic;opacity:.6;border:1px solid #000;transition:all 100ms ease}#TableOfContents .tagCloud label:hover{border-color:#000;opacity:.7}#TableOfContents .tagCloud input:checked+label{border-color:#4e4e5f;box-shadow:inset 0 3px 14px rgba(0,0,0,.6);opacity:1}#Content{display:block;position:fixed;left:470px;top:0;bottom:0;right:0;overflow-y:scroll}.tags{color:#a06;font-style:italic}.description,.errorMessage,.multilineTextArgument{white-space:pre;padding:4px}.placeholder{border:1px dashed #999;background-color:rgba(0,0,0,.04)}.multilineTextArgument{background:#e6e6ea;border:1px solid #ccccd5;padding:5px}table{width:100%;background:#e6e6ea;border-collapse:collapse}table th{border:1px solid #797990;background:#d5d5dc;padding:6px}table td{border:1px solid #9595a7;margin:0;padding:4px}table td.number{text-align:right}.examplesTable table{margin-bottom:10px}.examplesTable table tr{transition:background 100ms ease;background:#ddd}.examplesTable table tr:hover{background:#eee}.examplesTable table tr.selected{background:#fff;font-weight:bold}.examplesTable table td.passed{background-color:rgba(86,158,78,.3)}.examplesTable table td.failed{background-color:rgba(238,66,68,.3)}.examplesTable table td.skipped{background-color:rgba(245,184,81,.3)}.examplesTable table td.pending{background-color:rgba(245,220,95,.3)}.scenario{border:1px solid #b6b6c3;margin:10px;margin-left:0;padding:10px}.scenario.passed{background-color:#e2e8e4}.scenario.failed{background-color:#eee0e3}.scenario.skipped{background-color:#efeae4}.scenario.pending{background-color:#efede5}.scenario li.failed{background-color:rgba(238,66,68,.2)}.scenario li.pending,.scenario li.skipped,.scenario li.passed.empty{color:#888}.scenario .errorMessage{background:#e6e6ea;border:1px solid #ccccd5;overflow:auto}.scenario.pending .errorMessage{display:none}.populatedExample{display:none;overflow:hidden}.extra-data{font-size:90%;font-weight:bold}.class-description{margin:15px;padding:15px;border-radius:5px;background-color:#e0e0e5}.markdown-host code{background:#d2d2da;border:1px solid #a8a8b7;border-radius:2px}.markdown-host ul>br{display:none}#environment{color:#a8a8b7} \ No newline at end of file diff --git a/SpecLight/Spec.cs b/SpecLight/Spec.cs index f744fc2..510f98a 100644 --- a/SpecLight/Spec.cs +++ b/SpecLight/Spec.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Dynamic; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; -using System.Runtime.ExceptionServices; using System.Text.RegularExpressions; -using System.Threading; using System.Threading.Tasks; using SpecLight.Infrastructure; @@ -196,9 +195,11 @@ async Task RunOutcomesAsync() var skip = false; foreach (var step in Steps) { + var sw = Stopwatch.StartNew(); step.WillBeSkipped = skip; Fixtures.ForEach(x => x.StepSetup(step)); var o = await step.ExecuteAsync(); + o.ExecutionTime = sw.Elapsed; Outcomes.Add(o); skip = skip || o.CausesSkip; Fixtures.ForEach(x => x.StepTeardown(step)); @@ -212,9 +213,11 @@ void RunOutcomes() var skip = false; foreach (var step in Steps) { + var sw = Stopwatch.StartNew(); step.WillBeSkipped = skip; Fixtures.ForEach(x => x.StepSetup(step)); var o = step.Execute(); + o.ExecutionTime = sw.Elapsed; Outcomes.Add(o); skip = skip || o.CausesSkip; Fixtures.ForEach(x => x.StepTeardown(step));