Dashboard Url/runUrl in reporter
# i-need-help
s
Hello, I'm trying to make a reporter that include the runUrl in the report. I'm hoping to get a link from the report directly to the run in cypress dashboard. Is there any way to retrieve that variable for a reporter? I haven't been able to find it. Specifically: at the end of a run, there's a console log line that says
Recorded Run: https://cloud.cypress.io/projects/{projectId}/runs/{runNumber}
. I would like to put that url in my report. E.G.:
Copy code
class MyCustomReporter {
    constructor(runner, options) {
        runner.once(EVENT_RUN_BEGIN, () => {
            console.log('start');
            // I'd like to log it here.  If I know how to log it here, I can put it where i need it to go.
                        console.log(`RunUrl:${SomeRunUrl}`);
        })
    }
}
m
Hi @swift-tiger-94189 See https://github.com/cypress-io/github-action#outputs to use from GitHub actions and https://docs.cypress.io/guides/guides/module-api if you want an API call to record using Cypress. See https://github.com/cypress-io/cypress/blob/master/cli/types/cypress-npm-api.d.ts for
runUrl
.
s
thanks for the info. I think that gives me what I need. Wish it was integrated into the reporters, but I can work with this.