You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing Playwright Parallel with XUnit and SpecFlow in C# on LambdaTest
Setup
Clone the repo and run cd SpecFlowPlaywrightXunit
Set env variable LT_USERNAME={your_lt_username} and LT_ACCESS_KEY={your_lt_key}
Run dotnet build
Running your tests
Run dotnet test
Testing frameworks and libraries
SpecFlow is used as a BDD framework and XUnit is used for test runner.
Dotnet 6.0 is configured but different versions of .Net can be used
Notes
There are 2 different feature files and each feature files includes 2 test cases, for chrome and microsoft edge.
When the tests are run with command dotnet test XUnit runner default behaviour is to run the different features parallel but it runs the scenarios in the same feature sequentially.
If you would like to disable parallel execution, you can set [assembly: CollectionBehavior(DisableTestParallelization = true)] or it can also be configurable in the xunit.runner.json file.
Parallel execution maximum count can be configurable from xunit.runner.json with variable maxParallelThreads.