Skip to content

Testing

jmacura edited this page May 29, 2020 · 2 revisions

Unit tests

The HSLayers-NG app comes preconfigured with unit tests. These are written in Jasmine, which we run with the Karma Test Runner. We provide a Karma configuration file to run them.

  • the configuration can be found at test/karma.conf.js
  • the unit tests are found in test/unit/ and also in component's directories as *.spec.js files.

The easiest way to run the unit tests is to use the supplied npm script:

npm run test

or with live reloading

npm run test-watch

A good starting point to writing unit tests is this (a bit outdated though!) introduction to Jasmine: https://jasmine.github.io/1.3/introduction.html

End-to-End (e2e) tests

HSLayers-NG uses Protractor for e2e testing.

Testing before release

Before each release, the codebase must be checked against obvious mistakes. It means the following:

  • verify that all unit tests passes
  • verify that all e2e tests passes
  • manually test the installation, appearance and behaviour in...
    • simple apps based on hslayersNgConfig
    • fully capable apps based on custom Angular components
  • ...while investigating...
    • some common features
    • new or updated features
Clone this wiki locally