Jordan Kowal
Jordan Kowal

Reputation: 101

Integrating Cypress within TestRail

I've been trying to have my Cypress tests uploaded to their matching TestRail testcases, but so far it's not working.


Here's my current setup:

I have installed:

In my cypress.json file I have:

{
    "baseUrl": "my website URL",
    "projectId": "my project ID",
    "reporter": "cypress-testrail-reporter",
    "reporterOptions": {
        "domain": "https://customName.testrail.io",
        "username": "[email protected]",
        "password": "My API key",
        "projectId": 2,
        "suiteId": 12
    }
}

In Cypress, I have a it() block named it.only("C170 Using wrong credentials", ...)

In TestRail I have the following settings:

Then, when I run cypress run --record --key my-record-key-from-cypress:

Any idea what could be missing?

Upvotes: 3

Views: 6441

Answers (2)

Rodyb
Rodyb

Reputation: 61

You should also run the test from the CLI instead of the Cypress test runner.

Upvotes: 2

Jordan Kowal
Jordan Kowal

Reputation: 101

SOLVED

Do not include http(s):// within your reporterOptions in the cypress.json file

BAD:   "domain": "https://customName.testrail.io"
GOOD:  "domain": "customName.testrail.io"

In all fairness, it's called domain, not URL, so I removing https makes sense

Upvotes: 4

Related Questions