ubuntu安裝jenkins
參考:https://juejin.im/post/5b6329c2e51d4519044ab85f
ubuntu裝python3
sudo apt-get install python3.6
修改默認(rèn)python版本:
打開該用戶的 ~/.bashrc文件,添加新的別名信息來修改默認(rèn)使用的 Python 版本泻仙。
alias python='/usr/bin/python3.6'
. ~/.bashrc #生效
安裝pytest&allure
pip3 install pytest
pip3 install pytest-allure-adaptor
npm install -g allure-commandline --save-dev
配置PYTHONPATH環(huán)境變量
sudo vim ~/.bashrc
在文件的最后一行輸入添加以下代碼
export PATH=$PATH:/usr/local/Python3.6/bin
或者使用:
export PATH=$PATH:/usr/local/Python3.6/bin
將環(huán)境變量配置到j(luò)enkins
echo $PATH
系統(tǒng)設(shè)置->環(huán)境變量
配置項(xiàng)目
cd ${ALLURE_HOME};pytest -s -q --alluredir ${ALLURE_HOME}/allure-results;allure generate /allure-results -o allure-results/html --clean
小坑
allure要使用npm安裝继谚,不然找不到
pytest最新版不能用老速,使用版本為3.7.3
jenkins報(bào)告不能顯示(還沒解決)
github觸發(fā)
https://blog.csdn.net/boling_cavalry/article/details/78943061
https://segmentfault.com/a/1190000004640060