Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dorny/test-reporter fails with error Error: TypeError: stackTrace.split is not a function when there is test failure. #241

Open
Anudeep33 opened this issue Mar 24, 2023 · 7 comments · May be fixed by #247
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Anudeep33
Copy link

Anudeep33 commented Mar 24, 2023

dorny/test-reporter fails with error when there is test failure.

Error: TypeError: stackTrace.split is not a function
below is junit.xml file



64 | await this.page.locator(this.offlineSummarySelector).waitFor(); | ^ 65 | await this.page.locator(this.onlineSummarySelector).waitFor(); 66 | await expect(this.onlineSummary).toHaveText("Online"); 67 | await expect(this.offlineSummary).toHaveText("Offline"); at OverviewPage.verifyOverviewPageElements (/qa-automation/test/frontend/login/login.test.ts:41:34 attachment #1: screenshot (image/png) ---------------------------------------------------------- test-results/frontend-login-login--login-RTA-83-Verify-user-is-able-to-log-in-with-an-admin-account-sanity-mobile-Chrome/test-failed-1.png ------------------------------------------------------------------------------------------------ Retry #1 --------------------------------------------------------------------------------------- locator.waitFor: Timeout 30000ms exceeded. =========================== logs =========================== waiting for selector "[data-testid="summary-Offline"]" to be visible ============================================================ at ../page/OverviewPage.ts:64 62 | 63 | async verifyOverviewPageElements() { > 64 | await this.page.locator(this.offlineSummarySelector).waitFor(); | ^ 65 | await this.page.locator(this.onlineSummarySelector).waitFor(); 66 | await expect(this.onlineSummary).toHaveText("Online"); 67 | await expect(this.offlineSummary).toHaveText("Offline"); at OverviewPage.verifyOverviewPageElements (/qa-automation/test/frontend/login/login.test.ts:41:34 attachment #1: trace (application/zip) --------------------------------------------------------- test-results/frontend-login-login--login-RTA-83-Verify-user-is-able-to-log-in-with-an-admin-account-sanity-mobile-Chrome-retry1/trace.zip Usage: npx playwright show-trace test-results/frontend-login-login--login-RTA-83-Verify-user-is-able-to-log-in-with-an-admin-account-sanity-mobile-Chrome-retry1/trace.zip ------------------------------------------------------------------------------------------------ attachment #2: screenshot (image/png) ---------------------------------------------------------- test-results/frontend-login-login--login-RTA-83-Verify-user-is-able-to-log-in-with-an-admin-account-sanity-mobile-Chrome-retry1/test-failed-1.png ------------------------------------------------------------------------------------------------ ]]> [[ATTACHMENT|../test-results/frontend-login-login--login-RTA-83-Verify-user-is-able-to-log-in-with-an-admin-account-sanity-mobile-Chrome-retry1/trace.zip]]

[[ATTACHMENT|../test-results/frontend-login-login--login-RTA-83-Verify-user-is-able-to-log-in-with-an-admin-account-sanity-mobile-Chrome-retry1/test-failed-1.png]]
]]>



@Anudeep33
Copy link
Author

its playwright report with junit format . pls check this https://playwright.dev/docs/test-reporters

@Anudeep33 Anudeep33 changed the title dorny/test-reporter fails with error when there is test failure. dorny/test-reporter fails with error Error: TypeError: stackTrace.split is not a function when there is test failure. Mar 24, 2023
@ArcadeMode
Copy link

ArcadeMode commented Apr 12, 2023

Seeing the same with cypress junit reports
Edit: have seen the same in the past with pytest suites

@Karamann
Copy link

Karamann commented May 5, 2023

Try your luck by changing the reporter format to java-junit:

  - name: visualise-test-reports
    if: always()
    uses: dorny/test-reporter@v1
    with:
      name: Test Reports
      path: /tests/*.xml
      reporter: java-junit

@agjini
Copy link

agjini commented Nov 16, 2023

Hello,

I've seen the fix in v1.7.0 release (PR #258), so I tried using dorny/test-reporter@v1.7.0 in my github action :

      - name: e2e test report
        uses: dorny/test-reporter@v1.7.0
        if: always()
        with:
          name: e2e tests
          path: e2e-junit.xml
          reporter: jest-junit

But I experiment the the same error :

Creating test report e2e tests
  Processing test results for check run e2e tests
  Error: Processing test results from e2e-junit.xml failed
Error: TypeError: stackTrace.split is not a function

Is there another case that causes the error ?

Here is my jest_junit file (generated with vitest) :

junit.xml.tar.gz

Thanks for your help

davidenke added a commit to webcomponents-preview/client that referenced this issue Dec 8, 2023
timabell added a commit to timabell/schema-explorer that referenced this issue Jan 28, 2024
timabell added a commit to timabell/schema-explorer that referenced this issue Jan 28, 2024
timabell added a commit to timabell/schema-explorer that referenced this issue Jan 28, 2024
timabell added a commit to timabell/schema-explorer that referenced this issue Jan 28, 2024
timabell added a commit to timabell/schema-explorer that referenced this issue Jan 28, 2024
Switch to java test parser -
dorny/test-reporter#241 (comment)

Currently the connection test passes and then a very odd failure on
reading columns which I don't get locally.
@jlukic
Copy link

jlukic commented Feb 14, 2024

Ran into this with Vitest results, using java-junit fixes it.

@kureey
Copy link

kureey commented May 15, 2024

Ran into this with Vitest results, using java-junit fixes it.

Same here.

@jozefizso jozefizso added help wanted Extra attention is needed good first issue Good for newcomers labels May 18, 2024
@huehnerlady
Copy link

Ran into this with Vitest results, using java-junit fixes it.

same here, using playwright tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants