Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create method to get url test runs #1146

Open
666f78 opened this issue Oct 22, 2024 · 4 comments
Open

Create method to get url test runs #1146

666f78 opened this issue Oct 22, 2024 · 4 comments
Assignees
Labels
enhancement new feature request, improvement, enhancement priority medium reporting reports, public, private, sharing test run, test report, results, test data
Milestone

Comments

@666f78
Copy link

666f78 commented Oct 22, 2024

Is your feature request related to a problem? Please describe.
After test run end link is print in the terminal, but I have custom reporter and want to grab the url to send on email

Describe the solution you'd like
Create method to get url test runs

Describe alternatives you've considered
Create env like TESTOMATIO_RUNS_URL and set it when run is started (after initialize test run in testomat)

@666f78 666f78 added the enhancement new feature request, improvement, enhancement label Oct 22, 2024
@poliarush poliarush added reporting reports, public, private, sharing test run, test report, results, test data priority medium labels Oct 22, 2024
@poliarush poliarush added this to the 0.5.38 milestone Oct 22, 2024
@poliarush
Copy link
Collaborator

@666f78 what tech stack do you use for test automation?

@poliarush
Copy link
Collaborator

@DavertMik do you need any additional information?

@666f78
Copy link
Author

666f78 commented Oct 22, 2024

@poliarush playwright + TS

@poliarush poliarush modified the milestones: 0.5.38, 0.5.37 Oct 23, 2024
@DavertMik
Copy link
Contributor

@666f78 Unfortunately, there is no way to update env vars from a running process.

However, starting from version 1.6 we write the run ID to a file. 1.6 is not yet stable yet, so please install beta version of it:

npm i @testomatio/[email protected]

In this version, when run is created it is saved to a file

/tmp/testomatio.latest.run

Source: https://github.com/testomatio/reporter/blob/master/lib/utils/utils.js#L323

So you can read the file contents to get latest run ID and insert them into a link:

https://app.testomat.io/projects/{PROJECT_ID}/runs/${fs.readFileSync('/tmp/testomatio.latest.run')}

The only thing you should know here is the project ID (whcih you can take from URL of a project).

I hope that helps

@poliarush poliarush reopened this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature request, improvement, enhancement priority medium reporting reports, public, private, sharing test run, test report, results, test data
Projects
None yet
Development

No branches or pull requests

4 participants