MSTest Parser Not Looking in the Configured Directory
Asked by Ariel R. Conti:

I set up an MSTest Parser Configuration in Bamboo like this: ${bamboo.build.working.directory}\\tests\\TestResults.trx. When running Bamboo doesn't resolve this. It only replaces $${bamboo.build.working.directory}, but does not append \\tests\\TestResults.trx and therefore cannot find the .trx file. Note: the .trx file is being created properly.

What am I doing wrong?


Answers:
author: Daniel Santos
body: Hi [@Ariel R. Conti](/t5/user/viewprofilepage/user-id/2871892)

Most of the tasks in Bamboo have the **\<bamboo_build_working_directory\>**path as their default path to work with data. It means that if you don't provide any path, the one used it the working directory. It also means that you can use relative paths.

The value to**MSTest Test Results File/Directory** field on **MSTest Parser** task can be either:

* tests
* tests\\TestResults.trx
* ${bamboo.build.working.directory}\\tests
* ${bamboo.build.working.directory}\\tests\\TestResults.trx

?? In the options where the file TestResults.trx is not there, the task will search for any file with **trx** extension.

I've opened an improvement request related to this part of the task when testing it today: [\[BAM-20356\] Improve path error handling on MSTest parser task.](https://jira.atlassian.com/browse/BAM-20356)

**The issue you are facing**

I don't have a clear explanation for the problem you are facing, but it could be related to:

* the file is not present (ruled out for your tests)
* the path is still wrong
* the test error is generated for other build and therefore not detected

Please try:

1. Use the relative path **tests\\TestResults.trx** or **tests**.
2. Check the option **Pick up test results that were created outside of this build**in the advanced section.
3. Run another test and let us know the results you get.
4. Please share the full error you see in the build logs.

comments: author: Ariel R. Conti
body: The file exists. Bamboo doesn't find it because Bamboo isn't resolving the directory.

![TestResults.png](https://community.atlassian.com/t5/image/serverpage/image-id/49130iD7B4A0C83BD01822/image-size/large?v=v2&px=999 "TestResults.png")![ErrorOutput.png](https://community.atlassian.com/t5/image/serverpage/image-id/49129i8A3326A20E712B1B/image-size/large?v=v2&px=999 "ErrorOutput.png")![ParserConfig.png](https://community.atlassian.com/t5/image/serverpage/image-id/49132iC041C21B6EFDDD59/image-size/large?v=v2&px=999 "ParserConfig.png")


author: Daniel Santos
body: Can you share the Bamboo version you are using so I can run another test?  

Also, could you try using the path below?

**tests\\Arc.We.Tests\\TestResults**

I just want you to run this test with NO working directory variable and the file name which are not needed in this case.


author: Ariel R. Conti
body: That worked. Thanks!

Here's the version

* atlassian-image-consumer ([com.atlassian.image:atlassian-image-consumer:1.0.1:jar](http://www.gnu.org/licenses/lgpl-2.1.txt))
* byteman-agent ([org.jboss.byteman:byteman:3.0.10:jar](https://www.gnu.org/licenses/lgpl-2.1.txt))
* byteman-submit ([org.jboss.byteman:byteman-submit:3.0.10:bundle](https://www.gnu.org/licenses/lgpl-2.1.txt))
* Core Hibernate O/RM functionality ([org.hibernate:hibernate-core:5.2.10.Final-atlassian-2:jar](http://www.gnu.org/licenses/lgpl-2.1.html))
* Hibernate Commons Annotations ([org.hibernate.common:hibernate-commons-annotations:5.0.1.Final:jar](http://www.gnu.org/licenses/lgpl-2.1.html))
* Hibernate JPA 2 Metamodel Generator ([org.hibernate:hibernate-jpamodelgen:5.2.10.Final:jar](https://www.gnu.org/licenses/lgpl-2.1.txt))
* Hibernate/c3p0 Integration ([org.hibernate:hibernate-c3p0:5.2.10.Final:jar](https://www.gnu.org/licenses/lgpl-2.1.txt))
* Hibernate/Ehcache Integration ([org.hibernate:hibernate-ehcache:5.2.10.Final:jar](http://www.gnu.org/licenses/lgpl-2.1.html))
* Java Native Access Platform ([net.java.dev.jna:platform:3.4.0:jar](http://creativecommons.org/licenses/LGPL/2.1/))
* Java Persistence API - Version 2.1 ([org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final:jar](http://hibernate.org/))
* JCaptcha (com.octo.captcha:jcaptcha-api:2.0-alpha-1:jar)
* JCaptcha (com.octo.captcha:jcaptcha:2.0-alpha-1:jar)
* jfreechart ([jfree:jfreechart:1.0.9:jar](http://www.jfree.org/jfreechart/))
* JFreeChart ([org.jfree:jfreechart:1.0.19:jar](http://www.jfree.org/jfreechart/))
* jna-platform ([net.java.dev.jna:jna-platform:3.2.7:jar](https://jna.dev.java.net/))
* P4Java - Atlassian Patched ([com.tek42.perforce:p4java:0.7.5-atlassian-13:jar](http://tek42.com/perforce))
* Streaming API for XML ([javax.xml.stream:stax-api:1.0-2:jar](http://www.gnu.org/licenses/gpl.txt))
* wforms ([Unspecified](http://code.google.com/p/wforms/))


author: Daniel Santos
body: I was interested in the Bamboo Server version. It would be something like 6.7.2 or 6.8.0...  

I'm glad it worked. I'm afraid this task is only accepting a relative path for that field.


author: Ariel R. Conti
body: The version is 6.4.1 build 60405


author: Daniel Santos
body: Thank you!


Tags: ms-testmanager