Test

Unit Tests

There is a quite extensive suite of Unit Tests that are provided along with the code to help your development.

These tests are defined using Karma as test runner and Jasmine as assertion library. Test are defied along with the code, you can look for any .spec.ts file in the source tree.

You can execute them in two flavors:

  • Single run (this is the same flavor that is used on Jenkins): npm test
  • Watch mode: npm run test:auto

While developing the GUI we'll suggest you to run the test in watch mode, and they'll be executed anytime a file changes. It will help you in catchings bugs immediately. It also provide more information on which tests are executed.

End to End Tests

There is a suite of basic end to test that are defined using protractor, an AngularJs oriented version of Selenium.

These tests can be found in the e2e folder.

Run the tests

NOTE: These tests are designed to work with the Mock R-CORD config

npm run test:e2e

Other paramenters you can pass are:

Variable Name Description
UI_URL Address of the GUI (deaults to http://127.0.0.1:4000/xos/#
UI_PWD Password to login (needed only for remote connections)
TIMEOUT Time allowed for each test
PT_ARGS Extra arguments for Protractor, eg: "--suite dashboard" (Suites are defined in conf/protractor.conf.js)
PT_CONF The path of the config file (eg: "./conf/protractor.conf.js")

results matching ""

    No results matching ""