如何解决Jenkins的TAP插件
我正在尝试让jenkins使用TAP插件来使用来自perl / prove的流。我安装了TAP插件,还有junit插件。我不确定在哪里或如何安装tap4j jar,也不确定如何告诉TAP插件流文件的写入位置。
按照TAP插件的文档进行操作,我将其称为“ prove t / --archive output”,它将流写入output / t中的文件中:
1..73
ok 1 - use Records;
ok 2 - An object of class 'Relationship' isa 'Relationship'
ok 3 - Relationship->can('rel_insert')
ok 4 - Relationship->can('rel_get')
ok 5 - An object of class 'Records' isa 'Records'
ok 6 - Records->can('IPND_read_file')
ok 7 - Records->can('IPND_read_all_files')
ok 8 - Records->can('IPND_get_our_numbers')
ok 9 - Records->can('IPND_get_tpg_names')
ok 10 - Records->can('IPND_get_tpg_addresses')
ok 11 - Records->can('IPND_sentence_records')
ok 12 - Records->can('IPND_sentence_a_record')
ok 13 - Records->can('IPND_analyse_count')
ok 14 - Records->can('IPND_match_numbers')
ok 15 - Records->can('IPND_dump_to_json')
ok 16 - Records->can('IPND_read_from_json')
ok 17 - Records->can('IPND_dump_sentence')
ok 18 - Records->can('IPND_report_sentence')
ok 19 - Records->can('IPND_report_categories')
ok 20 - Testing listing status: no bits set
ok 21 - Testing listing status: directory bit set
ok 22 - Testing listing status: directory and suppress bits set
ok 23 - Testing listing status: suppress bit set
ok 24 - Testing Installed status: not a number
ok 25 - Testing Installed status: 0
ok 26 - Testing Installed status: just below range
ok 27 - Testing Installed status: range boundary
ok 28 - Testing Installed status: just above range boundary
ok 29 - Testing Installed status: middle of range
ok 30 - Testing Installed status: just before end of range
ok 31 - Testing Installed status: end of range
ok 32 - Testing Installed status: just after range
ok 33 - Testing Installed status: after range
ok 34 - Testing pair exists: both exist
ok 35 - Testing pair exists: first exists
ok 36 - Testing pair exists: second exists
ok 37 - Testing pair exists: neither exists
ok 38 - Testing pair exists: empty hash
ok 39 - Testing cmp_numbers: same number
ok 40 - Testing cmp_numbers: different number
ok 41 - Testing cmp_strings: same string
ok 42 - Testing cmp_strings: different strings
ok 43 - Testing cmp_strings: same string,different case
ok 44 - Testing cmp_strings: different strings,different case
ok 45 - Testing cmp_strings: same string,different case
ok 46 - Testing cmp_strings: different strings,different case
ok 47 - Testing cmp_strings: same string,different case
ok 48 - Testing _cmp_date: first is undef
ok 49 - Testing _cmp_date: second is undef
ok 50 - Testing _cmp_date: both undef
ok 51 - Testing _cmp_date: first is 0
ok 52 - Testing _cmp_date: second is 0
ok 53 - Testing _cmp_date: both 0
ok 54 - Testing _cmp_date: first dashes
ok 55 - Testing _cmp_date: second dashes
ok 56 - Testing _cmp_date: both dashes
ok 57 - Testing _cmp_date: neither dashes
ok 58 - Testing _cmp_date: dieing on first string
ok 59 - Testing _cmp_date: dieing on second string
ok 60 - Testing _cmp_date: dieing on both strings
ok 61 - Testing _cmp_date: less than
ok 62 - Testing _cmp_date: more than
ok 63 - Testing _cmp_date: equal
ok 64 - Testing _bool_to_text: 0
ok 65 - Testing _bool_to_text: 1
ok 66 - Testing _bool_to_text: -1
ok 67 - Testing _bool_to_text: 250
ok 68 - Testing _functionize_params
ok 69 - Testing _Rtrim: space on end
ok 70 - Testing _Rtrim: tab on end
ok 71 - Testing _Rtrim: space on end and beginning
ok 72 - Testing _Rtrim: space on end and tab on beginning
ok 73 - Testing _extract_field
我没有找到TAP插件的任何配置文件。我也刚刚意识到,tap4j是一个外部jar文件,而不是另一个jenkins插件。我已经下载了罐子,但现在不知道将它放在哪里。
摘要:
- TAP插件配置文件在哪里
- 如何将TAP插件指向输出/ t中的流
- 我将tap4j.jar文件放在哪里以供TAP插件使用。
解决方法
好的晦涩之处在于-即很多假定的知识,但是:
-
我不知道有一个配置文件-仍然找不到。
-
在我的情况下,TAP流文件不在output / t中工作空间的根目录下。在我的Jenkins文件中,放置了一个舞台:
stage('Report') {
steps {
step([$class: "TapPublisher",testResults: "**/output/t/*"])
}
}
关键是告诉插件在哪里可以找到流的最后一位。从字面上看,第一个**表示到处都查找“ output / t”(即目录路径片段),然后在其中将所有内容(最后一个“ *”)视为流文件。
- 可能有很多地方可以用来整理jar文件,但我将其放在“ / plugins / tap /”中。就我而言,在Ubuntu 20.04上是/ var / lib / jenkins / plugins / tap。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。