Skip to main content

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


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 details)

Uploaded Source

Built Distribution

pytest_server-1.0.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_server-1.0.1.tar.gz.

File metadata

  • Download URL: pytest_server-1.0.1.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.10

File hashes

Hashes for pytest_server-1.0.1.tar.gz
Algorithm Hash digest
SHA256 58d36f0c51e573c6349691c21e5b1b0f4e12a66bfce21bfd5acb12574451453b
MD5 4807881159f8b2a75ae32bdb179e14a2
BLAKE2b-256 5c20339dba2b51744a2a907cf47ee70072425914154304c386230068387195e2

See more details on using hashes here.

File details

Details for the file pytest_server-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_server-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20641e59a3b23e2809434c4e038f462d2eef26809d84b37c0dc23aa5f88cbd5f
MD5 1abc8301ec46c365a8906e4eaec5113d
BLAKE2b-256 04f10575a8cf6e116545e2884669526cb1c5bac7e16d32fdfd6a8d8225332ed8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page