'Surefire Report shows invalid time of tests executing in GitHub actions

I have run Selenium Java tests via GitHub Actions. For generating Report I have used

dorny/[email protected]

My .xml file is:

name: DEV Table View suite

on:
  workflow_dispatch:

jobs:
  build:

    runs-on: windows-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Set up JDK 1.11
        uses: actions/setup-java@v2
        with:
          java-version: '11'
          distribution: 'adopt'

      - name: Test
        run: mvn clean test -Denv=DEV -DtestngXML='tableView.xml'
        
      - name: Report
        uses: dorny/[email protected]
        if: always()
        with:
          name: Maven Tests
          path: "**/surefire-reports/TEST-*.xml"
          reporter: java-junit
          fail-on-error: false

But in results I have noticed some issues:

  1. incorrect time
  2. passed tests are not green-colored enter image description here

How to solve these issues?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source