ctrf-io / ctrf-io/github-test-reporter

Duration output is 28 ms but in the actual test duratation is 28s 102ms

Open
#239 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
376
Forks
42
PR merge metrics
No merged PRs in 30d

Description

Image

I think this is a bug?

Duration says 28 ms

but in the step test its Duration is: 28s 102 ms

Build started 10/30/2025 12:08:13.
     1>Project "/home/runner/work/shopphi/shopphi/tests/Shopphi.Order.IntegrationTests/Shopphi.Order.IntegrationTests.csproj" on node 1 (VSTest target(s)).
     1>InvokeTestingPlatform:
         Run tests: '/home/runner/work/shopphi/shopphi/tests/Shopphi.Order.IntegrationTests/bin/Release/net9.0/Shopphi.Order.IntegrationTests.dll' [net9.0|x64]
         Passed! - Failed: 0, Passed: 5, Skipped: 0, Total: 5, Duration: 28s 102ms
         Tests succeeded: '/home/runner/work/shopphi/shopphi/tests/Shopphi.Order.IntegrationTests/bin/Release/net9.0/Shopphi.Order.IntegrationTests.dll' [net9.0|x64]
     1>Done Building Project "/home/runner/work/shopphi/shopphi/tests/Shopphi.Order.IntegrationTests/Shopphi.Order.IntegrationTests.csproj" (VSTest target(s)).

These are 3 of the steps in the job:

      - name: Run integration tests (CTRF)
        run: dotnet test tests/Shopphi.Order.IntegrationTests/Shopphi.Order.IntegrationTests.csproj --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --verbosity normal -- --report-ctrf --report-ctrf-filename TestResults.ctrf.json

      - name: Strip BOM from CTRF
        if: always()
        shell: bash
        run: |
          shopt -s globstar nullglob
          for f in tests/**/TestResults/**/*.ctrf.json; do
            sed -i '1s/^\xEF\xBB\xBF//' "$f" 2>/dev/null || true
          done

      - name: Publish CTRF report to GitHub
        if: always()
        uses: ctrf-io/github-test-reporter@024bc4b64d997ca9da86833c6b9548c55c620e40 # v1.0.26
        with:
          report-path: ${{ github.workspace }}/tests/**/TestResults/**/*.ctrf.json
          summary-report: true

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with the provided dotnet test workflow and compare the generated CTRF duration with the VSTest output showing 28s 102ms. Trace how the GitHub Actions reporter reads and displays that duration; done means the published report preserves the correct seconds and milliseconds.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.