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

Plugin unable to parse and import failed test cases to testrail #9

Open
lokeshreddyp opened this issue Nov 1, 2021 · 3 comments
Open

Comments

@lokeshreddyp
Copy link

This framework works when test pass and doesn't upload any results to testrail when test fails

@ma-jahn
Copy link
Contributor

ma-jahn commented Nov 1, 2021

Hi @lokeshreddyp

I am actually using it in production and it is working in all cases so far.
Therefore i am very curious what's causing your issues.
Can you please provide additional details like error details (log output) and maybe even the actual report (json)?

Thanks

@lokeshreddyp
Copy link
Author

hi @ma-jahn Thanks for your reply.Here is the json { "stats": { "suites": 0, "tests": 1, "passes": 0, "pending": 0, "failures": 1, "start": "2021-11-01T02:38:49.852Z", "end": "2021-11-01T02:39:29.625Z", "duration": 39773, "testsRegistered": 1, "passPercent": 0, "pendingPercent": 0, "other": 0, "hasOther": false, "skipped": 0, "hasSkipped": false }, "results": [ { "uuid": "a0ebffef-fa9a-4bac-b649-05485e6cfb61", "title": "", "fullFile": "cypress/integration/Tests/GeneralTests/LoginTest.js", "file": "cypress/integration/Tests/GeneralTests/LoginTest.js", "beforeHooks": [], "afterHooks": [], "tests": [ { "title": "sample test [4931]", "fullTitle": "sample test [4931]", "timedOut": null, "duration": 39677, "state": "failed", "speed": null, "pass": false, "fail": true, "pending": false, "context": null, "code": "// Cypress.currentTest.retries(3);\ncommonPage.visit();\nviewPortSizes.forEach(function (viewPortSize) {\n cy.viewport(viewPortSize);\n if (viewPortSize == 'iphone-x') {\n mobileWebHomePage.login(username, password);\n cy.wait(2000);\n mobileWebHomePage.logout();\n cy.wait(300);\n } else {\n webHomePage.login(username, password);\n cy.wait(700);\n webHomePage.logout();\n cy.wait(300);\n }\n});", "err": { "message": "AssertionError: Timed out retrying: Expected to find element: [data-testid=profileIcon], but never found it.", "estack": "AssertionError: Timed out retrying: Expected to find element: [data-testid=profileIcon], but never found it.\n at WebHomePage.myAccountButton (https://alpha.test.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2462:32)\n at WebHomePage.logout (https://alpha.test.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2721:12)\n at eval (https://alpha.test.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2776:19)\nat Array.forEach (<anonymous>)\n at Context.eval (https://alpha.test.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2765:17)", "diff": null }, "uuid": "27f871bf-c8fc-428c-a082-ee646abd93ee", "parentUUID": "a0ebffef-fa9a-4bac-b649-05485e6cfb61", "isHook": false, "skipped": false } ], "suites": [], "passes": [], "failures": [ "27f871bf-c8fc-428c-a082-ee646abd93ee" ], "pending": [], "skipped": [], "duration": 39677, "root": true, "rootEmpty": false, "_timeout": 2000 } ], "meta": { "mocha": { "version": "7.0.1" }, "mochawesome": { "options": { "quiet": false, "reportFilename": "result.json", "saveHtml": false, "saveJson": true, "consoleReporter": "spec", "useInlineDiffs": false, "code": true }, "version": "6.3.1" }, "marge": { "options": { "reportDir": "test/cypress/results", "reportFilename": "result.json", "overwrite": true, "html": false, "json": true }, "version": "5.2.0" } } }

here is the log

`1) sample test [4931]

0 passing (12s)
1 failing

  1. sample test [4931]:
    AssertionError: Timed out retrying: Expected to find element: [data-testid=profileIcon], but never found it.
    at WebHomePage.myAccountButton (https://alpha.company.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2462:32)
    at WebHomePage.logout (https://alpha.company.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2721:12)
    at eval (https://alpha.company.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2776:19)
    at Array.forEach ()
    at Context.eval (https://alpha.company.com/__cypress/tests?p=cypress/integration/Tests/GeneralTests/LoginTest.js:2765:17)

[mochawesome] Report JSON saved to /Users/lr/Desktop/company/company/test/cypress/results/result.json

(Results)

┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 1 │
│ Passing: 0 │
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 1 │
│ Video: true │
│ Duration: 11 seconds │
│ Estimated: 19 seconds │
│ Spec Ran: Tests/GeneralTests/LoginTest.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘

(Screenshots)

  • /Users/lr/Desktop/company/company/cypress/screenshots/Tests/ (2400x1708)
    GeneralTests/LoginTest.js/sample test [4931] (failed).png

(Video)

  • Started processing: Compressing to 32 CRF
  • Finished processing: /Users/lr/Desktop/company/company/cypre (0 seconds)
    ss/videos/Tests/GeneralTests/LoginTest.js.mp4

(Uploading Results)

  • Done Uploading (1/2) /Users/lr/Desktop/company/company/cypress/videos/Tests/GeneralTests/LoginTest.js.mp4
  • Done Uploading (2/2) /Users/lr/Desktop/company/company/cypress/screenshots/Tests/GeneralTests/LoginTest.js/sample test [4931] (failed).png

====================================================================================================

(Run Finished)

   Spec                                              Tests  Passing  Failing  Pending  Skipped

┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✖ Tests/GeneralTests/LoginTest.js 00:11 1 - 1 - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✖ 1 of 1 failed (100%) 00:11 1 - 1 - -

───────────────────────────────────────────────────────────────────────────────────────────────────────

Recorded Run: https://dashboard.cypress.io/projects/tyay/runs/9426
`

@lokeshreddyp
Copy link
Author

Hi @ma-jahn please let me know if you need any more info on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants