How to set up ScrutinizerCI for running NightwatchJS UI tests

110 Views Asked by At

So, our company is using Scrutinizer CI (https://scrutinizer-ci.com/) for Python code analysis/coverage. But also we need to setup Scrutinizer CI for running NightwatchJS UI tests.

I've already read Scrutinizer manual, but there is no detailed guide how to set up it for running UI tests. There is some info about Selenium but it is not the case for us, NightwatchJS doesn't use Selenium. Any help will be appreciated.

1

There are 1 best solutions below

0
paveltk On

Ok, so I've figure it out. This is what you need to paste into Configuration section of your repository if you want to run your JS tests in Scrutinizer. After that, update configuration and schedule inspection.

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