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

TeamCity v10 not picking up tests #39

Closed
danielwertheim opened this issue Jun 2, 2017 · 6 comments
Closed

TeamCity v10 not picking up tests #39

danielwertheim opened this issue Jun 2, 2017 · 6 comments

Comments

@danielwertheim
Copy link

When moving to another TeamCity server v10 instead of v9.1.1, no NUnit tests/testresults are picked up anymore. I'm not generating any XML results, but relying on the service messages in the "runner" and TeamCity.

The tests are executed and all and I can see the summary output in the build log, but the tests aren't reported anywhere else. If I compare the output for the tests with the old build server, the new build log contains rows that aren't present at the old server:

[11:43:49][Step 1/1] ##*******[testSuiteStarted name='Foo.UnitTests.dll' flowId='0-1046']
[11:43:49][Step 1/1] ##*******[flowStarted flowId='0-1001' parent='0-1046']
[11:43:49][Step 1/1] ##*******[testStarted name='Foo.UnitTests.Bar_test' captureStandardOutput='false' flowId='0-1001']
[11:43:50][Step 1/1] ##*******[testFinished name='Foo.UnitTests.Bar_test' duration='1216' flowId='0-1001']
[11:43:50][Step 1/1] ##*******[flowFinished flowId='0-1001']

I'm using CakeBuild, but it feels like the issue is with the integration between NUnit and TeamCity as I can see the tests being executed and all. Potentially in the Cake addin that uses the NUnit console runner.

Versions
TeamCity: v10.0.3
Cake: 0.19.5
NUnit.ConsoleRunner: 3.6.1
NUnit.Extension.TeamCityEventListener: 1.0.2

Parts of build.cake:

#tool "nuget:?package=NUnit.ConsoleRunner"
#tool "nuget:?package=NUnit.Extension.TeamCityEventListener"
NUnit3(path, new NUnit3Settings {
    NoResults = true,
    NoHeader = true,
    TeamCity = true
});
@danielwertheim
Copy link
Author

Also tried excluding the extension as that shouldn't be needed in that console version.

@CharliePoole
Copy link
Contributor

There is no version of nunit3-console that handles teamcity messages without the extension. The difference is in the packaging. NUnit.Console brings in a number of extensions. NUnit.ConsoleRunner does not. Specifying exactly the extensions you need is the future-proof way to go, since packaging can change.

@danielwertheim
Copy link
Author

Then maybe the description should be clarified: https://www.nuget.org/packages/NUnit.Console/3.6.1 states:

The following extensions are included with this package:
...
...
TeamCityEventListener - supports special progress messages used by teamcity.

Even so, it fails with the extension in place.

@CharliePoole
Copy link
Contributor

As I said, NUnit.Console package does include the extensions - there's nothing to correct in the description. But I thought you indicated you were using NUnit.ConsoleRunner package.

In any case, I was only addressing your comment about different versions of the console doing different things. I don't work on the teamcity extension, which is your main issue, I'll let somebody else handle that.

BTW, if you are unsure whether the installation is loading the extension, simply run the console using the --list-extensions option.

@danielwertheim
Copy link
Author

danielwertheim commented Jun 5, 2017

@CharliePoole I have verified that the extension is enabled using the switch you mentioned.

Could be issue with CakeBuild NUnit integration. The spec does not have all these ******* in it:

[11:43:49][Step 1/1] ##*******[testSuiteStarted name='Foo.UnitTests.dll' flowId='0-1046']

vs

##teamcity[testSuiteStarted name='suiteName']

from: https://confluence.jetbrains.com/display/TCD10/Build+Script+Interaction+with+TeamCity#BuildScriptInteractionwithTeamCity-ReportingTests

@danielwertheim
Copy link
Author

Verified to work in TC 10.0.5, closing.

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

2 participants