I am using bamboo to run an mstest task. The mstest task runs selenium code and generates an extent report. I am wanting to pull the results from that report as an artifact in Bamboo.

I accidentally used runsettings file for trying to do this, found out there is something called testsettings, from a similar question I posted. How can I utilise the xxxx.testsettings file to create our own output path. Currently:

e:\bamboo\xml-data\build-dir\XXX-XXX-JOB1\SYSTEM_servername 2019-03-12 12_33_48.

I am wanting the extent report to be located at the following path. So I can record the artifact for bamboo.


Either that, or how do I create an artifact to pull that directory/files from the longer path?

2 Answers 2


If you are using Visual Studio 2012 or older, .TestSettings is the file to use. For newer versions .RunSettings is the preferred option.

Using the .RunSettings file you want to use the <ResultsDirectory> tag (or the VS editor) to set the test result directory. Note that the path to the results directory must be relative to the solution directory. More detail can be found on the Microsoft Documentation site.

If you need to use .TestSettings, you could edit the <DeploymentItem> tag in the XML, as described in this StackOverflow answer. You could also write a script that would copy result files from a specified directory to your chosen directory, and define it as a cleanup script in the TestSettings editor. The last option is to create a task to move the result files as you suggested in your answer.


This is what I ended up goign with. I didn't know I could take the current path and work my way back up the directory path...I was getting ready to hardcode it, just had to work around it. Now I can create the artifact.

var newPath = Path.GetFullPath(Path.Combine(dir, @"..\..\"));
Directory.CreateDirectory(newPath + "\\TestResults");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.