kevlened / pytest-parallel

A pytest plugin for parallel and concurrent testing
https://github.com/browsertron/pytest-parallel/issues/104#issuecomment-1293941066
MIT License
313 stars 59 forks source link

No test result in xml -> pytest --workers auto tests/app/ --junitxml=/app/test-reports/results.xml #84

Open KrishnaYadav2102 opened 3 years ago

KrishnaYadav2102 commented 3 years ago

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.

nickmelchiorre commented 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