pytest-historic-hook

Custom listener to store execution results into MYSQL DB, which is used for pytest-historic report


Keywords
pytest, py, test, historic
License
MIT
Install
pip install pytest-historic-hook==0.1.2

Documentation

pytest-historic-hook

Hook to push pytest execution results to MySQL (for Pytest Historic report)

PyPI version Downloads PRs Welcome Maintenance Open Source Love png1 HitCount


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