0

因此,我们公司正在使用 Scrutinizer CI ( https://scrutinizer-ci.com/ ) 进行 Python 代码分析/覆盖。但是我们还需要设置 Scrutinizer CI 来运行 NightwatchJS UI 测试。

我已经阅读了 Scrutinizer 手册,但没有详细的指南如何设置它以运行 UI 测试。有一些关于 Selenium 的信息,但对我们来说并非如此,NightwatchJS 不使用 Selenium。任何帮助将不胜感激。

4

1 回答 1

0

好的,所以我已经弄清楚了。如果您想在 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
于 2019-06-05T11:52:26.470 回答