When the allure-report folder is present, the default launcher for tests
currently based on pytest now uses allure report related options.
"allure serve tests/allure-report/" can be rund afterwards to view the
report in browser.
These capacities have been scripted in tox and are now used by default
to ensure CI.
JIRA: TRNSPRTPCE-685
Change-Id: Ic27b3efa1a77c1f2c55338861b8a6f60f9c47e02
Co-authored-by: guillaume.lambert <guillaume.lambert@orange.com>
Signed-off-by: Tianliang Zhang <zhangtleon@gmail.com>
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
.DS_STORE
.metadata
ordmodels/src/main/java
+tests/allure-report/
tests/config.xml
tests/models
-<<<<<<< HEAD
+tests/test-requirements.txt
*.log
*.log.*
__pycache__
done
fi
if [ -z "$LAUNCHER" ]; then
- LAUNCHER="python3 -m pytest -q";
+ if [ -d "allure-report" ]; then
+ LAUNCHER="python3 -m pytest --alluredir=allure-report/ -q"
+ else
+ LAUNCHER="python3 -m pytest -q"
+ fi
fi
for script in $scriptlist; do
+## Caution this file is in .gitignore
pytest # MIT License
commands =
gitlint --config ../.gitlint
+
+[testenv:allure-report-init]
+basepython = python3
+deps = allure-pytest>=2.10.0
+# allure is under Apache License 2.0
+whitelist_externals =
+ mkdir
+ sed
+commands =
+ mkdir -p allure-report
+ sed -i_ '$a\allure-pytest # Apache License 2.0' ./test-requirements.txt
+
+
+[testenv:allure-report-serve]
+basepython = python3
+whitelist_externals =
+ allure
+commands =
+ allure serve "allure-report"