Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

How can I check if the grid nodes are being used in a console test run?
samholder
#1 Posted : Wednesday, March 23, 2016 5:33:04 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/11/2012(UTC)
Posts: 94

Thanks: 28 times
Was thanked: 12 time(s) in 12 post(s)
Hi,

We have just set up a couple of grid nodes and enabled the build server to use ncrunch console to run the tests. I created the config in VS and checked it in, but I don't think the tests are running on the grid nodes. At least I didn't any evidence in the build log in teamcity. Is there some way to verify that the tests are running on the grid nodes? Should there be something in the build log?

Cheers

Sam
Remco
#2 Posted : Wednesday, March 23, 2016 9:14:20 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,000

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi Sam,

When the tests are run on a remote node, NCrunch always places a small message at the top of the log for the test telling you that it was executed on a remote node (along with the name of the node). Basically, when looking at the test results in the HTML log, this should be obvious. If it isn't, then the tests are probably being run locally.

Another way is to examine the console tool's text output in the build log. If the tests are run remotely, there should be quite a few communication messages in the log describing this.
1 user thanked Remco for this useful post.
samholder on 3/24/2016(UTC)
samholder
#3 Posted : Thursday, March 24, 2016 9:45:45 AM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/11/2012(UTC)
Posts: 94

Thanks: 28 times
Was thanked: 12 time(s) in 12 post(s)
Thanks Remco,

So it seems that all my tests are running locally then, so I suppose the next question is why? I checked the ncrunch solution config checked out on the build server and it has the node config values in there. The grid nodes are used successfully in the local solution but there was one setting when setting it up in VS that I wasn't sure about. It's the 'Applies To' setting. I had options of 'This copmputer', 'this solution' and 'this solution and this computer'. I chose 'This solution', but I couldn't find any documentation about what the setting did. Could this be the issue? Can you point me to the documentation for this setting please?

Our ideal solution would be then we have some nodes for devs to use when developiong locally, and some nodes exclusively for use by the CI builds (as this is where we want our initial speed up to be). Is it possible to set it up this way? If not I'll just create a separate ncrunch config for the build server and overwrite the local one with this when doing a CI build.

Cheers

Sam
Remco
#4 Posted : Thursday, March 24, 2016 10:31:24 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,000

Thanks: 932 times
Was thanked: 1259 time(s) in 1172 post(s)
Hi Sam,

The 'Applies To' setting controls where the reference to the grid node is stored. If the grid node is applied to the computer, it will be available for every solution you open on that computer. If it's applied to the solution, it will be available only for that solution. Basically this determines which configuration file the reference is stored in. 'This Computer' will store the grid node reference in your global NCrunch config file at C:\Users\***\AppData\Roaming\NCrunch\globalconfig.crunch.xml, 'This Solution' will store the grid node reference inside the .ncrunchsolution file. As long as you store the grid node in 'This Solution' and ensure the .ncrunchsolution file exists inside your VCS, then the grid node should be available on your build server.

It's possible that the grid node is available but has been switched off via user preference. The Grid Management UI inside NCrunch has a checkbox next to each grid node which can be turned off when you want to disable the node. This disabling switch is stored in the .ncrunchsolution.user. I advise against checking this file into your VCS - make sure it doesn't exist on your build server, so there's no way someone can turn off the grid processing on the server accidentally.

Something else to check is whether the build server is experiencing connection problems to the grid nodes. If it can't connect to them, it won't try to run any tasks on them and will simply execute everything locally. If you have Visual Studio installed on the build server, this could be easy to troubleshoot by just loading up the solution into the NCrunch UI and checking to see if it's able to use the servers. Alternatively, setting your LogVerbosity on the command line to 'Detailed' may give you more information about connection requests (i.e. ncrunch.exe c:\solution\mysolution.sln -LogVerbosity Detailed).

Finally, if you have a solution with a very short end-to-end test run time, it's possible that the console tool is churning through all the work before it can negotiate any grid connections. It usually takes a few seconds for the engine to connect to a remote node and fully synchronise with it, so if you're local processor takes all the work before this can happen, the grid node will have nothing to do by the time its synchronised. I would think this is probably unlikely as generally in this situation there is little need to use a grid.
samholder
#5 Posted : Monday, April 4, 2016 3:42:14 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 5/11/2012(UTC)
Posts: 94

Thanks: 28 times
Was thanked: 12 time(s) in 12 post(s)
Cheers Remco,

Yeah adding the logging pointed out the issue, the console tool had been installed a while ago and so was a different version from the grid node server, so ncrunch didn't run them. Problem solved and tests are running in parallel nicely now! cheers again for an excellent tool!
1 user thanked samholder for this useful post.
Remco on 4/4/2016(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download