Testing

Testing in browser

To run the Jasmine tests in your browser, go to the following pages:

  • <YOUR_LOCALHOST_ADDRESS>/test/E2ERunner.html - Handsontable end-to-end test suite
  • <YOUR_LOCALHOST_ADDRESS>/test/MobileRunner.html - Handsontable mobile test suite
  • <YOUR_LOCALHOST_ADDRESS>/src/3rdparty/walkontable/test/SpecRunner.html - Walkontable test suite

Testing with NPM (CLI)

To run Jasmine tests in your command line (using Puppeteer), first install all necessary dependencies by executing npm install. After the NPM finishes fetching required modules your workspace is ready to test.

  • npm test - runs all test cases (Handsontable and Walkontable).
  • npm test:unit - runs all unit tests.
  • npm test:walkontable - runs only Walkontable tests.
  • npm test:e2e - runs all end-to-end tests.
  • npm run test:e2e --testPathPattern=selection - runs only end-to-end tests and suites matching the filename "selection".
  • npm run test:unit --testPathPattern=array - runs only end-to-end tests and suites matching the filename "array".
  • npm run test:e2e.dump - generates the test/E2ERunner.html file which can by executed in the browser environment (Chrome, Firefox etc.) to check if tests passes.
  • npm run test:e2e.dump -- --watch - generates the E2ERunner.html file on every change detected in test files. It can be helpful for debugging proposes.

Edit this page

Tutorial: Testing