Closed janaagaard75 closed 5 years ago
had to write the full path to
trx2junit
(/root/.dotnet/tools/trx2junit
) to get it to work in Circle CI.
With each run
you use a new bash-environment, so the export
is "useless". See Setting an Environment Variable in a Shell Command, and that's why https://github.com/gfoidl/trx2junit/blob/55e34d7976208561d965406543ee9b5e7c1d0102/.circleci/config.yml#L20 is used.
Would it be worth mentioning this in the readme?
I don't think so, as this issue is specific to CircleCI, and there it is documented. If this would be mentioned, some other CI-systems should be added too...
might also be nice to add a bit more info about configuring Circle CI
What about other CI-systems? In general configuration for trx2junit is quite simple:
dotnet tool install -g trx2junit
This is actually covered in the ReadMe.
Did I miss your point or what would you add to the ReadMe? Feel free to submit an PR, so we can discuss it over there if you'd like.
No, no. You didn’t miss anything. This was just a suggestion, but I think your points are very valid.
Anyway, thanks for the suggestion 👍 and I hope you can setup CircleCI in a correct way.
I'm trying to setup the trx2junit in circleci but can't get it to work, so far my relevant code is:
# ...
- run:
name: "Run Application Tests"
command: dotnet test --no-build --logger "trx" --results-directory tests/output
- run:
name: "Collect Test Results"
when: always
command: |
dotnet tool install -g trx2junit
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> "$BASH_ENV"
trx2junit tests/output/*.trx --output tests/TestResults
Error from circleci:
# ...
trx2junit : The term 'trx2junit' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:1
Any ideas on how I can overcome this? Also this started as we're setting up .NET 6 in our build pipelines, until then the following code worked without a problem:
- run:
name: "Collect Test Results"
when: always
command: |
dotnet tool install -g trx2junit
trx2junit tests/output/*.trx --output tests/TestResults
@capalmeida https://github.com/gfoidl/trx2junit/issues/35#issuecomment-1076215784 is the same as https://github.com/gfoidl/trx2junit/issues/96? So we can continue on #96?
Yes!
This is not really a bug report, but more of an information: I had to write the full path to
trx2junit
(/root/.dotnet/tools/trx2junit
) to get it to work in Circle CI.Would it be worth mentioning this in the readme? It might also be nice to add a bit more info about configuring Circle CI. Here are the steps related to the tests in my
config.yml
.