Hi - when tests are run using NCrunch, executed in different test grid nodes, the results are captured in 'TestResultsInNUnitFormat.xml' file that is displayed in CI server's workspace.
The results are displayed as expected, but for testcases with preconditions, that are grouped , the results of individual test case is not updated as required.
I would like to add code to dynamically tweak the 'result' value of such test cases in 'TestResultsInNUnitFormat.xml' file.
Question 1: During test execution, in different test grid nodes, where is this file located, so that I can update the XML file?
Question 2: During the test run, screenshots are captured and saved in the respective test grid nodes, where the test case is executed. After the test run, is it possible to gather all the screenshots are port it along with the test results into CI server?
Thanks.
Build/Test Issues
TestResultsInNUnitFormat.xml- the path to the file during execution
Started by sheryl on 2,680 views
Remco NCrunch Developer
#8257
20 Jan 2016 21:31 UTC
Hi, thanks for posting.
This XML file is always stored in the results output directory as defined by the '/O' parameter passed into the NCrunch console tool (ncrunch.exe). By default, I think this lands in a 'TestResults' directory next to your solution (.sln) file. The XML file is only present on the client machine and is not exported on the grid nodes.
When your tests are run on the remote grid nodes, they are run inside workspaces underneath each respective grid node's 'workspace base path'. Assuming the screenshots are output using a relative path, they will likely be stored in the workspaces. Workspaces regularly get cleaned up by the grid nodes and will certainly be removed when the CI server finishes its end-to-end run. The best option here would be to change your code to store the screenshots using a well known absolute path on each grid node server (i.e. 'C:\TestRunScreenshots'), then open up a network share/FTP and write a script to have the CI server copy screenshots over from each of the grid nodes when it has finished its run. Unfortunately the NCrunch network protocol does not have a facility for transferring user files back from the grid node.
This XML file is always stored in the results output directory as defined by the '/O' parameter passed into the NCrunch console tool (ncrunch.exe). By default, I think this lands in a 'TestResults' directory next to your solution (.sln) file. The XML file is only present on the client machine and is not exported on the grid nodes.
When your tests are run on the remote grid nodes, they are run inside workspaces underneath each respective grid node's 'workspace base path'. Assuming the screenshots are output using a relative path, they will likely be stored in the workspaces. Workspaces regularly get cleaned up by the grid nodes and will certainly be removed when the CI server finishes its end-to-end run. The best option here would be to change your code to store the screenshots using a well known absolute path on each grid node server (i.e. 'C:\TestRunScreenshots'), then open up a network share/FTP and write a script to have the CI server copy screenshots over from each of the grid nodes when it has finished its run. Unfortunately the NCrunch network protocol does not have a facility for transferring user files back from the grid node.
Post a reply
Log in to reply.