public void Should_format_feature_without_description_nor_label_nor_details() { var result = ResultFormatterTestData.GetFeatureResultWithoutDescriptionNorLabelNorDetails(); var text = _subject.Format(result); Debug.WriteLine(text); const string expectedText = @"Summary: Test execution start time: 2014-09-23 19:21:58 UTC Test execution time : 25ms Number of features : 1 Number of scenarios : 1 Passed scenarios : 0 Bypassed scenarios : 0 Failed scenarios : 0 Ignored scenarios : 1 Number of steps : 2 Passed steps : 1 Bypassed steps : 0 Failed steps : 0 Ignored steps : 1 Not Run steps : 0 Feature: My feature Scenario: name - Ignored (25ms) Step 1: step1 - Passed (20ms) Step 2: step2 - Ignored (5ms) "; Assert.That(text, Is.EqualTo(expectedText)); }
public void Should_format_xml_without_description_nor_label_nor_details() { var result = ResultFormatterTestData.GetFeatureResultWithoutDescriptionNorLabelNorDetails(); var text = _subject.Format(result); Debug.WriteLine(text); const string expectedText = @"<?xml version=""1.0"" encoding=""utf-8""?> <TestResults> <Summary TestExecutionStart=""2014-09-23T19:21:58.055Z"" TestExecutionTime=""PT0.025S""> <Features Count=""1"" /> <Scenarios Count=""1"" Passed=""0"" Bypassed=""0"" Failed=""0"" Ignored=""1"" /> <Steps Count=""2"" Passed=""1"" Bypassed=""0"" Failed=""0"" Ignored=""1"" NotRun=""0"" /> </Summary> <Feature Name=""My feature""> <Scenario Status=""Ignored"" Name=""name"" ExecutionStart=""2014-09-23T19:21:58.055Z"" ExecutionTime=""PT0.025S""> <Step Status=""Passed"" Number=""1"" Name=""step1"" ExecutionStart=""2014-09-23T19:21:59.055Z"" ExecutionTime=""PT0.02S""> <StepName Format=""step1"" /> </Step> <Step Status=""Ignored"" Number=""2"" Name=""step2"" ExecutionStart=""2014-09-23T19:22:00.055Z"" ExecutionTime=""PT0.005S""> <StepName Format=""step2"" /> </Step> </Scenario> </Feature> </TestResults>"; Assert.That(text, Is.EqualTo(expectedText)); ValidateWithSchema(text); }
public void Should_format_feature_without_description_nor_label_nor_details() { var result = ResultFormatterTestData.GetFeatureResultWithoutDescriptionNorLabelNorDetails(); var text = FormatAndExtractText(result); const string expectedText = @"Execution summary Test execution start time: 2014-09-23 19:21:58 UTC Test execution time: 25ms Number of features: 1 Number of scenarios: 1 Passed scenarios: 0 Bypassed scenarios: 0 Failed scenarios: 0 Ignored scenarios: 1 (see details) Number of steps: 2 Passed steps: 1 Bypassed steps: 0 Failed steps: 0 Ignored steps: 1 Not Run steps: 0 Feature summary Feature Scenarios Passed Bypassed Failed Ignored Steps Passed Bypassed Failed Ignored Not Run Duration Average My feature 1 0 0 0 1 2 1 0 0 1 0 25ms 250000 25ms 250000 Feature details[∞link] Toggle: Features Scenarios Filter: Passed Bypassed Failed Ignored Not Run [∞filtered link] My feature[∞link] Ignored name (25ms)[∞link] Passed 1. step1 (20ms) Ignored 2. step2 (5ms) Generated with LightBDD initialize();"; Assert.That(text, Is.EqualTo(expectedText)); }