Context Injection for parallel execution
Context Injection for parallel execution I've managed to build some fairly simple tests that do not utilise a Page Object Model structure. The Specflow steps will just call the driver methods (such as finding an element on the page and asserting the text is correct). The tests use NUnit as the runner and I have managed to add parallel execution by adding [Parallelizable(ParallelScope.Fixtures)] to the assembly class for the solution. This works well, but the reports that come out of NUnit are a bit messy and I'd like more useful information on them (such as screenshots). I have since added Extent reports to the solution, whilst this works fine for when the tests run sequentially, an error message appears when running them in parallel. The FeatureContext.Current static accessor cannot be used in multi- threaded execution. Try injecting the feature context to the binding class. The Context.Current steps are used in the creation of the Extent reports. I've been reading the doc...