如何绑定Jenkins生成输出与testing结果?
我正在设置自动protractor
testing,在jenkins
的帮助下,在jenkins
容器中jenkins
。 但是没有能够使jenkins
成果反映出testing结果(如果一些testing失败,构build也应该失败)。
重要的是要说所有的testing都应该运行,即使第一个testing失败。
testing是由docker-compose up --abort-on-container-exit
,我的docker-compose up --abort-on-container-exit
-compose文件如下所示:
version: '2' services: selenium: image: selenium/standalone-chrome ports: - 4444:4444 volumes: - /dev/shm:/dev/shm protractor: volumes: - ./reporting:/assets/reporting image: protractor-test command: "dockerize -wait http://selenium:4444 -timeout 60m protractor /assets/conf.js"
看起来你的docker-compose命令无论如何都返回退出代码0。
如何使用Jasmine xunit记者生成testing报告,将生成的xmltesting报告复制到容器外部(使用docker cp
),然后使用Jenkins的构build后操作发布它?
如果xml不存在,那么这个作业将被标记为失败,这意味着在testing运行时期间有错误,或者如果任何testing断言失败,它将被标记为不稳定。