qxf2 / qxf2-page-object-model

Write Selenium and Appium tests in Python using the Page Object pattern. This Pythonic GUI and API test automation framework will help you get started with QA automation quickly. It comes with many useful integrations like - email, BrowserStack, Slack, TestRail, etc. This repository is developed and maintained by Qxf2 Services.
https://qxf2.com
MIT License
261 stars 192 forks source link

Fix pytest issues #293

Closed sravantit25 closed 3 years ago

sravantit25 commented 3 years ago

The following issue is because the pytest-html is not installed. Maybe its a dependency with other module. I updated the requirements.txt to exclusively install this so no one else runs into it.

"ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
__main__.py: error: unrecognized arguments: --html=log/pytest_report.html --self-contained-html" 

Another issue occurs while using pytest:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "C:\Users\Sravanti\coding\pytest\lib\site-packages\_pytest\main.py", line 257, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
.....
Replacing crashed slave gw2`
[gw7] win32 Python 3.7.4 cwd: C:\Users\Sravanti\coding\qxf2-page-object-model
[gw3] node down: Traceback (most recent call last):
  File "C:\Users\Sravanti\coding\pytest\lib\site-packages\execnet\gateway_base.py", line 1400, in _save
    dispatch = self._dispatch[tp]
KeyError: <enum 'ExitCode'>

pytest-xdist version. 1.29.0 was released explicitly to support the ExitCode enum. And is fixed with 1.31.

The branch fix_pytest_issues has 2 commits: pytest-html==3.0.0 to handle the report.html issue pytest-xdist==1.31 to fix the INTERNALERROR