Skip to content

Settings

Tom Longhurst edited this page Aug 12, 2020 · 3 revisions

Debugging Tests

There is a property which can be accessed statically:

BDTestSettings.Debug.ShouldSkipWhenStep = true;

This, by default, is set to false. This is your standard test execution.

However, when set to true your .When(() => ...) steps will NOT be executed. The purpose of this is to find which tests aren't behaving as expected.

When this is set to true, you should expect your tests to fail. If any tests still pass, this suggests that these tests either aren't set up properly, or aren't properly testing what you think they're testing.

It should go without saying, but this should be used for debug and test checking purposes only. Don't commit this change to your source control.

Other Settings

PersistentResultsCompareStartTime > The earliest date to start comparing against

BDTestSettings.PersistentResultsCompareStartTime = DateTime.Now.Subtract(TimeSpan.FromDays(30));

JsonDataFilename > Custom filename for the JSON data file

BDTestSettings.JsonDataFilename = "API-TestData-Json.json";

TestTimesReportHtmlFilename > Custom filename for the 'Test Times' Report

BDTestSettings.TestTimesReportHtmlFilename = "API-Test-Times.html";

FlakinessReportHtmlFilename > Custom filename for the 'Flakiness' Report.

BDTestSettings.FlakinessReportHtmlFilename = "API-Test-Flakiness.html";

AllScenariosReportHtmlFilename > Custom filename for the 'All Scenarios' Report

BDTestSettings.AllScenariosReportHtmlFilename = "API-Tests-All-Scenarios.html";

ScenariosByStoryReportHtmlFilename > Custom filename for the 'Scenarios grouped by Story' Report

BDTestSettings.ScenariosByStoryReportHtmlFilename = "API-Tests-Scenarios-by-Stories.html";

ReportFolderName > Put test reports in a folder named this

BDTestSettings.ReportFolderName = "TestReports";
Clone this wiki locally