No suitable tests found
See original GitHub issueTo anyone who can help,
I have been trying to run Unit tests which have been created using Specflow and locally it works, I run the following command and I get the results I want:
nunit3-console.exe GasTag.Tests.dll --where "cat == unit"
I am trying to automate this process in a CI/CD pipeline in a CMD Azure DevOps task and I just can’t for the life of me understand whats going wrong.
I build the correct sln and it outputs everything to the following directory:
D:\a\1\s\Tests\GasTag.Tests\bin\Debug
The file ‘GasTag.Tests.dll’ is listed when I list the directory contents but I get the following error when trying the same cmd:
1) Invalid : D:\a\1\s\Tests\GasTag.Tests\bin\Debug\GasTag.Tests.dll
No suitable tests found in 'D:\a\1\s\Tests\GasTag.Tests\bin\Debug\GasTag.Tests.dll'.
Either assembly contains no tests or proper test driver has not been found.
I am using the following versions:
VSIX
- NUnit 2 Test adapter (2.1.1)
- Specflow 2017.2.7
Nuget
- NUnit 2.6.4
- Specflow 1.9.0
- NUnit.ConsoleRunner 3.9.0
I understand one of the first responses will be to update specflow/nunit versions but unfortunately these versions need to be at this level in order to run UI tests through Microsoft AppCenter.
Any help would be greatly appreciated!
Regards, Michael
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Vsix is a format for installing extensions to Visual Studio. Here we are talking about an extension to the NUnit engine. You install it using the ame method you used to install NUnit ConsoleRunner. To just add the NUnit V2 framework driver, use package NUnit.Extension.NUnitV2Driver.
Alternatively, to install a number of common extensions replace NUnit.ConsoleRunner (just the runner) with NUnit.Console. It looks like you probably did that locally.
In order for your NUnit V2 tests to run under the NUnit 3 console, you clearly have the NUnt V2 Framework Driver extension installed. Is it installed in your Azure environment? The command
nunit3-console --list-extensions
will tell you.