numirias / pytest-json-report

🗒️ A pytest plugin to report test results as JSON
MIT License
146 stars 39 forks source link

The latest pytest 5.3.1 doesn't support pytest-json-report plugin #49

Closed dkuchynskyi closed 4 years ago

dkuchynskyi commented 4 years ago

The latest Pytest 5.3.1 doesn't support pytest-json-report plugin here is link to the list of supported plugins from Pytest: https://plugincompat.herokuapp.com/

12333

numirias commented 4 years ago

Thanks for the heads-up! The plugincompat app currently tests against 5.2.4, not 5.3.1 though, right?

Anyway, as log message it reports:

tox run timed out

Time: 300.4 seconds

However, on Travis the build passes in under 2 minutes with pytest 5.3.1:

platform linux -- Python 3.8.0+, pytest-5.3.1, py-1.8.0, pluggy-0.13.1 -- /home/travis/build/numirias/pytest-json-report/.tox/py38/bin/python

Currently it seems the plugin works fine with latest pytest, but takes too long on plugincompat?

dkuchynskyi commented 4 years ago

I'm just trying to run my tests with json reporter, but the error appears:

ERROR: usage: pytest.py [options] [file_or_dir] [file_or_dir] [...] pytest.py: error: unrecognized arguments: --json-report

Platform Win 10, python 3.8, Pytest 5.3.1 It works perfect with Pytest 5.2.2

numirias commented 4 years ago

If the --json-report flag is not recognized, the plugin is not installed/not found within your Python path. If you run pytest, it should show pytest-json-report in the plugin list, e.g.:

$ pytest
platform linux -- Python 3.8.0, pytest-5.3.1, py-1.8.0, pluggy-0.13.1
rootdir: ...
plugins: cov-2.8.1, requests-mock-1.7.0, metadata-1.8.0, json-report-1.2.1
collected 91 items
dkuchynskyi commented 4 years ago

I've installed it in pipenv instead of global installation in it works. Thanks