TestStack White - run tests from the command line

I am looking for a solution to run my tests from the command line.

  • I created the UnitTest Procjet module in VisualStudio2017 for my .NET solution.
  • Added TestStack.White NuGet package for the project.
  • The test runs fluently when I start with VisualStudio2017.
  • I would like to start with Jenkins. I think this is easiest to do from the command line, so I am adding it to the pipeline configuration (Jenkinsfile)

    stage('Run UI Tests') {
        steps {
            bat('"C:\\PATH_TO_MSTEST\\mstest" /testcontainer:PATH_TO_MY_TEST_PROJECT\\bin\\Debug\\MyTests.dll')
        }
    }
    

When I try to run it from cmd, as with regular unit tests, it does not work.
It says:

Starting execution...  
No tests to execute.

I am creating a project before starting the "Run User Interface Test".

Any ideas how to make it work? Can really find it in stackoverflow, TestStack's github issues and other places of fame on the Internet.

+6
1

. , mstest 14 mstest 15, - ( TestStack White, )

, vstest.console.exe mstest.

C:\Program Files (x86)\Microsoft Visual Studio\2017\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

,

stage('Run UI Tests') {
    steps {
        bat('"C:\\PATH_TO_MSTEST\\mstest" /testcontainer:PATH_TO_MY_TEST_PROJECT\\bin\\Debug\\MyTests.dll')
    }
}

Jenkins :

stage('Run UiTests') {
            steps {
                bat('"C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\TestAgent\\Common7\\IDE\\Extensions\\TestPlatform\\vstest.console.exe" PATH_TO_MY_TEST_PROJECT\\bin\\Debug\\MyTests.dll')
            }
        }
+2

All Articles