Hello,
we are attempting to set up NCrunch in command line for continuous churning mode.
Unfortunately, it's not functioning properly.
Could you advise on how to configure it via the command line for endless churning mode?
Remco NCrunch Developer
#16953
04 Dec 2023 23:01 UTC
Hi, thanks for posting.
Right now, this is a feature that is specific to the NCrunch VS client and it isn't available for the console tool. Could you tell me more about your use case? How will having this feature in the console tool help you?
Right now, this is a feature that is specific to the NCrunch VS client and it isn't available for the console tool. Could you tell me more about your use case? How will having this feature in the console tool help you?
Hello Remco,
Thank you for your prompt response.
We're aiming to execute NCrunch on a build server alongside the solution, ideally running continuously.
Currently, we're facing a challenge with our extensive unit test solution, encountering numerous errors during parallel or specific order execution.
Our goal is to identify and address these issues—such as static problems in tests—to mitigate failures.
To address this, we've devised a script that copies tests individually to the build server.
This process allows us to halt execution if a test fails, enabling us to effectively troubleshoot and resolve the identified issues.
Thank you for your prompt response.
We're aiming to execute NCrunch on a build server alongside the solution, ideally running continuously.
Currently, we're facing a challenge with our extensive unit test solution, encountering numerous errors during parallel or specific order execution.
Our goal is to identify and address these issues—such as static problems in tests—to mitigate failures.
To address this, we've devised a script that copies tests individually to the build server.
This process allows us to halt execution if a test fails, enabling us to effectively troubleshoot and resolve the identified issues.
Remco NCrunch Developer
#16957
05 Dec 2023 11:44 UTC
Is the purpose of your script to force the runner to execute different groups in tests in different orders so that you can tease out the issues?
When run locally on a machine under VS, NCrunch churn mode does cycle the tests into different execution orders and groups. It will also cycle the test processes randomly to try and trigger sequence-dependent issues. Is there a reason you need this to be on your build server and you aren't able to use a client machine?
When run locally on a machine under VS, NCrunch churn mode does cycle the tests into different execution orders and groups. It will also cycle the test processes randomly to try and trigger sequence-dependent issues. Is there a reason you need this to be on your build server and you aren't able to use a client machine?
There isn't a particular rationale for this.
The aim is to set up NCrunch to function in churn mode and, if feasible, to oversee it through the command-line interface (CLI).
The goal is to automate this process.
The aim is to set up NCrunch to function in churn mode and, if feasible, to oversee it through the command-line interface (CLI).
The goal is to automate this process.
Remco NCrunch Developer
#16961
05 Dec 2023 22:51 UTC
Thanks for confirming this. This would make sense as a feature request if you'd like to submit it at uservoice.
Hello Remco,
Thank you for your response. I'll proceed with the request.
In the meantime, do you have any advice or assistance to offer?
Thank you for your response. I'll proceed with the request.
In the meantime, do you have any advice or assistance to offer?
Remco NCrunch Developer
#16963
06 Dec 2023 07:52 UTC
Unfortunately, I can't right now provide you with a way to get churn mode to work using the console tool - but I can provide some general advise around its use that I hope will help with your situation.
The problem you're facing is very common and needs to be kept in check as test suites expand in size. Intermittent test failures slow down development and destroy developer sanity. There are two approaches I would suggest in bringing this problem under control:
1. Nominate a team member to take responsibility for turning on churn mode when they finish up work for the day. Let it run overnight. In the morning, check the results and examine the list of tests that failed. Construct a theory for each of these failures. If there is not enough information to act on them, add trace diagnostics to get more information so that the next time they fail, you'll have more to assess the situation.
2. For the tests that you've identified as intermittently failing, get NCrunch to target them for churn mode in isolation (just select the test and run churn mode). This will give you a way to stimulate the failure at will so that you can analyse it. Unfortunately it isn't possible to do this with a debugger attached, but as long as you can make the test fail, you can continue to add diagnostics until you've identified the reason for the failure. This won't work for many test-sequence dependent issues, but it works very well for race conditions and resource related problems.
We have some features coming with the V5 release that I expect will help immensely in dealing with this particular problem. I can't share details on this right now but please take this in confidence that we are doing what we can to help with this problem.
The problem you're facing is very common and needs to be kept in check as test suites expand in size. Intermittent test failures slow down development and destroy developer sanity. There are two approaches I would suggest in bringing this problem under control:
1. Nominate a team member to take responsibility for turning on churn mode when they finish up work for the day. Let it run overnight. In the morning, check the results and examine the list of tests that failed. Construct a theory for each of these failures. If there is not enough information to act on them, add trace diagnostics to get more information so that the next time they fail, you'll have more to assess the situation.
2. For the tests that you've identified as intermittently failing, get NCrunch to target them for churn mode in isolation (just select the test and run churn mode). This will give you a way to stimulate the failure at will so that you can analyse it. Unfortunately it isn't possible to do this with a debugger attached, but as long as you can make the test fail, you can continue to add diagnostics until you've identified the reason for the failure. This won't work for many test-sequence dependent issues, but it works very well for race conditions and resource related problems.
We have some features coming with the V5 release that I expect will help immensely in dealing with this particular problem. I can't share details on this right now but please take this in confidence that we are doing what we can to help with this problem.
Post a reply
Log in to reply.