qase-tms / qase-javascript

Qase TMS JavaScript SDK
https://developers.qase.io
47 stars 38 forks source link

Save test run ID and URL to be reused in CI #591

Open NickVolynkin opened 1 month ago

NickVolynkin commented 1 month ago

Test reporters create a Qase test run before reporting the tests. Subsequent CI steps might need the information about the run for many reasons:

Implementation

There can be several options to return the values:

Write variables to a file

qase.sh

QASE_TESTOPS_RUN_ID=42
QASE_TESTOPS_RUN_URL=https://app.qase.io/run/DEMO/dashboard/42

There can be a problem if such file already exists and is open for writing (that is, busy). It can probably happen with multithreaded test runs.

Set environment variables

Same as with file, but directly set up env variables. There's a risk of overwriting the value that was already set. However, if it was set before running the tests, the reporter should have read and used it.

Write values to stdout in a well-parseable format