BlueDotBrigade / weevil

Filter, analyze and gain valuable insight into log files. It's all about "boring log files for tasty bytes".
http://Weevil.BlueDotBrigade.com
Apache License 2.0
14 stars 0 forks source link

Create automated functional tests (using SpecFlow) to verify Weevil's software requirements. #191

Open Pressacco opened 2 years ago

Pressacco commented 2 years ago

HowTo: Write Gherkin Scenarios

Scenario Titles

There isn't a single "one-size-fits-all" approach to naming Gherkin scenarios, but there are best practices that can make scenarios more understandable and maintainable. These practices aim to make the scenario name descriptive enough to understand its purpose at a glance while being concise enough to be easily digestible. Here are some guidelines:

Examples following these guidelines might look like:

Relates To

Articles

Pressacco commented 1 year ago

Related to:

Pressacco commented 1 year ago

Troubleshooting: MS Tests Won't Run

Symptoms:

Implementation Notes:

Pressacco commented 2 months ago

Challenges

STA Thread

The following Gherkin scenario is failing with a run-time error:

[TestMethod]
public async Task OpenAsync()
{
   // InvalidOperationException: The calling thread must be STA, because many UI components require this.
   var window = Substitute.For<Window>(); 
}

With Just My Code disabled, you can see that the error is ultimately due to a .NET guard failing:

Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.Utilities.VSInstallationUtilities.cs:

public static string? VSInstallPath
{   
   // ...
   // Use the Setup API to find the installation folder for currently running VS instance.
   if (new SetupConfiguration() is ISetupConfiguration setupConfiguration)
   {
      var currentConfiguration = setupConfiguration.GetInstanceForCurrentProcess();
      // ...
   } 
}

Next Steps

Related Articles

Pressacco commented 1 month ago

Problem: Unexpected SpecFlow Errors

Symptoms

Visual Studio is displaying weird compiler errors & warnings

In Visual Studio:

Root Cause

Solution