No Tests Found From TeamCity

Apr 22, 2010 at 6:21 PM
I have StatLight being invoked from MsBuild which works great when run on my desktop. However when run on our TeamCity server StatLight appears to do nothing for exactly five minutes and then prints "Test run results: Total 0, Successful 0, Failed 0, ". Is anyone aware of any TeamCity settings that need to be set for StatLight to function correctly? Any other pointers?
Coordinator
Apr 22, 2010 at 6:41 PM

if you run StatLight.exe -? to see the help you should see the run under teamcity option there...

StatLIght.exe -x"TestXap.xap" --teamcity

Hope this helps.


Apr 22, 2010 at 7:30 PM
Thank you for the quick response. I'm using the teamcity option and I can see the difference in the output when run locally, unfortunately it just doesn't seem to find any tests when run on the build server. I was wondering if there are any options that need to be set in TeamCity to allow StatLight to do it's thing. I imagine this problem is caused by a difference in how StatLight is executed on the build server.
Coordinator
Apr 22, 2010 at 9:19 PM

Are you seeing the new teamcity output in the Full Log in teamcity?

What version of TeamCity are you using?

As I haven't done this myself (teamcity + msbuild), I'm curious what the problem is.

The following blog has an example of how he's using teamcity with msbuild - is your setup similar? - http://www.keith-woods.com/Blog/post/Silverlight-Unit-Test-and-Continuous-Integration-StatLight.aspx

As a last resort (if we can't figure out your specific issue), one option is to, in one your main build configuration tell teamcity to find the test xap as an Artifact. Then create a new build configuration and just use the command line build runner and run statlight that way. (this is how we use it at my work).

 

Apr 22, 2010 at 9:52 PM
Edited Apr 22, 2010 at 9:54 PM
All I'm seeing is that no tests were found, I've included the output below for what it's worth (I modified the paths to exclude product names). The same msbuild script invoked locally picks them up fine so I'm guessing it must be something to do with how they're run. We're running TeamCity Enterprise Version 4.5.3 (build 9035).

Thanks for pointing to Keith's post. I'm using an identical Target in my MsBuild script. Funnily enough he works for the same company as me so I'll reach out to him and see if his setup had any differences.

On a separate note, I can see from other discussions that you're working on a fairly large change to StatLight to support the April 2010 unit testing projects. I'd be happy to contribute if you need any help.

{{ [12:12:35]: [Project "msbuild.xml.teamcity.patch.tcprojx" (default targets):] Tools\StatLight\StatLight.exe -x=D:\TeamCity\MyProject\MyProject.SilverlightUnitTests.xap --teamcity
[12:12:35]: [Project "msbuild.xml.teamcity.patch.tcprojx" (default targets):] StatLight - Version 0.9.3631
[12:12:35]: [Project "msbuild.xml.teamcity.patch.tcprojx" (default targets):] Copyright (C) 2009 Jason Jarrett
[12:12:35]: [Project "msbuild.xml.teamcity.patch.tcprojx" (default targets):] All Rights Reserved.
[12:12:36]: [Project "msbuild.xml.teamcity.patch.tcprojx" (default targets):] D:\TeamCity\MyProject\MyProject.SilverlightUnitTests.SilverlightUnitTests.xap (5m)
[12:17:36]: [Project "msbuild.xml.teamcity.patch.tcprojx" (default targets):] Test run results: Total 0, Successful 0, Failed 0,
}}
Coordinator
Apr 22, 2010 at 10:56 PM

Unfortunately I'm stuck at this point... If I get some time in the next few days I'll try to create an MSBuild version and test it out at work (where I have teamcity).

Coordinator
Apr 25, 2010 at 7:08 AM

Any luck resolving your issue here? (specifically any knowledge that can be contributed back to the project)

Apr 26, 2010 at 9:07 PM

Nothing yet I'm afraid but I'll have some more time to investigate during the week. I'll let you know if I make any progress. Thanks for your help again.

Nov 10, 2010 at 11:01 PM

I had the same problem, solved it by restarting TeamCity Build Agent Service(s) under Local System account as recommended here http://statlight.codeplex.com/wikipage?title=TeamCity%20Integration&referringTitle=Documentation.

As I ran out of options so I had to go back to the original documentation, the problem is then fixed.  Maybe this symptom should be added to the doc.

 

Hope this helps.