【问题标题】:How to set up ScrutinizerCI for running NightwatchJS UI tests如何设置 Scrutinizer CI 以运行 Nightwatch JS UI 测试
【发布时间】:2019-05-29 14:33:54
【问题描述】:
因此,我们公司正在使用 Scrutinizer CI (https://scrutinizer-ci.com/) 进行 Python 代码分析/覆盖。
但我们还需要设置 Scrutinizer CI 来运行 NightwatchJS UI 测试。
我已经阅读了 Scrutinizer 手册,但没有详细的指南如何设置它以运行 UI 测试。有一些关于 Selenium 的信息,但对我们来说并非如此,NightwatchJS 不使用 Selenium。任何帮助将不胜感激。
【问题讨论】:
标签:
continuous-integration
nightwatch.js
scrutinizer
【解决方案1】:
好的,我已经弄清楚了。如果您想在 Scrutinizer 中运行 JS 测试,您需要将其粘贴到存储库的配置部分。之后,更新配置并安排检查。
checks:
javascript:
no_var: false
no_else_return: true
build:
nodes:
coverage:
tests:
override:
- js-scrutinizer-run
- command: 'npm install npm@latest -g'
- command: 'npm init --yes'
- command: 'npm install nightwatch -g'
- command: 'npm install chromedriver --save-dev'
- command: 'nightwatch your_tests.js'
environment:
google_chrome:
use_latest: true
node: v10.14.2