This file describes how to run the script from any environments, and load/view the Kibana dashboards for ZTAP automated tests reports analysis.
-
Loads the allure tests reports(suites.csv) to ELK stack, by default to the
ztap-run-1
index. -
Loads the allure tests logs(json) to ELK stack, by default to the
ztap-log-1
index.
- Elasticsearch 7.x and Kibana 7.x is installed & setup is up and running.
- Ensure you have the right git credentials
- Optional: Most developers need a python virtualenv. you may set this up like so:
pip install --user virtualenv
virtualenv myenv
source myenv/bin/activate
- Optional: Download/copy allure-report directory from the server where ZTAP tests were run to /Users/isharma (for example)
Note: allure-report directory on Jenkins server would be located in the directory:
/var/lib/jenkins/workspace/<Jenkins Job>/
git@github.com:Indu-sharma/Kibana-Dashboards-python.git
- Load Kibana dashbord and visualization and elasticsearch indices: A. Login to Kibana UI, go to Management -> Saved Objects B. Import dashboards via json - export.json, present in cloned repository path: Kibana-Dashboards-python/allure_to_elk/samples/dashboards
cd Kibana-Dashboards-python/allure_to_elk
- Install elastic_loader and other reqs:
pip install -r requirements.txt
- Check out the appropriate branch, eg:
git checkout release/5.1.0
python load_allure_reports_to_elk.py -d /Users/home --es_host 192.168.2.65:9200
You can change the value/Users/home
to the directory your allure-report folder is available and you can change the value192.168.2.65:9200
to your elasticsearch IP:PORT- Run
python load_allure_reports_to_elk.py -h
for more options. - To see the dashboard: On Kibana UI, search for dashboard :
Automation Overview
TBD: This script will be mainly used to run from the jenkins server. Once tested via Jenkins, this section will be updated.
- Indu Sharma