如何使用GitLab和Jenkins设置量角器 [英] How to SetUp Protractor with GitLab and Jenkins

查看:131
本文介绍了如何使用GitLab和Jenkins设置量角器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请让我知道是否有人尝试将量角器与Jenkins集成.

Please let me know if anyone have tried integration of protractor with Jenkins.

此致

马南

推荐答案

与jenkins的集成相对简单.最大的障碍是确保装有Jenkins的盒子是最新的,并具有所需的资源.如果要在jenkins上的Firefox中进行测试-您将需要安装 XVFB .幸运的是,有一个用于此的插件: https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

Integration with jenkins is relatively simple. The biggest hurdle is ensuring that the boxes which have Jenkins installed are up to date and have the required resources. If you want to test in Firefox on jenkins - you will need XVFB installed. Luckily for you, there is a plugin for that: https://wiki.jenkins-ci.org/display/JENKINS/Xvfb+Plugin

运行 protractor protractor.js.conf 会返回0或1,具体取决于成功或失败.在shell脚本中运行该命令.詹金斯(Jenkins)将根据工作的结果来决定工作的通过或失败.

Running protractor protractor.js.conf will return a 0 or a 1 depending on success or failure. Run that command in shell script. Jenkins will take care of passing or failing the job depending on the outcome of the job.

也可以使用junit输出将其很好地整合到jenkins中,只需确保设置post build步骤以读取它即可.我认为它将xml文件输出到reports/目录.

Also using the junit output will incorporate nicely into jenkins, just make sure to setup the post build step to read it. I think it will output the xml files into the reports/ directory.

这篇关于如何使用GitLab和Jenkins设置量角器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆