Passed tests doesn't show up in CircleCI insights

Hi,
I have a project where am running .net core tests and uploading the test results by using the trx2junit.
The test status are being shown under ‘Tests’ tab after the build. But the problem is, passed tests are not getting shown under Insights.

For example: There is a test which got failed, am able to see failed error under tests tab and failure in Insights->Tests tab for that build
But in the same build am not able to see passed tests under Insights->Tests. Because of which we are not able to track or see flaky tests

Below is the screenshot for the pipeline of ‘tests’ tab
Upon clicking on ‘Insights’, it shows no passed tests results in insights

If in case, I have any failure in test → then only that failed tests is being shown under Insights->Test tab.

Is is something wrong ? that showing info in tab but not in Insights ?
Do anyone else face same issue ? or have any solution for this problem ?

Hi @vegesnark! This is a little complicated to debug, but I don’t think you’re doing anything wrong. Would you mind sharing the link to your project?

Hi @thekatertot ,
Thanks for replying,
Below is the yaml which am using, see if this helps you in understanding the setup.

version: 2.1

orbs:
  win: circleci/windows@2.2.0

workflows:
   UI_Tests:
      jobs:
         - run_UI_tests:
            executionType: smokes         

commands:
   environment_setup:
    steps:
      - checkout
      - run:
          name: Install Chrome Browser
          command: |
            choco install googlechrome --ignore-checksums
      - run:
          name: Install trx2junit tool
          environment:
            PATH: '/root/.dotnet/tools:$PATH'
          command: |
            dotnet tool install -g trx2junit

jobs:
   run_UI_tests:
      executor: win/default
      parameters:
         executionType:
          type: string
          default: ''

      steps:
         - environment_setup         
         - run:
            name: Restore nuget packages for the project
            command: |
              dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
              dotnet restore "UI.Tests\UI.Tests.csproj"    
         - run:
            name: Run UI tests
            command: |
               dotnet test "UI.Tests\UI.Tests.csproj" --filter Category=<< parameters.executionType >> --logger "trx;LogFileName=TestResults.trx" --results-directory:"test-results"
         - run: 
            name: Convert report file
            command: |
                   trx2junit ./test-results/*.trx
            when: always
         - store_test_results:
            path: test-results
         - store_artifacts:
            path: test-results        

1 Like

Did you fix this issue i have the same actually

We found out that the problem is with a file which was generated from trx2junit. The format of failed tests in trx2junit resulted file is a bit different when compared to junit file (can be resulted by using junit logger in the test solution).

Right now we are having a test framework as xunit, so we are using xunit logger and converting the xunit result xml to junit file using ‘xunit-to-junit’ tool.

CircleCI shows us the correct information in insights when we use junit file which was resulted using ‘xunit-to-junit’ tool