Giter Club home page Giter Club logo

Comments (5)

Dev123213 avatar Dev123213 commented on July 24, 2024

Further, I tried executing the exe manually and I get the following:

C:\>C:\BuildAgent\tools\xunit-runner\bin\2.2.0\xunit.console.exe C:/BuildAgent/work/68ab5b6fa6e51f21/Tests/XUnitCore.dll -teamcity
xUnit.net Console Runner (64-bit .NET 4.0.30319.42000)
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Adding this to my project didn't seem to fix anything (there isn't even a v4.2.0.0 so I did 4.3.0)

from xunit-teamcity.

Dev123213 avatar Dev123213 commented on July 24, 2024

I have finally found that TeamCity.VSTest.TestAdapter will give me a more detailed error:

Step 6/6: xUnit
[16:27:14][Step 6/6] Runner parameters { Version = 2.2.0, runtime = .NET 4.5, platform = AnyCPU/MSIL}
[16:27:14][Step 6/6] Failed to run tests
[16:27:14]
[Step 6/6] java.lang.NumberFormatException: For input string: ""
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:592)
	at java.lang.Integer.parseInt(Integer.java:615)
	at se.capeit.dev.xunittestrunner.XUnitBuildProcess.call(XUnitBuildProcess.java:58)
	at se.capeit.dev.xunittestrunner.XUnitBuildProcess.call(XUnitBuildProcess.java:19)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[16:27:14][Step 6/6] Step xUnit failed

(note, 2 steps are disabled which is why you may noticed step 6/6) but I only mentioned 4 steps.

from xunit-teamcity.

carlpett avatar carlpett commented on July 24, 2024

Hi @Dev123213,
Sorry that it is not working for you. I think there are multiple problems here, so let's go through them.

In the first post, you get the error "No assemblies were matched - no tests will be run!". This is because you are specifying an absolute path, which as discovered in #27 is not supported yet. Until I've had time to fix that, I would recommend changing to a relative path, ie Tests/*.dll instead.

The third post makes me wonder what version of the plugin you are using? The error you are seeing in your last comment looks like one that occurred in a fork of the plugin. While that is still published on the Teamcity plugins page, it is by now quite old and has a few bugs.

But even fixing those two issues, I think your second post shows the error that will happen when the two other are resolved. The current (2.2) release of xUnit does not support .net core, as seen in the compatibility matrix. I'm not sure when 2.3 will hit a full release, but there will likely be a few other changes required to support the new runner.

from xunit-teamcity.

Dev123213 avatar Dev123213 commented on July 24, 2024

Hi Carl, thanks for getting back to me promptly. I have fixed the path, and am using the most recent plugin version advertised here (1.2) https://github.com/carlpett/xUnit-TeamCity/releases/tag/v1.2.0.

To clarify your last paragraph, xunit does support .net core (https://xunit.github.io/docs/getting-started-dotnet-core.html), but the plugin for team city does not? If so, I will have to abandon xunit for now as we want net core.

from xunit-teamcity.

carlpett avatar carlpett commented on July 24, 2024

Ok, that is good to know. I'll see if I can recreate it. The line numbers in the stack trace don't seem to match the code, though, which is confusing....

xUnit supports .net core in their beta releases, yes, but there is no supported version with a finalized way of running it yet (it has changed between different beta versions, as I understand it). So I'm a bit wary of integrating it before that has settled down.

One thing you could do as a workaround until this is supported would be to add a "Command line" build step and run dotnet xunit -teamcity there, which should turn on teamcity reporting mode so that it is properly picked up.

from xunit-teamcity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.