3
votes

I am using the TeamCity VisualStudio sln configuration to drive my CI build. It runs all my NUnit tests - which is all well and great but I don't want TeamCity running any of my tests with the [Category("DatabaseTests")] attribute (since they hit an actual database).

In the NUnit configuration under categories to exclude I put simply DatabaseTests but its not working. Is there something I'm missing? Is there a way that I can see what teamcity is sending to the nunit runner?

1
I'm having this problem too with TeamCity 8, what did you do to resolve this issue?James
@James I've since started putting all my trully unit tests in one assembly and a separate project for IntegrationTests. That way there's no accidents with someone meaning to run just unit tests and then it taking too long or arbitrarily failingGeorge Mauer
I have the same problem. I'm pretty sure this has worked for me in the past on another project, but now I cannot get TeamCity to ignore the category for anything. I've checked and double checked the test and the TC config. Doesn't make sense.Matt Miller

1 Answers

3
votes

You can turn on DEBUG mode:

to enable 'DEBUG' log level for TeamCity classes. To do it, edit the logs/teamcity- (server|agent)-log4j.xml file by removing all the lines containing comment. After that, DEBUG messages will go to teamcity-*.log files.

Make sure the logs are rotated by default. When debug is enabled it makes sense to increase maxBackupIndex value in the relevant appender tag to 10 or even 20 files (ensure there is sufficient free disk space available).

...which I got from their docs. And then you can see what is happening.