I have built some SpecFlow scenarios to test features of a HTTP REST interface. When I run the features separately, they work fine, but when run all together, some of the scenarios sometimes fail. The failure is that there is no reply from the REST interface webserver.
The first step of all features is to start the REST interface webserver, but I reckon this can fail if another scenario is still running, or not yet completely finished and the listening port cannot be bound.
Is there a way to make sure the different features run nicely after eachother?
I found the answer on the xUnit documentation site. I added a xunit.runner.json
file and added
"maxParallelThreads": 1
to the config. Only one SpecFlow test is run at the time now.