-
Notifications
You must be signed in to change notification settings - Fork 171
dotnet test with logger trx is not working #211
Comments
removing and re-pulling the image did not help... |
Can you share a project and a dockerfile that reproduces this issue? I'm still not able to reproduce using These are my steps:
This produces a trx file as expected. |
running it from scratch as described by you in the prev comment does indeed produce a trx file. |
ok, some more info: after figuring out, that it worked fine with @natemcmaster 's sequence i played around with it a little bit more. and i found out, that i can reproduce the problem if i do it closer to my own example and that is with a volume mount. Important info: Running Docker Toolbox on Win 7!!
Now the trx file is not generated. Then i tried to figure out why and started another test:
That sequence creates the trx file but fails to copy it to the volume: ! This is not a problem when you run docker for windows on win 10, since it seems that the files get renamed somehow. Even though it still is a problem if you rely on the filenames... The only workaround i have for now is to change how i build my project (no volume mounting of my solution, building in the container then copying the results to a mounted volume AFTER renaming the trx files to something that windows can work with. FYI the problem is the colon int the filename. if you run dotnet test --logger:trx on windows the filename does not contain colons and uses underscores instead. Why doesn't the trx logger use the same format on linux? |
Glad you figured it out. I'm going to close this as it's not something the docker images can fix. You can workaround by changing the trx filename. Can you open an issue on https://github.com/microsoft/vstest to not use semicolons in the trx file by default? |
background:
i just switched from project.json to csproj and 1.1.0 to 1.1.1
when changing that i realized that
dotnet test -xml testresult.xml
does not work anymore. I found you can use the parameter --logger for that. So on my windows machine
i ran
dotnet test --logger:trx
and got a testresult
running the same thing within the build image does not work. It does not complain really, but it does not output the testresults. if i use some fantasy logger --logger:something it says it cannot find the logger specified. So it seems that it runs but somehow cannot write the file or something.
I attached a screenshot of the outputs in the console.
Is this a problem with the build image or with the dotnet cli?
The text was updated successfully, but these errors were encountered: