Infra files for Migration QE
rp_cli.py is command line utility written in python. It takes xunit output file and upload it to report portal instance. It is able also to parse the xunit file and feed the results to report portal while being able to add more information per test like tags and logs.
git clone https://github.com/sshveta/migration-qe-reportportal
cd migration-qe-reportportal/reportportal_cli
python3 -m venv rp_venv
source ./rp_venv/bin/activate
pip install -U pip
pip install jinja2
pip install -r requierments.txt
Modify the rp_conf.yaml:
rp_endpoint: http://reportportal
rp_uuid: 1111111-1111-1111-1111-111111
rp_project: my_project
In report portal you have the ability to upload xunit file. That can be done by running:
python rp_cli.py --config rp_conf.yaml --upload_xunit ./my-product-smoke-tests.zip --launch_description 'some description of the launch ' --launch_tags 'smoke tag1 tag2 tag3'
python rp_cli.py --config rp_conf.yaml --upload_xunit ./junit-report.zip --launch_description 'testing reportportal' --launch_tags 'mta'
Note that the xunit file should be zipped and the name of the launch in report portal will be the name of the zip file. However in this case:
- you will have no tags per test case
- only the test case name will be shown in the report portal
- only the system_out or system_err which appears in the xunit file.
Xunit have more information like properties and full class name from wich for example i can tag the test case to make it easy to lookup in reportportal. This can be achieved by running:
python rp_cli.py --strategy Migration \
--xunit_feed tier1_xunit.xml \
--config rp_conf.yaml \
--launch_tags 'tier1 tag1 tag2' \
--launch_name 'tier1'
python rp_cli.py --config rp_conf.yaml --xunit_feed xunit_output.xml --launch_name MTA-5.0.2 --launch_description launch_desc --launch_tags mta-5.0.2 --strategy Migration
Note here you can set launch_name via command line.