testomatio / reporter

Testomatio Reporter
126 stars 22 forks source link

Finishing testrun does not seem to work in batch file #228

Closed Chiel-CBTC closed 9 months ago

Chiel-CBTC commented 1 year ago

Describe the bug I have a batch file, containing:

@echo off setlocal enabledelayedexpansion

set testId=%1 set HEADLESS=true set ENVIRONMENT=TST set TESTOMATIO=* set TESTOMATIO_PRIVATE_ARTIFACTS=1 set TESTOMATIO_PROCEED=1

for /f "delims=" %%A in ('npx start-test-run --launch') do (set "RUN_ID=%%A")

set TESTOMATIO_RUN=%RUN_ID%

call npx codeceptjs run-workers 5 --plugins testomat --grep "%testId%"

call npx start-test-run --finish

endlocal

I use this batch file to run my CodeceptJS testscenario's (with Playwright).

The line call npx start-test-run --finish does not seem to work, because the testrun in testomat is not closed after a complete testrun.

To Reproduce Steps to reproduce the behavior: Start the batch file from a command-line with one parameter as testId. E.g. 'mustTest' This starts a testrun in Testomat and runs all tests corresponding with the given testId. Now wait until the testrun finishes. The testrun in Testomat.io is NOT closed.

Expected behavior After the testrun is finished I expect the testrun in Testomat to be closed.

Desktop (please complete the following information): OS: Windows 11 (command line) +-- @codeceptjs/configure@0.10.0 +-- @codeceptjs/examples@1.2.1 +-- @codeceptjs/ui@0.4.7 +-- @testomatio/reporter@1.0.2 +-- codeceptjs@3.3.6 +-- dotenv@16.0.3 +-- mocha-junit-reporter@2.2.0 +-- mochawesome@7.1.3 +-- playwright@1.27.1 `-- xhr2@0.2.1

olexandr13 commented 10 months ago

@DavertMik need to discuss

olexandr13 commented 9 months ago

@Chiel-CBTC if you use shared run, your test run command should be executed with npx start-test-run -c E.g.:

TESTOMATIO_RUN=12345 TESTOMATIO_PROCEED=1 npx start-test-run -c "npx codeceptjs run-workers 5 --plugins testomat"
olexandr13 commented 9 months ago

The functionality should work, I have just rechecked it. Please make sure your vars TESTOMATIO_RUN and TESTOMATIO_PROCEED are passed to the execution script.

poliarush commented 9 months ago

@Chiel-CBTC could you re-check it