question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Action seems to ignore the content of the trx file

See original GitHub issue

I am getting blank test results even though the tests results exist and the action seems to find them, so am I doing something wrong?

- name: Publish Test Results
  uses: EnricoMi/publish-unit-test-result-action@v2
  with:
    xunit_files: "dist/*.trx"

The test output section has run the tests and output the trx file to the dist folder:

https://github.com/strem-app/strem/runs/7840354498?check_suite_focus=true#step:6:809

Results File: /home/runner/work/strem/strem/dist/Strem.UnitTests.Test.Results.trx Passed! - Failed: 0, Passed: 44, Skipped: 0, Total: 44, Duration: 146 ms - /home/runner/work/strem/strem/src/Strem.UnitTests/bin/Debug/net6.0/Strem.UnitTests.dll (net6.0)

However when the unit test publish action is run it finds the file from what I can tell but generates an empty output: https://github.com/strem-app/strem/runs/7840354498?check_suite_focus=true#step:7:23

2022-08-15 15:00:13 +0000 - publish - INFO - Reading dist/*.trx (1 file, 65.0 KiB) 2022-08-15 15:00:13 +0000 - publish - INFO - Finished reading 1 files in 0.00 seconds

image

Any help would be great as I don’t really know how to debug further as file is there, its found the file, it says its processing it, so a bit baffled.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
EnricoMicommented, Aug 16, 2022

I have found the issue, it is in:

with:
  xunit_files: "dist/*.trx"

It should read:

with:
  trx_files: "dist/*.trx"

https://github.com/EnricoMi/strem/actions/runs/2866802522/attempts/1#summary-7854780069

I have improved the logging so it is easier to spot this kind of issue:

2022-08-16 09:22:55 +0000 - publish -  INFO - Reading XUnit files dist/*.trx (1 file, 65.0 KiB)
0reactions
EnricoMicommented, Aug 16, 2022

Thanks for reporting.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet test does not respect LogFileName -- adds date #1951
A file named somename.trx should be created. In .NET Core 2.2 / Test Execution Command Line Tool Version 15.9.0 I get this behaviour....
Read more >
Error trying to run mstest on jenkins - Stack Overflow
The configuration simply specifies TestResult.trx as ResultFileName. This file is not versioned, and I expect it to be created on each build.
Read more >
VSTest test publication miscounts test cases and cannot ...
We are using Xunit. We've observed two symptoms of this so far: 1. The count of tests run/ ignored is incorrect (many less...
Read more >
Having problem with limiting size of TRX file on test runs - MSDN
I have read a few articles that seem to indicate the TRX file has a limited size. Is there any way I can...
Read more >
No MSTest TRX test report files were found. Configuration ...
Problem with MSTest post build action with following message: "FATAL: No MSTest TRX test report files were found. Configuration error?".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found