parcing_testrail_results:git clone ssh://sturivnyi@gerrit.mcp.mirantis.com:29418/mcp/osccore-qa-testing-tools
Install python 3.6 virtualenv:
apt install python3.6-venv
Navigate to the parcing_testrail_results/ folder:
cd parcing_testrail_results/
Create virtualenv and activate it:
virtualenv --python=python3.6 .venv . .venv/bin/activate
In the parcing_testrail_results/ folder install requirements:
pip3 install -r requirements.txt
Export environment variables:
export TESTRAIL_USER="your_email@mirantis.com" export TESTRAIL_PASSWORD="testrail_super_secret_password"
config fileEdit config.py file. Provide it with TESTRAIL_TOKEN and TESTRAIL_COOKIES
Getting TESTRAIL_TOKEN and TESTRAIL_COOKIES
Chromium web browserhttps://mirantis.testrail.com/index.php?/tests/view/59746877DevTools (press F12)DevTools window select Network tabHistory $ Context tabDevTools window select index.php?/tests/ajax_render_history requestHeaders tab get _token and cookie: tr_session valuesTESTRAIL_TOKEN and TESTRAIL_COOKIES in the config.py fileGetting help:
python html_testrail.py --help
Running the script:
python html_testrail.py --run_id=63355
Where:
--run_id TEXT Testrail run_id. For example, https://mirantis.testrail.com/index.php?/runs/view/63288 So run_id will be 63288