Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No assemblies were matched - no tests will be run! #27

Closed
lvthillo opened this issue Aug 1, 2017 · 6 comments
Closed

No assemblies were matched - no tests will be run! #27

lvthillo opened this issue Aug 1, 2017 · 6 comments

Comments

@lvthillo
Copy link

lvthillo commented Aug 1, 2017

We are using TeamCity 2017.1.3 (build 46961).
We use xUnit plugin 1.1.2

xUnit    Runs tests written in xUnit | 1.1.2 | Capeit | <TeamCity Data Directory>\plugins\.unpacked\xUnit

Our build configuration:

  • MSBuild to build app
  • MSBuild to build tests: This creates some \bin\Debug in our work folder and it contains our xxx.Tests.dll
  • Use xUnit to execute the tests. Runner Type xUnit, XUnit version: 2.1.0. Path to our .dll. I even tried to define the path hardcoded. I put some CMD job before to check if it was able to find the file and path and everything was fine. But the output of our xunit job is:
[09:54:46][Step 5/6] Runner parameters { Version = 2.1.0, runtime = .NET 4.5, platform = AnyCPU/MSIL}
[09:54:46][Step 5/6] Starting test runner at E:\TeamCity\buildAgent\tools\xunit-runner\bin\2.1.0\xunit.console.exe
[09:54:46][Step 5/6] No assemblies were matched - no tests will be run!
@carlpett
Copy link
Owner

carlpett commented Aug 1, 2017

Hi,
Sorry to hear that! Could you share your folder structure and the value of the "Assemblies containing tests" parameter?

@lvthillo
Copy link
Author

lvthillo commented Aug 1, 2017

@carlpett Thank you for the quick reply.
This is the input of our 'Assemblies containing tests:' parameter
%system.teamcity.build.checkoutDir%\src\app.Test\bin\Debug\name.Web.Test.dll

The environment variable exists. We're using it in other buildsteps too and we're able to 'cd' to that specific folder.

I don't really know what you mean with the folder structure. But I can tell you the following:
Path/to/workspace/:

src/
tools/
lib/
...

Inside src/ we have a test/ folder. After the execution of the job which builds our unittests, there is a bin/Debug folder in it which contains our test.dll.

@carlpett
Copy link
Owner

carlpett commented Aug 1, 2017

Hm, it looks like I might not be expanding variables in that parameter, which would explain it. However, the search is done relative to the current working directory, which is probably identical to %system.teamcity.build.checkoutDir%, could just try to just remove that and specify src\app.Test\bin\Debug\name.Web.Test.dll instead?

@lvthillo
Copy link
Author

lvthillo commented Aug 1, 2017

@carlpett Okay, that was the issue. My apologizes! Thank you very much.

@lvthillo lvthillo closed this as completed Aug 1, 2017
@carlpett
Copy link
Owner

carlpett commented Aug 1, 2017

No, it should work, but apparently it does not. Great that the workaround works for you, though!
I'll fix the parameter expansion as soon as possible.

@osya
Copy link

osya commented Mar 25, 2020

I have the same issue:

Step 5/6: Run xUnit tests via `xUnit` runner (xUnit)
[14:55:37][Step 5/6] Runner parameters { Version = 2.4.x, runtime = .NET 4.5, platform = AnyCPU/MSIL}
[14:55:37][Step 5/6] Number of parallel processes is set to: 1
[14:55:37][Step 5/6] Starting test runner at C:\TeamCity\buildAgent\tools\xunit-runner\bin\2.4.x\xunit.console.exe
[14:55:37][Step 5/6] No assemblies were matched - no tests will be run!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants