Search code examples
.net-coreazure-pipelinesmstestspecflow

How to run mstest tests in linux machines using .NetCore?


I want to try .netcore and utilize my Linux machines for test execution purposes. Can I run specflow mstest in Linux machines from Azure DevOps pipeline using .netcore?

What steps I should follow?


Solution

  • There's a video guide introduced that Integrating SpecFlow with Azure DevOps using .NetCore.

    It has the step by step guide on integrating a Visual Studio SpecFlow/Selenium WebDriver project with Azure DevOps. And utilizing Azure DevOps Repositories and Pipelines to execute the SpecFlow Tests.

    In your scenario, you need to setup a private agent on your Linux machines and install the required components/SDKs etc to run the test. In the guide it using the VSTest, you can also try MStest.

    If you cannot run it directly on the Linux machine, then you can try running in Linux container. Reference : https://github.com/techtalk/SpecFlow/issues/1662

    In addition to specflow tests on a linux machine you need Mono installed in order to generate reports with SpecFlow+. Make sure you have installed Mono on the machine you are using to execute your tests (i.e. on your development machine or build server). Refer to Additional Requirements for Non-Windows Users for details.