Open KrishnaYadav2102 opened 3 years ago
Having the same issue, pytest wont write to the xml file if pytest-parallel is being used.
platform darwin -- Python 3.7.0, pytest-6.1.2, py-1.9.0, pluggy-0.13.1 rootdir: {dir}, configfile: pytest.ini plugins: rerunfailures-9.1.1, parallel-0.0.10
The following commands executes the tests in parallel and also generates junitxml file but doesn't contain the test results.
pytest --workers auto tests/app/ --junitxml=/app/test-reports/results.xml
tests execution summary: ============================= test session starts ============================== platform linux -- Python 3.8.0, pytest-5.3.2, py-1.8.1, pluggy-0.13.1 rootdir: /app plugins: parallel-0.0.9, apiritif-0.9.5 collected 49 items pytest-parallel: 4 workers (processes), 1 test per worker (thread) ................................................. =============================== warnings summary =============================== -------------- generated xml file: /app/test-reports/results.xml --------------- ======================== 49 passed, 1 warning in 17.43s ========================
results.xml
content:<?xml version="1.0" encoding="utf-8"?><testsuites><testsuite errors="0" failures="0" hostname="864542177d3e" name="pytest" skipped="0" tests="0" time="17.420" timestamp="2020-09-03T08:18:46.725913"></testsuite></testsuites>
Am I missing something here.