test server exec cmd
Project description
pytest_server
Start service
pytest-server
Usage
import os
import sys
from pytest_server.client import run_tests, upload_allure_results
# 传入外部参数
project_name = sys.argv[1]
build_number = sys.argv[2]
build_url = sys.argv[3]
project_path = os.path.dirname(os.path.abspath(__file__))
# 确定allure测试结果生成路径
result_path = os.path.join(project_path, "allure-results")
result_path_build = os.path.join(result_path, build_number)
# 执行测试
run_tests(
project_path=project_path,
build_path=result_path_build
)
# 上传allure结果文件
upload_allure_results(
password='123456',
allure_result_path=result_path,
jenkins_project_path=rf'D:\jenkins\workspace\{project_name}',
ssh_host='Administrator@192.168.100.18',
hostkey='AAAAC3NzaC1lZDI1NTE5AAAAIHh2w7oqUW+zfUx75l6DwrKld9DlCWsXfwPkfS+2YycY',
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest_server-1.0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for pytest_server-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20641e59a3b23e2809434c4e038f462d2eef26809d84b37c0dc23aa5f88cbd5f |
|
MD5 | 1abc8301ec46c365a8906e4eaec5113d |
|
BLAKE2b-256 | 04f10575a8cf6e116545e2884669526cb1c5bac7e16d32fdfd6a8d8225332ed8 |