我正在按照这个指令获取一个图像,以显示在我的Gitlab管道JUnit测试中:
https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html#view-junit-screenshots-on-gitlab
我已经创建了一个管道,其中包含如下代码来创建管道作业
GitlabJob:
extends: .SomeGitLabJob
variables:
SomeVariable: "SomeVariable"
artifacts:
when: on_success
paths:
- my/file/location/*.png
reports:
junit: my/other/location/TestRun.xml
字符串
JUnit XML文件如下所示:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<testsuites>
<testsuite errors="0" failures="0" name="Test" skipped="0" tests="1" time="10.5401">
<testcase classname="Test" name="Test" time="10.5401">
<system-out>
[[ATTACHMENT|my/file/location/picture.png]]
</system-out>
</testcase>
</testsuite>
</testsuites>
型
根据我所读到的内容,我希望测试结果的输出应该包含图像。但是,当我运行管道作业时,图像不在那里。管道运行正常,单元测试列在“测试”部分,但图像不是其中的一部分。
我认为我的语法在XML文件中是错误的,但我还没有看到在Gitlab或任何其他位置的说明中编写它的一致方法。我已经尝试了几种变体(是否包括单词“附件”,使用不同的文件路径位置),但没有任何变化。我在这里写的方式似乎是最接近我所看到的。这是包含附件的正确方式吗?
1条答案
按热度按时间moiiocjp1#
我认为附件仅显示故障或错误状态。