diff --git a/dockerfile b/dockerfile index ae29e2c..433576b 100644 --- a/dockerfile +++ b/dockerfile @@ -13,13 +13,14 @@ RUN apt-get update && apt-get install -y default-jdk # 安装git RUN apt-get install -y git -# 克隆代码 +# # 克隆代码(即使挂载整个项目目录也需要拉取代码,allure html报告需要确保容器内项目目录下存在lib/allure_xxx/bin/allure文件) RUN git clone --recurse-submodules https://gitlink.org.cn/kytest/apiautotest.git # 设置工作目录 WORKDIR /apiautotest COPY . . RUN git rev-parse HEAD +RUN ls -a lib && ls -a lib/allure-2.34.1/bin # 安装pipenv RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pipenv diff --git a/files/gen_allure.py b/files/gen_allure.py new file mode 100644 index 0000000..a4ec6da --- /dev/null +++ b/files/gen_allure.py @@ -0,0 +1,62 @@ +import subprocess + +def generate_allure_report(**kwargs): + """ + 通过allure生成html测试报告,并对报告进行美化 + """ + allure_results_dir = kwargs.get("allure_results") + allure_report_dir = kwargs.get("allure_report") + # ----------------判断运行的平台,是linux还是windows,执行不同的allure命令---------------- + cmd = f"{PlatformHandle().allure} generate {allure_results_dir} -o {allure_report_dir} --clean" + + try: + # subprocess.run 会等待命令执行完成 + result = subprocess.run( + cmd, + shell=True, # 允许字符串命令 + check=True, # 出错会抛异常 + stdout=subprocess.PIPE, # 捕获标准输出 + stderr=subprocess.PIPE, # 捕获错误输出 + text=True # 输出为字符串(而不是字节) + ) + print(result.stdout) # 正常日志 + if result.stderr: + print("⚠️ Allure 生成报告时有警告/错误:") + print(result.stderr) + + except subprocess.CalledProcessError as e: + print("❌ Allure 报告生成失败!") + print("命令:", e.cmd) + print("返回码:", e.returncode) + print("错误输出:", e.stderr) + raise # 把异常抛出去,外层能感知失败 + + # ----------------美化allure测试报告 ------------------------------------------ + allure_beautiful = AllureReportBeautiful( + allure_html_path=allure_report_dir, allure_results_path=allure_results_dir + ) + + # 设置报告窗口的标题 + allure_beautiful.set_windows_title(new_title=kwargs.get("windows_title")) + + # 修改Allure报告Overview的标题文案 + allure_beautiful.set_report_name(new_name=kwargs.get("report_name")) + + # 在allure-html报告中往widgets/environment.json中写入环境信息 + allure_beautiful.set_report_env_on_html(env_info=kwargs.get("env_info")) + + # ----------------压缩allure测试报告,方便后续发送压缩包------------------------------------------ + allure_config_path = kwargs.get("allure_config_path") # 保存http_server.exe及双击打开Allure报告.bat的目录 + copy_file( + src_file_path=os.path.join(allure_config_path, [i for i in os.listdir(allure_config_path) if i.endswith(".exe")][0]), + dest_dir_path=allure_report_dir, + ) + copy_file( + src_file_path=os.path.join(allure_config_path, [i for i in os.listdir(allure_config_path) if i.endswith(".bat")][0]), + dest_dir_path=allure_report_dir, + ) + + attachment_path = kwargs.get("attachment_path") # allure报告压缩的路径,例如:report/allure_report.zip + zip_file(in_path=allure_report_dir, out_path=attachment_path) + + return allure_report_dir, attachment_path diff --git a/lib/allure-2.22.0/lib/allure-commandline-2.22.0.jar b/lib/allure-2.22.0/lib/allure-commandline-2.22.0.jar deleted file mode 100644 index c8c7026..0000000 Binary files a/lib/allure-2.22.0/lib/allure-commandline-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/allure-generator-2.22.0.jar b/lib/allure-2.22.0/lib/allure-generator-2.22.0.jar deleted file mode 100644 index 0007411..0000000 Binary files a/lib/allure-2.22.0/lib/allure-generator-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/allure-model-2.20.1.jar b/lib/allure-2.22.0/lib/allure-model-2.20.1.jar deleted file mode 100644 index 872cc87..0000000 Binary files a/lib/allure-2.22.0/lib/allure-model-2.20.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/allure-plugin-api-2.22.0.jar b/lib/allure-2.22.0/lib/allure-plugin-api-2.22.0.jar deleted file mode 100644 index 498daea..0000000 Binary files a/lib/allure-2.22.0/lib/allure-plugin-api-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/commons-beanutils-1.9.4.jar b/lib/allure-2.22.0/lib/commons-beanutils-1.9.4.jar deleted file mode 100644 index b73543c..0000000 Binary files a/lib/allure-2.22.0/lib/commons-beanutils-1.9.4.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/commons-collections4-4.2.jar b/lib/allure-2.22.0/lib/commons-collections4-4.2.jar deleted file mode 100644 index 73a4f3f..0000000 Binary files a/lib/allure-2.22.0/lib/commons-collections4-4.2.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/commons-io-2.11.0.jar b/lib/allure-2.22.0/lib/commons-io-2.11.0.jar deleted file mode 100644 index be507d9..0000000 Binary files a/lib/allure-2.22.0/lib/commons-io-2.11.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/commons-lang3-3.12.0.jar b/lib/allure-2.22.0/lib/commons-lang3-3.12.0.jar deleted file mode 100644 index 4d434a2..0000000 Binary files a/lib/allure-2.22.0/lib/commons-lang3-3.12.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/commons-logging-1.2.jar b/lib/allure-2.22.0/lib/commons-logging-1.2.jar deleted file mode 100644 index 93a3b9f..0000000 Binary files a/lib/allure-2.22.0/lib/commons-logging-1.2.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/commons-text-1.3.jar b/lib/allure-2.22.0/lib/commons-text-1.3.jar deleted file mode 100644 index 0ec9e48..0000000 Binary files a/lib/allure-2.22.0/lib/commons-text-1.3.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/freemarker-2.3.32.jar b/lib/allure-2.22.0/lib/freemarker-2.3.32.jar deleted file mode 100644 index 3a073d4..0000000 Binary files a/lib/allure-2.22.0/lib/freemarker-2.3.32.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jackson-annotations-2.14.1.jar b/lib/allure-2.22.0/lib/jackson-annotations-2.14.1.jar deleted file mode 100644 index e908bd3..0000000 Binary files a/lib/allure-2.22.0/lib/jackson-annotations-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jackson-core-2.14.1.jar b/lib/allure-2.22.0/lib/jackson-core-2.14.1.jar deleted file mode 100644 index cc02583..0000000 Binary files a/lib/allure-2.22.0/lib/jackson-core-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jackson-databind-2.14.1.jar b/lib/allure-2.22.0/lib/jackson-databind-2.14.1.jar deleted file mode 100644 index 1ac8096..0000000 Binary files a/lib/allure-2.22.0/lib/jackson-databind-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jackson-dataformat-xml-2.14.1.jar b/lib/allure-2.22.0/lib/jackson-dataformat-xml-2.14.1.jar deleted file mode 100644 index 22266e3..0000000 Binary files a/lib/allure-2.22.0/lib/jackson-dataformat-xml-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jackson-dataformat-yaml-2.14.1.jar b/lib/allure-2.22.0/lib/jackson-dataformat-yaml-2.14.1.jar deleted file mode 100644 index 9ccddcb..0000000 Binary files a/lib/allure-2.22.0/lib/jackson-dataformat-yaml-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jackson-module-jaxb-annotations-2.14.1.jar b/lib/allure-2.22.0/lib/jackson-module-jaxb-annotations-2.14.1.jar deleted file mode 100644 index 23f72d2..0000000 Binary files a/lib/allure-2.22.0/lib/jackson-module-jaxb-annotations-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jakarta.xml.bind-api-2.3.3.jar b/lib/allure-2.22.0/lib/jakarta.xml.bind-api-2.3.3.jar deleted file mode 100644 index b8c7dc1..0000000 Binary files a/lib/allure-2.22.0/lib/jakarta.xml.bind-api-2.3.3.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/javax.servlet-api-3.1.0.jar b/lib/allure-2.22.0/lib/javax.servlet-api-3.1.0.jar deleted file mode 100644 index 6b14c3d..0000000 Binary files a/lib/allure-2.22.0/lib/javax.servlet-api-3.1.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jetty-http-9.4.49.v20220914.jar b/lib/allure-2.22.0/lib/jetty-http-9.4.49.v20220914.jar deleted file mode 100644 index 995b28d..0000000 Binary files a/lib/allure-2.22.0/lib/jetty-http-9.4.49.v20220914.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jetty-io-9.4.49.v20220914.jar b/lib/allure-2.22.0/lib/jetty-io-9.4.49.v20220914.jar deleted file mode 100644 index 00892ed..0000000 Binary files a/lib/allure-2.22.0/lib/jetty-io-9.4.49.v20220914.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jetty-server-9.4.49.v20220914.jar b/lib/allure-2.22.0/lib/jetty-server-9.4.49.v20220914.jar deleted file mode 100644 index cdc00cc..0000000 Binary files a/lib/allure-2.22.0/lib/jetty-server-9.4.49.v20220914.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/jetty-util-9.4.49.v20220914.jar b/lib/allure-2.22.0/lib/jetty-util-9.4.49.v20220914.jar deleted file mode 100644 index 1565e1e..0000000 Binary files a/lib/allure-2.22.0/lib/jetty-util-9.4.49.v20220914.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/logback-classic-1.3.5.jar b/lib/allure-2.22.0/lib/logback-classic-1.3.5.jar deleted file mode 100644 index 3bd86d3..0000000 Binary files a/lib/allure-2.22.0/lib/logback-classic-1.3.5.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/opencsv-4.6.jar b/lib/allure-2.22.0/lib/opencsv-4.6.jar deleted file mode 100644 index a2d5d57..0000000 Binary files a/lib/allure-2.22.0/lib/opencsv-4.6.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/slf4j-api-2.0.3.jar b/lib/allure-2.22.0/lib/slf4j-api-2.0.3.jar deleted file mode 100644 index c0b0066..0000000 Binary files a/lib/allure-2.22.0/lib/slf4j-api-2.0.3.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/snakeyaml-1.33.jar b/lib/allure-2.22.0/lib/snakeyaml-1.33.jar deleted file mode 100644 index 5a95195..0000000 Binary files a/lib/allure-2.22.0/lib/snakeyaml-1.33.jar and /dev/null differ diff --git a/lib/allure-2.22.0/lib/woodstox-core-6.4.0.jar b/lib/allure-2.22.0/lib/woodstox-core-6.4.0.jar deleted file mode 100644 index 6cdf94c..0000000 Binary files a/lib/allure-2.22.0/lib/woodstox-core-6.4.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/behaviors-plugin/behaviors-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/behaviors-plugin/behaviors-plugin-2.22.0.jar deleted file mode 100644 index db82929..0000000 Binary files a/lib/allure-2.22.0/plugins/behaviors-plugin/behaviors-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/custom-logo-plugin/custom-logo-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/custom-logo-plugin/custom-logo-plugin-2.22.0.jar deleted file mode 100644 index b101103..0000000 Binary files a/lib/allure-2.22.0/plugins/custom-logo-plugin/custom-logo-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/custom-logo-plugin/static/styles.css b/lib/allure-2.22.0/plugins/custom-logo-plugin/static/styles.css deleted file mode 100644 index 85d5c5c..0000000 --- a/lib/allure-2.22.0/plugins/custom-logo-plugin/static/styles.css +++ /dev/null @@ -1,11 +0,0 @@ -.side-nav__brand { - background: url('logo.svg') no-repeat left center !important; - margin-left: 10px; - height: 65px; - width: 150px; - background-size: contain !important; -} -.side-nav__brand span{ - display: none; -} - \ No newline at end of file diff --git a/lib/allure-2.22.0/plugins/jira-plugin/jira-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/jira-plugin/jira-plugin-2.22.0.jar deleted file mode 100644 index ba96d3c..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/jira-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/allure-jira-commons-2.22.0.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/allure-jira-commons-2.22.0.jar deleted file mode 100644 index 2588599..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/allure-jira-commons-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/converter-jackson-2.6.1.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/converter-jackson-2.6.1.jar deleted file mode 100644 index 94a3747..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/converter-jackson-2.6.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-annotations-2.14.1.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-annotations-2.14.1.jar deleted file mode 100644 index e908bd3..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-annotations-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-core-2.14.1.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-core-2.14.1.jar deleted file mode 100644 index cc02583..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-core-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-databind-2.14.1.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-databind-2.14.1.jar deleted file mode 100644 index 1ac8096..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/jackson-databind-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/okhttp-3.12.0.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/okhttp-3.12.0.jar deleted file mode 100644 index 85fe711..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/okhttp-3.12.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/okio-1.15.0.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/okio-1.15.0.jar deleted file mode 100644 index ab8ab73..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/okio-1.15.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/jira-plugin/lib/retrofit-2.6.1.jar b/lib/allure-2.22.0/plugins/jira-plugin/lib/retrofit-2.6.1.jar deleted file mode 100644 index 211539a..0000000 Binary files a/lib/allure-2.22.0/plugins/jira-plugin/lib/retrofit-2.6.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/junit-xml-plugin/junit-xml-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/junit-xml-plugin/junit-xml-plugin-2.22.0.jar deleted file mode 100644 index 352babb..0000000 Binary files a/lib/allure-2.22.0/plugins/junit-xml-plugin/junit-xml-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/packages-plugin/packages-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/packages-plugin/packages-plugin-2.22.0.jar deleted file mode 100644 index 648f637..0000000 Binary files a/lib/allure-2.22.0/plugins/packages-plugin/packages-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/screen-diff-plugin/screen-diff-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/screen-diff-plugin/screen-diff-plugin-2.22.0.jar deleted file mode 100644 index aeb7fd8..0000000 Binary files a/lib/allure-2.22.0/plugins/screen-diff-plugin/screen-diff-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/trx-plugin/trx-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/trx-plugin/trx-plugin-2.22.0.jar deleted file mode 100644 index 68a27a2..0000000 Binary files a/lib/allure-2.22.0/plugins/trx-plugin/trx-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xctest-plugin/xctest-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/xctest-plugin/xctest-plugin-2.22.0.jar deleted file mode 100644 index 0aa8dec..0000000 Binary files a/lib/allure-2.22.0/plugins/xctest-plugin/xctest-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/allure-jira-commons-2.22.0.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/allure-jira-commons-2.22.0.jar deleted file mode 100644 index 2588599..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/allure-jira-commons-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/converter-jackson-2.6.1.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/converter-jackson-2.6.1.jar deleted file mode 100644 index 94a3747..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/converter-jackson-2.6.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-annotations-2.14.1.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-annotations-2.14.1.jar deleted file mode 100644 index e908bd3..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-annotations-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-core-2.14.1.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-core-2.14.1.jar deleted file mode 100644 index cc02583..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-core-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-databind-2.14.1.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-databind-2.14.1.jar deleted file mode 100644 index 1ac8096..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/jackson-databind-2.14.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/okhttp-3.12.0.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/okhttp-3.12.0.jar deleted file mode 100644 index 85fe711..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/okhttp-3.12.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/okio-1.15.0.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/okio-1.15.0.jar deleted file mode 100644 index ab8ab73..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/okio-1.15.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/lib/retrofit-2.6.1.jar b/lib/allure-2.22.0/plugins/xray-plugin/lib/retrofit-2.6.1.jar deleted file mode 100644 index 211539a..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/lib/retrofit-2.6.1.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/xray-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/xray-plugin/xray-plugin-2.22.0.jar deleted file mode 100644 index 9723d5f..0000000 Binary files a/lib/allure-2.22.0/plugins/xray-plugin/xray-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/plugins/xunit-xml-plugin/xunit-xml-plugin-2.22.0.jar b/lib/allure-2.22.0/plugins/xunit-xml-plugin/xunit-xml-plugin-2.22.0.jar deleted file mode 100644 index 06fee88..0000000 Binary files a/lib/allure-2.22.0/plugins/xunit-xml-plugin/xunit-xml-plugin-2.22.0.jar and /dev/null differ diff --git a/lib/allure-2.22.0/bin/allure b/lib/allure-2.34.1/bin/allure similarity index 86% rename from lib/allure-2.22.0/bin/allure rename to lib/allure-2.34.1/bin/allure index e49e8d5..ecbbf21 100644 --- a/lib/allure-2.22.0/bin/allure +++ b/lib/allure-2.34.1/bin/allure @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +80,11 @@ do esac done -export APP_HOME=$( cd "${APP_HOME:-./}.." && pwd -P ) || exit - -APP_NAME="allure" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and ALLURE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +export APP_HOME=$( cd "${APP_HOME:-./}.." > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,22 +131,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $ALLURE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and ALLURE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ -classpath "$CLASSPATH" \ diff --git a/lib/allure-2.22.0/bin/allure.bat b/lib/allure-2.34.1/bin/allure.bat similarity index 98% rename from lib/allure-2.22.0/bin/allure.bat rename to lib/allure-2.34.1/bin/allure.bat index abab63a..b6ae123 100644 --- a/lib/allure-2.22.0/bin/allure.bat +++ b/lib/allure-2.34.1/bin/allure.bat @@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME%.. diff --git a/lib/allure-2.22.0/config/allure-cucumber.yml b/lib/allure-2.34.1/config/allure-cucumber.yml similarity index 100% rename from lib/allure-2.22.0/config/allure-cucumber.yml rename to lib/allure-2.34.1/config/allure-cucumber.yml diff --git a/lib/allure-2.22.0/config/allure-junit.yml b/lib/allure-2.34.1/config/allure-junit.yml similarity index 100% rename from lib/allure-2.22.0/config/allure-junit.yml rename to lib/allure-2.34.1/config/allure-junit.yml diff --git a/lib/allure-2.22.0/config/allure.yml b/lib/allure-2.34.1/config/allure.yml similarity index 100% rename from lib/allure-2.22.0/config/allure.yml rename to lib/allure-2.34.1/config/allure.yml diff --git a/lib/allure-2.34.1/lib/allure-commandline-2.34.1.jar b/lib/allure-2.34.1/lib/allure-commandline-2.34.1.jar new file mode 100644 index 0000000..0059fab Binary files /dev/null and b/lib/allure-2.34.1/lib/allure-commandline-2.34.1.jar differ diff --git a/lib/allure-2.34.1/lib/allure-generator-2.34.1.jar b/lib/allure-2.34.1/lib/allure-generator-2.34.1.jar new file mode 100644 index 0000000..191500d Binary files /dev/null and b/lib/allure-2.34.1/lib/allure-generator-2.34.1.jar differ diff --git a/lib/allure-2.34.1/lib/allure-model-2.29.1.jar b/lib/allure-2.34.1/lib/allure-model-2.29.1.jar new file mode 100644 index 0000000..d00c322 Binary files /dev/null and b/lib/allure-2.34.1/lib/allure-model-2.29.1.jar differ diff --git a/lib/allure-2.34.1/lib/allure-plugin-api-2.34.1.jar b/lib/allure-2.34.1/lib/allure-plugin-api-2.34.1.jar new file mode 100644 index 0000000..2cb0626 Binary files /dev/null and b/lib/allure-2.34.1/lib/allure-plugin-api-2.34.1.jar differ diff --git a/lib/allure-2.22.0/lib/allure1-model-1.0.jar b/lib/allure-2.34.1/lib/allure1-model-1.0.jar similarity index 100% rename from lib/allure-2.22.0/lib/allure1-model-1.0.jar rename to lib/allure-2.34.1/lib/allure1-model-1.0.jar diff --git a/lib/allure-2.22.0/lib/annotations-15.0.jar b/lib/allure-2.34.1/lib/annotations-15.0.jar similarity index 100% rename from lib/allure-2.22.0/lib/annotations-15.0.jar rename to lib/allure-2.34.1/lib/annotations-15.0.jar diff --git a/lib/allure-2.34.1/lib/commons-beanutils-1.11.0.jar b/lib/allure-2.34.1/lib/commons-beanutils-1.11.0.jar new file mode 100644 index 0000000..6b7b993 Binary files /dev/null and b/lib/allure-2.34.1/lib/commons-beanutils-1.11.0.jar differ diff --git a/lib/allure-2.22.0/lib/commons-codec-1.11.jar b/lib/allure-2.34.1/lib/commons-codec-1.11.jar similarity index 100% rename from lib/allure-2.22.0/lib/commons-codec-1.11.jar rename to lib/allure-2.34.1/lib/commons-codec-1.11.jar diff --git a/lib/allure-2.22.0/lib/commons-collections-3.2.2.jar b/lib/allure-2.34.1/lib/commons-collections-3.2.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/commons-collections-3.2.2.jar rename to lib/allure-2.34.1/lib/commons-collections-3.2.2.jar diff --git a/lib/allure-2.34.1/lib/commons-collections4-4.5.0.jar b/lib/allure-2.34.1/lib/commons-collections4-4.5.0.jar new file mode 100644 index 0000000..aa1c4ef Binary files /dev/null and b/lib/allure-2.34.1/lib/commons-collections4-4.5.0.jar differ diff --git a/lib/allure-2.34.1/lib/commons-io-2.19.0.jar b/lib/allure-2.34.1/lib/commons-io-2.19.0.jar new file mode 100644 index 0000000..38e7fd2 Binary files /dev/null and b/lib/allure-2.34.1/lib/commons-io-2.19.0.jar differ diff --git a/lib/allure-2.34.1/lib/commons-lang3-3.17.0.jar b/lib/allure-2.34.1/lib/commons-lang3-3.17.0.jar new file mode 100644 index 0000000..f6486b4 Binary files /dev/null and b/lib/allure-2.34.1/lib/commons-lang3-3.17.0.jar differ diff --git a/lib/allure-2.34.1/lib/commons-logging-1.3.5.jar b/lib/allure-2.34.1/lib/commons-logging-1.3.5.jar new file mode 100644 index 0000000..75d93a1 Binary files /dev/null and b/lib/allure-2.34.1/lib/commons-logging-1.3.5.jar differ diff --git a/lib/allure-2.34.1/lib/commons-text-1.11.0.jar b/lib/allure-2.34.1/lib/commons-text-1.11.0.jar new file mode 100644 index 0000000..7815497 Binary files /dev/null and b/lib/allure-2.34.1/lib/commons-text-1.11.0.jar differ diff --git a/lib/allure-2.22.0/lib/config/jetty-logging.properties b/lib/allure-2.34.1/lib/config/jetty-logging.properties similarity index 100% rename from lib/allure-2.22.0/lib/config/jetty-logging.properties rename to lib/allure-2.34.1/lib/config/jetty-logging.properties diff --git a/lib/allure-2.22.0/lib/config/logback.xml b/lib/allure-2.34.1/lib/config/logback.xml similarity index 100% rename from lib/allure-2.22.0/lib/config/logback.xml rename to lib/allure-2.34.1/lib/config/logback.xml diff --git a/lib/allure-2.22.0/lib/flexmark-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-ext-tables-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-ext-tables-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-ext-tables-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-ext-tables-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-ast-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-ast-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-ast-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-ast-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-builder-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-builder-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-builder-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-builder-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-collection-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-collection-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-collection-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-collection-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-data-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-data-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-data-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-data-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-dependency-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-dependency-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-dependency-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-dependency-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-format-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-format-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-format-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-format-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-html-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-html-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-html-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-html-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-misc-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-misc-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-misc-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-misc-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-options-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-options-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-options-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-options-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-sequence-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-sequence-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-sequence-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-sequence-0.62.2.jar diff --git a/lib/allure-2.22.0/lib/flexmark-util-visitor-0.62.2.jar b/lib/allure-2.34.1/lib/flexmark-util-visitor-0.62.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/flexmark-util-visitor-0.62.2.jar rename to lib/allure-2.34.1/lib/flexmark-util-visitor-0.62.2.jar diff --git a/lib/allure-2.34.1/lib/freemarker-2.3.34.jar b/lib/allure-2.34.1/lib/freemarker-2.3.34.jar new file mode 100644 index 0000000..0c32491 Binary files /dev/null and b/lib/allure-2.34.1/lib/freemarker-2.3.34.jar differ diff --git a/lib/allure-2.22.0/lib/httpclient-4.5.14.jar b/lib/allure-2.34.1/lib/httpclient-4.5.14.jar similarity index 100% rename from lib/allure-2.22.0/lib/httpclient-4.5.14.jar rename to lib/allure-2.34.1/lib/httpclient-4.5.14.jar diff --git a/lib/allure-2.22.0/lib/httpcore-4.4.16.jar b/lib/allure-2.34.1/lib/httpcore-4.4.16.jar similarity index 100% rename from lib/allure-2.22.0/lib/httpcore-4.4.16.jar rename to lib/allure-2.34.1/lib/httpcore-4.4.16.jar diff --git a/lib/allure-2.34.1/lib/jackson-annotations-2.19.1.jar b/lib/allure-2.34.1/lib/jackson-annotations-2.19.1.jar new file mode 100644 index 0000000..3ec711b Binary files /dev/null and b/lib/allure-2.34.1/lib/jackson-annotations-2.19.1.jar differ diff --git a/lib/allure-2.34.1/lib/jackson-core-2.19.1.jar b/lib/allure-2.34.1/lib/jackson-core-2.19.1.jar new file mode 100644 index 0000000..aee4e1b Binary files /dev/null and b/lib/allure-2.34.1/lib/jackson-core-2.19.1.jar differ diff --git a/lib/allure-2.34.1/lib/jackson-databind-2.19.1.jar b/lib/allure-2.34.1/lib/jackson-databind-2.19.1.jar new file mode 100644 index 0000000..95de60b Binary files /dev/null and b/lib/allure-2.34.1/lib/jackson-databind-2.19.1.jar differ diff --git a/lib/allure-2.34.1/lib/jackson-dataformat-xml-2.19.1.jar b/lib/allure-2.34.1/lib/jackson-dataformat-xml-2.19.1.jar new file mode 100644 index 0000000..ce0f1ac Binary files /dev/null and b/lib/allure-2.34.1/lib/jackson-dataformat-xml-2.19.1.jar differ diff --git a/lib/allure-2.34.1/lib/jackson-dataformat-yaml-2.19.1.jar b/lib/allure-2.34.1/lib/jackson-dataformat-yaml-2.19.1.jar new file mode 100644 index 0000000..b277085 Binary files /dev/null and b/lib/allure-2.34.1/lib/jackson-dataformat-yaml-2.19.1.jar differ diff --git a/lib/allure-2.34.1/lib/jackson-module-jaxb-annotations-2.19.1.jar b/lib/allure-2.34.1/lib/jackson-module-jaxb-annotations-2.19.1.jar new file mode 100644 index 0000000..0043f38 Binary files /dev/null and b/lib/allure-2.34.1/lib/jackson-module-jaxb-annotations-2.19.1.jar differ diff --git a/lib/allure-2.22.0/lib/jakarta.activation-api-1.2.2.jar b/lib/allure-2.34.1/lib/jakarta.activation-api-1.2.2.jar similarity index 100% rename from lib/allure-2.22.0/lib/jakarta.activation-api-1.2.2.jar rename to lib/allure-2.34.1/lib/jakarta.activation-api-1.2.2.jar diff --git a/lib/allure-2.22.0/lib/javax.activation-api-1.2.0.jar b/lib/allure-2.34.1/lib/javax.activation-api-1.2.0.jar similarity index 100% rename from lib/allure-2.22.0/lib/javax.activation-api-1.2.0.jar rename to lib/allure-2.34.1/lib/javax.activation-api-1.2.0.jar diff --git a/lib/allure-2.22.0/lib/jaxb-api-2.3.1.jar b/lib/allure-2.34.1/lib/jaxb-api-2.3.1.jar similarity index 100% rename from lib/allure-2.22.0/lib/jaxb-api-2.3.1.jar rename to lib/allure-2.34.1/lib/jaxb-api-2.3.1.jar diff --git a/lib/allure-2.22.0/lib/jaxb-utils-1.0.jar b/lib/allure-2.34.1/lib/jaxb-utils-1.0.jar similarity index 100% rename from lib/allure-2.22.0/lib/jaxb-utils-1.0.jar rename to lib/allure-2.34.1/lib/jaxb-utils-1.0.jar diff --git a/lib/allure-2.22.0/lib/jcommander-1.82.jar b/lib/allure-2.34.1/lib/jcommander-1.82.jar similarity index 100% rename from lib/allure-2.22.0/lib/jcommander-1.82.jar rename to lib/allure-2.34.1/lib/jcommander-1.82.jar diff --git a/lib/allure-2.34.1/lib/logback-classic-1.3.15.jar b/lib/allure-2.34.1/lib/logback-classic-1.3.15.jar new file mode 100644 index 0000000..9ec674a Binary files /dev/null and b/lib/allure-2.34.1/lib/logback-classic-1.3.15.jar differ diff --git a/lib/allure-2.22.0/lib/logback-core-1.3.5.jar b/lib/allure-2.34.1/lib/logback-core-1.3.15.jar similarity index 52% rename from lib/allure-2.22.0/lib/logback-core-1.3.5.jar rename to lib/allure-2.34.1/lib/logback-core-1.3.15.jar index 98d3be5..c3d738e 100644 Binary files a/lib/allure-2.22.0/lib/logback-core-1.3.5.jar and b/lib/allure-2.34.1/lib/logback-core-1.3.15.jar differ diff --git a/lib/allure-2.34.1/lib/opencsv-5.9.jar b/lib/allure-2.34.1/lib/opencsv-5.9.jar new file mode 100644 index 0000000..de5fe04 Binary files /dev/null and b/lib/allure-2.34.1/lib/opencsv-5.9.jar differ diff --git a/lib/allure-2.22.0/lib/properties-2.0.RC5.jar b/lib/allure-2.34.1/lib/properties-2.0.RC5.jar similarity index 100% rename from lib/allure-2.22.0/lib/properties-2.0.RC5.jar rename to lib/allure-2.34.1/lib/properties-2.0.RC5.jar diff --git a/lib/allure-2.34.1/lib/slf4j-api-2.0.17.jar b/lib/allure-2.34.1/lib/slf4j-api-2.0.17.jar new file mode 100644 index 0000000..26b1545 Binary files /dev/null and b/lib/allure-2.34.1/lib/slf4j-api-2.0.17.jar differ diff --git a/lib/allure-2.34.1/lib/snakeyaml-2.4.jar b/lib/allure-2.34.1/lib/snakeyaml-2.4.jar new file mode 100644 index 0000000..697acde Binary files /dev/null and b/lib/allure-2.34.1/lib/snakeyaml-2.4.jar differ diff --git a/lib/allure-2.22.0/lib/stax2-api-4.2.1.jar b/lib/allure-2.34.1/lib/stax2-api-4.2.2.jar similarity index 83% rename from lib/allure-2.22.0/lib/stax2-api-4.2.1.jar rename to lib/allure-2.34.1/lib/stax2-api-4.2.2.jar index 28c6a08..cc5844f 100644 Binary files a/lib/allure-2.22.0/lib/stax2-api-4.2.1.jar and b/lib/allure-2.34.1/lib/stax2-api-4.2.2.jar differ diff --git a/lib/allure-2.22.0/lib/tika-core-2.6.0.jar b/lib/allure-2.34.1/lib/tika-core-2.9.4.jar similarity index 57% rename from lib/allure-2.22.0/lib/tika-core-2.6.0.jar rename to lib/allure-2.34.1/lib/tika-core-2.9.4.jar index b97ad1a..adf4cf2 100644 Binary files a/lib/allure-2.22.0/lib/tika-core-2.6.0.jar and b/lib/allure-2.34.1/lib/tika-core-2.9.4.jar differ diff --git a/lib/allure-2.34.1/lib/woodstox-core-7.1.1.jar b/lib/allure-2.34.1/lib/woodstox-core-7.1.1.jar new file mode 100644 index 0000000..92c1631 Binary files /dev/null and b/lib/allure-2.34.1/lib/woodstox-core-7.1.1.jar differ diff --git a/lib/allure-2.22.0/plugins/README.txt b/lib/allure-2.34.1/plugins/README.txt similarity index 100% rename from lib/allure-2.22.0/plugins/README.txt rename to lib/allure-2.34.1/plugins/README.txt diff --git a/lib/allure-2.22.0/plugins/behaviors-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/behaviors-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/behaviors-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/behaviors-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/behaviors-plugin/behaviors-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/behaviors-plugin/behaviors-plugin-2.34.1.jar new file mode 100644 index 0000000..75aa25e Binary files /dev/null and b/lib/allure-2.34.1/plugins/behaviors-plugin/behaviors-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/behaviors-plugin/static/index.js b/lib/allure-2.34.1/plugins/behaviors-plugin/static/index.js similarity index 74% rename from lib/allure-2.22.0/plugins/behaviors-plugin/static/index.js rename to lib/allure-2.34.1/plugins/behaviors-plugin/static/index.js index afa463b..5ff173c 100644 --- a/lib/allure-2.22.0/plugins/behaviors-plugin/static/index.js +++ b/lib/allure-2.34.1/plugins/behaviors-plugin/static/index.js @@ -168,6 +168,20 @@ allure.api.addTranslation('pl', { } }); +allure.api.addTranslation('am', { + tab: { + behaviors: { + name: 'Վարքագծեր' + } + }, + widget: { + behaviors: { + name: 'Ֆիչրները ըստ պատմությունների', + showAll: 'ցույց տալ բոլորը' + } + } +}); + allure.api.addTranslation('az', { tab: { behaviors: { @@ -182,6 +196,62 @@ allure.api.addTranslation('az', { } }); +allure.api.addTranslation('sv', { + tab: { + behaviors: { + name: 'Beteenden' + } + }, + widget: { + behaviors: { + name: 'Funktioner efter user stories', + showAll: 'visa allt' + } + } +}); + +allure.api.addTranslation('isv', { + tab: { + behaviors: { + name: 'Funkcionalnost', + } + }, + widget: { + behaviors: { + name: 'Funkcionalnost', + showAll: 'pokaži vsěčto', + } + } +}); + +allure.api.addTranslation('ka', { + tab: { + behaviors: { + name: 'ფუნქციონალი', + } + }, + widget: { + behaviors: { + name: 'ფუნქციონალი', + showAll: 'ყველას ჩვენება', + } + } +}); + +allure.api.addTranslation('it', { + tab: { + behaviors: { + name: 'Comportamenti' + } + }, + widget: { + behaviors: { + name: 'Funzionalità per storie', + showAll: 'Mostra tutto' + } + } +}); + allure.api.addTab('behaviors', { title: 'tab.behaviors.name', icon: 'fa fa-list', route: 'behaviors(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', diff --git a/lib/allure-2.22.0/plugins/custom-logo-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/custom-logo-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/custom-logo-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/custom-logo-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/custom-logo-plugin/custom-logo-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/custom-logo-plugin/custom-logo-plugin-2.34.1.jar new file mode 100644 index 0000000..08debd9 Binary files /dev/null and b/lib/allure-2.34.1/plugins/custom-logo-plugin/custom-logo-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/custom-logo-plugin/static/custom-logo.svg b/lib/allure-2.34.1/plugins/custom-logo-plugin/static/custom-logo.svg similarity index 100% rename from lib/allure-2.22.0/plugins/custom-logo-plugin/static/custom-logo.svg rename to lib/allure-2.34.1/plugins/custom-logo-plugin/static/custom-logo.svg diff --git a/lib/allure-2.22.0/plugins/custom-logo-plugin/static/logo.svg b/lib/allure-2.34.1/plugins/custom-logo-plugin/static/logo.svg similarity index 100% rename from lib/allure-2.22.0/plugins/custom-logo-plugin/static/logo.svg rename to lib/allure-2.34.1/plugins/custom-logo-plugin/static/logo.svg diff --git a/lib/allure-2.34.1/plugins/custom-logo-plugin/static/styles.css b/lib/allure-2.34.1/plugins/custom-logo-plugin/static/styles.css new file mode 100644 index 0000000..aa7cc82 --- /dev/null +++ b/lib/allure-2.34.1/plugins/custom-logo-plugin/static/styles.css @@ -0,0 +1,14 @@ +/*.side-nav__brand {*/ +/* background: url('custom-logo.svg') no-repeat left center !important;*/ +/* margin-left: 10px;*/ +/*}*/ +.side-nav__brand { + background: url('logo.svg') no-repeat left center !important; + margin-left: 10px; + height: 65px; + width: 150px; + background-size: contain !important; + } + .side-nav__brand span{ + display: none; + } \ No newline at end of file diff --git a/lib/allure-2.22.0/plugins/jira-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/jira-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/jira-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/jira-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/jira-plugin/jira-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/jira-plugin/jira-plugin-2.34.1.jar new file mode 100644 index 0000000..e405e0d Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/jira-plugin-2.34.1.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/allure-jira-commons-2.34.1.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/allure-jira-commons-2.34.1.jar new file mode 100644 index 0000000..15e61a1 Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/allure-jira-commons-2.34.1.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/annotations-13.0.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/annotations-13.0.jar new file mode 100644 index 0000000..fb794be Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/annotations-13.0.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/converter-jackson-3.0.0.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/converter-jackson-3.0.0.jar new file mode 100644 index 0000000..b0ed20d Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/converter-jackson-3.0.0.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-annotations-2.19.1.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-annotations-2.19.1.jar new file mode 100644 index 0000000..3ec711b Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-annotations-2.19.1.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-core-2.19.1.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-core-2.19.1.jar new file mode 100644 index 0000000..aee4e1b Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-core-2.19.1.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-databind-2.19.1.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-databind-2.19.1.jar new file mode 100644 index 0000000..95de60b Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/jackson-databind-2.19.1.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-2.1.21.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-2.1.21.jar new file mode 100644 index 0000000..c144752 Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-2.1.21.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-jdk7-1.9.10.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-jdk7-1.9.10.jar new file mode 100644 index 0000000..ff0bce5 Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-jdk7-1.9.10.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-jdk8-1.9.10.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-jdk8-1.9.10.jar new file mode 100644 index 0000000..5fa6ce9 Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/kotlin-stdlib-jdk8-1.9.10.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/okhttp-4.12.0.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/okhttp-4.12.0.jar new file mode 100644 index 0000000..faf3fa8 Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/okhttp-4.12.0.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/okio-jvm-3.6.0.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/okio-jvm-3.6.0.jar new file mode 100644 index 0000000..ec8ad90 Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/okio-jvm-3.6.0.jar differ diff --git a/lib/allure-2.34.1/plugins/jira-plugin/lib/retrofit-3.0.0.jar b/lib/allure-2.34.1/plugins/jira-plugin/lib/retrofit-3.0.0.jar new file mode 100644 index 0000000..0c9bd8e Binary files /dev/null and b/lib/allure-2.34.1/plugins/jira-plugin/lib/retrofit-3.0.0.jar differ diff --git a/lib/allure-2.22.0/plugins/junit-xml-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/junit-xml-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/junit-xml-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/junit-xml-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/junit-xml-plugin/junit-xml-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/junit-xml-plugin/junit-xml-plugin-2.34.1.jar new file mode 100644 index 0000000..bbcbdd8 Binary files /dev/null and b/lib/allure-2.34.1/plugins/junit-xml-plugin/junit-xml-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/packages-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/packages-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/packages-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/packages-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/packages-plugin/packages-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/packages-plugin/packages-plugin-2.34.1.jar new file mode 100644 index 0000000..1c1063b Binary files /dev/null and b/lib/allure-2.34.1/plugins/packages-plugin/packages-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/packages-plugin/static/index.js b/lib/allure-2.34.1/plugins/packages-plugin/static/index.js similarity index 77% rename from lib/allure-2.22.0/plugins/packages-plugin/static/index.js rename to lib/allure-2.34.1/plugins/packages-plugin/static/index.js index cbc55c0..b71233a 100644 --- a/lib/allure-2.22.0/plugins/packages-plugin/static/index.js +++ b/lib/allure-2.34.1/plugins/packages-plugin/static/index.js @@ -96,6 +96,14 @@ allure.api.addTranslation('pl', { } }); +allure.api.addTranslation('am', { + tab: { + packages: { + name: 'Փաթեթներ' + } + } +}); + allure.api.addTranslation('az', { tab: { packages: { @@ -104,6 +112,38 @@ allure.api.addTranslation('az', { } }); +allure.api.addTranslation('sv', { + tab: { + packages: { + name: 'Paket' + } + } +}); + +allure.api.addTranslation('isv', { + tab: { + packages: { + name: 'Pakety' + } + } +}); + +allure.api.addTranslation('ka', { + tab: { + packages: { + name: 'პაკეტები' + } + } +}); + +allure.api.addTranslation('it', { + tab: { + packages: { + name: 'Pacchetti' + } + } +}); + allure.api.addTab('packages', { title: 'tab.packages.name', icon: 'fa fa-align-left', route: 'packages(/)(:testGroup)(/)(:testResult)(/)(:testResultTab)(/)', diff --git a/lib/allure-2.22.0/plugins/screen-diff-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/screen-diff-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/screen-diff-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/screen-diff-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/screen-diff-plugin/screen-diff-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/screen-diff-plugin/screen-diff-plugin-2.34.1.jar new file mode 100644 index 0000000..6e28d67 Binary files /dev/null and b/lib/allure-2.34.1/plugins/screen-diff-plugin/screen-diff-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/screen-diff-plugin/static/index.js b/lib/allure-2.34.1/plugins/screen-diff-plugin/static/index.js similarity index 100% rename from lib/allure-2.22.0/plugins/screen-diff-plugin/static/index.js rename to lib/allure-2.34.1/plugins/screen-diff-plugin/static/index.js diff --git a/lib/allure-2.22.0/plugins/screen-diff-plugin/static/styles.css b/lib/allure-2.34.1/plugins/screen-diff-plugin/static/styles.css similarity index 100% rename from lib/allure-2.22.0/plugins/screen-diff-plugin/static/styles.css rename to lib/allure-2.34.1/plugins/screen-diff-plugin/static/styles.css diff --git a/lib/allure-2.22.0/plugins/trx-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/trx-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/trx-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/trx-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/trx-plugin/trx-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/trx-plugin/trx-plugin-2.34.1.jar new file mode 100644 index 0000000..e9991b6 Binary files /dev/null and b/lib/allure-2.34.1/plugins/trx-plugin/trx-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/xctest-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/xctest-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/xctest-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/xctest-plugin/allure-plugin.yml diff --git a/lib/allure-2.22.0/plugins/xctest-plugin/lib/xmlwise-1.2.11.jar b/lib/allure-2.34.1/plugins/xctest-plugin/lib/xmlwise-1.2.11.jar similarity index 100% rename from lib/allure-2.22.0/plugins/xctest-plugin/lib/xmlwise-1.2.11.jar rename to lib/allure-2.34.1/plugins/xctest-plugin/lib/xmlwise-1.2.11.jar diff --git a/lib/allure-2.34.1/plugins/xctest-plugin/xctest-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/xctest-plugin/xctest-plugin-2.34.1.jar new file mode 100644 index 0000000..78276cd Binary files /dev/null and b/lib/allure-2.34.1/plugins/xctest-plugin/xctest-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/xray-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/xray-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/xray-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/xray-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/allure-jira-commons-2.34.1.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/allure-jira-commons-2.34.1.jar new file mode 100644 index 0000000..15e61a1 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/allure-jira-commons-2.34.1.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/annotations-13.0.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/annotations-13.0.jar new file mode 100644 index 0000000..fb794be Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/annotations-13.0.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/converter-jackson-3.0.0.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/converter-jackson-3.0.0.jar new file mode 100644 index 0000000..b0ed20d Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/converter-jackson-3.0.0.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-annotations-2.19.1.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-annotations-2.19.1.jar new file mode 100644 index 0000000..3ec711b Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-annotations-2.19.1.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-core-2.19.1.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-core-2.19.1.jar new file mode 100644 index 0000000..aee4e1b Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-core-2.19.1.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-databind-2.19.1.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-databind-2.19.1.jar new file mode 100644 index 0000000..95de60b Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/jackson-databind-2.19.1.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-2.1.21.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-2.1.21.jar new file mode 100644 index 0000000..c144752 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-2.1.21.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-jdk7-1.9.10.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-jdk7-1.9.10.jar new file mode 100644 index 0000000..ff0bce5 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-jdk7-1.9.10.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-jdk8-1.9.10.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-jdk8-1.9.10.jar new file mode 100644 index 0000000..5fa6ce9 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/kotlin-stdlib-jdk8-1.9.10.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/okhttp-4.12.0.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/okhttp-4.12.0.jar new file mode 100644 index 0000000..faf3fa8 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/okhttp-4.12.0.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/okio-jvm-3.6.0.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/okio-jvm-3.6.0.jar new file mode 100644 index 0000000..ec8ad90 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/okio-jvm-3.6.0.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/lib/retrofit-3.0.0.jar b/lib/allure-2.34.1/plugins/xray-plugin/lib/retrofit-3.0.0.jar new file mode 100644 index 0000000..0c9bd8e Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/lib/retrofit-3.0.0.jar differ diff --git a/lib/allure-2.34.1/plugins/xray-plugin/xray-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/xray-plugin/xray-plugin-2.34.1.jar new file mode 100644 index 0000000..b73243d Binary files /dev/null and b/lib/allure-2.34.1/plugins/xray-plugin/xray-plugin-2.34.1.jar differ diff --git a/lib/allure-2.22.0/plugins/xunit-xml-plugin/allure-plugin.yml b/lib/allure-2.34.1/plugins/xunit-xml-plugin/allure-plugin.yml similarity index 100% rename from lib/allure-2.22.0/plugins/xunit-xml-plugin/allure-plugin.yml rename to lib/allure-2.34.1/plugins/xunit-xml-plugin/allure-plugin.yml diff --git a/lib/allure-2.34.1/plugins/xunit-xml-plugin/xunit-xml-plugin-2.34.1.jar b/lib/allure-2.34.1/plugins/xunit-xml-plugin/xunit-xml-plugin-2.34.1.jar new file mode 100644 index 0000000..ff167b0 Binary files /dev/null and b/lib/allure-2.34.1/plugins/xunit-xml-plugin/xunit-xml-plugin-2.34.1.jar differ diff --git a/run.py b/run.py index e3f7845..feb9d13 100644 --- a/run.py +++ b/run.py @@ -46,7 +46,7 @@ from common.files_utils.files_handle import load_yaml_file from utils.case_generate_utils.case_fun_generate import generate_cases from utils.report_utils.send_result_handle import send_result from settings import BASE_DIR, REPORT_DIR, LOG_DIR, ENV_DIR, ALLURE_RESULTS_DIR, ALLURE_HTML_DIR, AUTO_CASE_DIR, \ - ALLURE_CONFIG_DIR + ALLURE_CONFIG_DIR, LIB_DIR from settings import LOG_LEVEL, GLOBAL_VARS, REPORT, RERUN, RERUN_DELAY, MAX_FAIL from common.logger_utils.loguru_log import capture_logs from utils.report_utils.allure_handle import generate_allure_report @@ -73,7 +73,6 @@ def run(env, m, report): |_| Starting {datetime.now().strftime("%Y-%m-%d %H:%M:%S")} ... ... ... """) - # ------------------------ 处理一下获取到的参数---------------------------- # # 根据指定的环境参数,将运行环境所需相关配置数据保存到GLOBAL_VARS env_file = os.path.join(ENV_DIR, f"{env}.yml") if os.path.exists( diff --git a/test_case/conftest.py b/test_case/conftest.py index 56d7e6d..f0a4d0e 100644 --- a/test_case/conftest.py +++ b/test_case/conftest.py @@ -24,11 +24,11 @@ def case_control(request): # 使用 request.getfixturevalue() 方法来获取测试用例函数的参数值 # 注意这里的"case"需要与@pytest.mark.parametrize("case", cases)中传递的保持一致 case = request.getfixturevalue("case") - logger.info(f"\n-----------------------------START-开始执行用例- {case.get("id")} || {case.get("title")}-----------------------------") + logger.info(f'\n-----------------------------START-开始执行用例- {case.get("id")} || {case.get("title")}-----------------------------') # 添加用例标题作为allure中显示的用例标题 allure_title(case.get("title", "")) if case.get("run") is None or case.get("run") is False: - reason = f"{case.get("id")} || {case.get("title")}: 标记了该用例不执行(run=False)。" + reason = f"{case.get('id')} || {case.get('title')}: 标记了该用例不执行(run=False)。" logger.warning(f"{reason}") pytest.skip(reason) yield diff --git a/utils/report_utils/allure_handle.py b/utils/report_utils/allure_handle.py index f174e73..b600923 100644 --- a/utils/report_utils/allure_handle.py +++ b/utils/report_utils/allure_handle.py @@ -8,6 +8,7 @@ # 标准库导入 import os import json +import subprocess # 第三方库导入 import allure # 本地应用/模块导入 @@ -178,10 +179,38 @@ def generate_allure_report(**kwargs): """ allure_results_dir = kwargs.get("allure_results") allure_report_dir = kwargs.get("allure_report") + if os.path.exists(allure_results_dir): + print(f"{allure_results_dir} exists!") + if os.listdir(allure_results_dir): + print(f"{allure_results_dir} - allure测试结果集目录正确生成,可以生成allure html报告!") + else: + print(f"{allure_results_dir} - allure测试结果集目录未正确生成,,无法生成allure html报告!") + else: + print(f"{allure_results_dir} - allure测试结果集目录未生成,无法生成allure html报告!") # ----------------判断运行的平台,是linux还是windows,执行不同的allure命令---------------- cmd = f"{PlatformHandle().allure} generate {allure_results_dir} -o {allure_report_dir} --clean" # 如果html报告没有生成,请检查下是否正确安装jdk(最好默认安装,不要自定义路径);安装完成后,要注意重启pycharm - os.popen(cmd).read() + try: + # subprocess.run 会等待命令执行完成 + result = subprocess.run( + cmd, + shell=True, # 允许字符串命令 + check=True, # 出错会抛异常 + stdout=subprocess.PIPE, # 捕获标准输出 + stderr=subprocess.PIPE, # 捕获错误输出 + text=True # 输出为字符串(而不是字节) + ) + print( + f"执行命令[{PlatformHandle().allure} generate {allure_results_dir} -o {allure_report_dir} --clean]:{result.stdout}") # 正常日志 + print(result.stdout) # 正常日志 + if result.stderr: + print(f"⚠️ Allure 生成报告时有警告/错误:{result.stderr}") + except subprocess.CalledProcessError as e: + print("❌ Allure 报告生成失败!") + print("命令:", e.cmd) + print("返回码:", e.returncode) + print("错误输出:", e.stderr) + raise # 把异常抛出去,外层能感知失败 # ----------------美化allure测试报告 ------------------------------------------ # 设置打开的 Allure 报告的浏览器窗口标题文案 allure_beautiful = AllureReportBeautiful(allure_html_path=allure_report_dir, allure_results_path=allure_results_dir) diff --git a/utils/report_utils/platform_handle.py b/utils/report_utils/platform_handle.py index 5a07e5a..b6d15b7 100644 --- a/utils/report_utils/platform_handle.py +++ b/utils/report_utils/platform_handle.py @@ -9,6 +9,7 @@ # 标准库导入 import os.path import platform +import subprocess # 本地应用/模块导入 from settings import LIB_DIR @@ -23,7 +24,27 @@ class PlatformHandle: allure_path = os.path.join(allure_bin, "allure.bat") else: allure_path = os.path.join(allure_bin, "allure") - os.popen(f"chmod +x {allure_path}").read() + # os.popen(f"chmod +x {allure_path}").read() + cmd = f"chmod +x {allure_path}" + try: + # subprocess.run 会等待命令执行完成 + result = subprocess.run( + cmd, + shell=True, # 允许字符串命令 + check=True, # 出错会抛异常 + stdout=subprocess.PIPE, # 捕获标准输出 + stderr=subprocess.PIPE, # 捕获错误输出 + text=True # 输出为字符串(而不是字节) + ) + print(f"执行命令[chmod +x {allure_path}]:{result.stdout}") # 正常日志 + if result.stderr: + print(f"⚠️ 执行命令[chmod +x {allure_path}]时有警告/错误:{result.stderr}") + except subprocess.CalledProcessError as e: + print(f"❌ 执行命令[chmod +x {allure_path}] 失败!") + print("命令:", e.cmd) + print("返回码:", e.returncode) + print("错误输出:", e.stderr) + raise # 把异常抛出去,外层能感知失败 return allure_path