question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No suitable tests found

See original GitHub issue

To 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:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
CharliePoolecommented, Mar 13, 2019

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.

1reaction
CharliePoolecommented, Mar 13, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Generating TestResult with nunit-console failing
dll No suitable tests found in 'C:\Projects\DataService ... Either assembly contains no tests or proper test driver has not been found.
Read more >
NUnit 3 not working properly - VSoft Technologies Forums
"No suitable tests found in C:\ContinuaCI\Ws\12668\Source\bin\MailStore.Client.Tests.dll. Either assembly contains no tests or proper test ...
Read more >
NUnit tests is not found or do not run in Visual Studio's ...
The Visual Studio Test Explorer says that it can't find any tests, even though I can see that it found 306 tests? And...
Read more >
Test Runner - Test Runner fails to run tests in the Universal ...
TestPlatformException: No suitable test runtime provider found for this run. at Microsoft.VisualStudio.TestPlatform.Client.TestPlatform.
Read more >
NUnit-Console Command Line Options
No domain is created - the tests are run in the primary domain. This normally requires copying the NUnit assemblies into the same...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found