pytest-historic-hook
Hook to push pytest execution results to MySQL (for Pytest Historic report)
Installation
-
Install
pytest-historic-hook
pip install pytest-historic-hook
Usage
Pytest Historic report required following information, users must pass respective info while using hook
--hshost --> mysql hosted machine ip address (default: localhost)
--hsname --> mysql user name (default: superuser)
--hspwd --> mysql password (default: passw0rd)
--hname --> project name in pytest historic
--hdesc --> execution info
-
Use
pytest-historic-hook
while executing tests> pytest --historic=True --hshost="<SQL_HOSTED_IP:3306>" --hsname="<NAME>" --hspwd="<PWD>" --hname="<PROJECT-NAME>" --hdesc="<EXECUTION-INFO>"
Example: (MySQL installed in local)
> pytest --historic=True --hsname="admin" --hspwd="Welcome1!" --hname="projec1" --hdesc="Smoke test on v1.0" <suite>
Example: (MySQL installed in 10.30.2.150)
> pytest --historic=True --hshost="10.30.2.150:3306" --hsname="admin" --hspwd="Welcome1!" --hname="projec1" --hdesc="Smoke test on v1.0" <suite>
For more info refer to pytest-historic