javascriptcypresstestrail

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": "myemail@address.com",
        "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?


Solution

  • 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