reportportal / agent-js-jest

Agent to integrate Jest with ReportPortal.
https://www.npmjs.com/package/@reportportal/agent-js-jest
Apache License 2.0
21 stars 37 forks source link

Add new option logLaunchLink to print Launch URL in console #92

Closed gabreel05 closed 2 years ago

gabreel05 commented 2 years ago

Add a new option in the jest-reportportal.conf.js or jest.config.js to print the URL of the Launch of the tests.

The idea is to provide a way to easily verify the result of the tests after the execution.

An example of the object:

{
    "jest": {
        "reporters": [
            "default",
            ["@reportportal/agent-js-jest",
            {
                "token": "00000000-0000-0000-0000-000000000000",
                "endpoint": "https://your.reportportal.server/api/v1",
                "project": "YourReportPortalProjectName",
                "launch": "YourLauncherName",
                "description": "YourDescription",
                "logLaunchLink": true,
                "attributes": [
                    {
                        "key": "YourKey",
                        "value": "YourValue"
                    },
                    {
                        "value": "YourValue"
                    },
                ],
                "restClientConfig": {
                  "timeout": 0
                }
            }]
        ],
    }
}

And then in the finish of the execution the Launch Link will be printed:

ReportPortal Launch Link: http://host/ui/#project_name/launches/all/id

renkyoji commented 2 years ago

Closed in favor of https://github.com/reportportal/agent-js-jest/pull/98