Sometimes dotCover runs ignored tests

Hello,

I'm using FAKE library for build script. And I'm running tests using dotCover.

Recently I've encountered the problem, when dotCover still runs the test, which has [Test, Ignore("Reason for ignoring")] attribute. In order to skip this test, I have to comment the whole code.

At first I thought, that for some reason tests dll assembly is not updated, but looks like swabra plugin deletes "bin" directory before each build, so every time new tests dll is generated.

Any ideas what could be the problem?

EDIT: Just another tests-related question: is it possible to report each test to teamcity separately on-the-fly? I've used TC service message to start watching for report file, but it seems, that TestResults.xml file is generated only after all tests executed. Maybe there's any parameter, which would enable such on-the-fly reporting functionality?

4 comments

Hello Andrew,

Could you please tell me what command line you use to start dotCover?

0

Hello Ekaterina,

I'm using FAKE library's function DotCoverNUnit.

0

Hello Andrew,

Actually dotCover doesn't run tests itself. It just starts NUnit console and "traces" its execution. Thus it's NUnit console that is responsible for running tests. Could you please make sure that you don't experience the same problem if you run tests with NUnit console without coverage analysis?

Regarding your second question, TeamCity provides several options to set up NUnit tests reporting. You can find more details on it here: https://confluence.jetbrains.com/display/TCD9/NUnit+Support.
I guess that you can, for example, use TeamCity NUnit Test Launcher instead of standard NUnit console to run tests. In this case you will have to use DotCover function instead of DotCoverNUnit and specify the path to TeamCity NUnit Test Launcher in dotCover's TargetExecutable parameter.

Please do not hesitate to contact us if you have any questions.
Best regards.

0

Hello Ekaterina,

It was a strange problem and I wasn't able to reproduce it so far.

Anyway, I've ditched NUnit console and now using TeamCity NUnit Test Launcher instead, just like you suggested.

Thank you for help!

0

Please sign in to leave a comment.