3 Star 5 Fork 0

Ricky/SeleniumTestRunner

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
main.py 892 Bytes
一键复制 编辑 原始数据 按行查看 历史
Ricky 提交于 2021-01-18 14:30 +08:00 . 实现启动参数校验
# -*- coding: UTF-8 -*-
"""
@Time : 2021/1/14
@Author : Ricky
@Contact : 382688672@qq.com
@File : main.py
@Desc : None
"""
import os
import sys
from SeleniumTestRunner import SeleniumTestRunner
args: list[str] = sys.argv
idx: str = 1
dirpath: str = None
skipPyTest: bool = False
genAllureReport: bool = False
while idx < len(args):
arg: str = args[idx]
idx += 1
if arg.lower() == '-g':
genAllureReport = True
elif arg.lower() == '-s':
skipPyTest = True
elif not arg.startswith('-'):
tmppath = os.path.abspath(os.path.join(os.path.dirname(__file__), arg))
if not dirpath and os.path.isdir(tmppath):
dirpath = tmppath
if not dirpath:
exit('异常退出:缺乏启动参数 <目录路径>')
else:
SeleniumTestRunner.loadAll(os.path.join(os.path.dirname(__file__), dirpath), skipPyTest, genAllureReport)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/RickyLi79/selenium-test-runner.git
git@gitee.com:RickyLi79/selenium-test-runner.git
RickyLi79
selenium-test-runner
SeleniumTestRunner
master

搜索帮助