Unable to integrate Cypress with testmanagement tool

1.4k views Asked by At

Is there any way to integrate Cypress test cases with any test management tools (Like Testlink, testrail, or qtest)?

I want to perform automation testing and try to report the results to test management tools like Testlink, testrail, or qtest. Is there any way to do that?

3

There are 3 answers

1
testworks On BEST ANSWER

You've mentioned you are unable to integrate Cypress with a test management tool - have you tried already?

An NPM module, cypress-testrail-reporter, is available for TestRail - there may be more modules available.

Usage is pretty straightforward. You first define the connection details in your cypress.json:

"reporter": "cypress-testrail-reporter",
"reporterOptions": {
  "domain": "<your_testrail_server_url>",
  "username": "<username_associated_with_api_key>",
  "password": "<use_an_api_key_here>",
  "projectId": <project_id_as_int>,
  "suiteId": <suite_id_as_int>,
}

Then you need to annotate your test cases with the Case ID from the TestRail test case. The ID can either be added to the start, or the end of the Cypress test title.

This lets the plugin know where to submit the results after each test is executed.

it("C1234 Puts the lotion on its skin", ...
it("Or else it gets the hose again C5678", ...
0
muller On

Finally, after some exhaustive tryings, I finally figure out that cypress and testrail can integrate. @testworks's answer works fine but you have to run the test using the terminal, not test runner. to run the test, use the following command.

.\node_modules.bin\cypress run "your spec.js" --browser = browser name. With this command, you can run the specs as well as you can see your test using browser.

0
Dennis G. On

You could also try the Cypress integration for Testmo. It allows you to submit Cypress test automation results without any custom code and without mapping or creating any test cases manually. It uses Cypress XML result files to submit results.