Show TOC

Testing SAPUI5Locate this document in the navigation structure

Test your development using ESLint or unit tests.

Running Static Code Checks (ESLint)

All SAPUI5 code must conform to a certain ruleset which is checked using a tool called ESLint (see Related Information for more details).

To run an ESLint check, navigate to the root directory of the repository and execute:

grunt lint

Optionally, you can check a selected library only or even just a single file or directory.

Running the Unit Tests

The SAPUI5 unit tests are implemented using jQuery's qUnit testing framework and run by a Selenium-based infrastructure.

To execute the unit tests, navigate to the root directory of the repository and execute:

grunt test
Caution

By default, this command runs tests for all libraries in the Google Chrome browser. For all browsers except for Mozilla Firefox, additional Selenium web drivers need to be installed.

You can change this default behavior by specifying the following parameters:

grunt test --browsers="safari,firefox" # run tests of all libraries on Safari and Firefox