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 (available for both Handsontable Pro and CE)
- <YOUR_LOCALHOST_ADDRESS>/test/MobileRunner.html - Handsontable mobile test suite (available only for Handsontable CE)
- <YOUR_LOCALHOST_ADDRESS>/src/3rdparty/walkontable/test/SpecRunner.html - Walkontable test suite (available only for Handsontable CE)
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.
Commands available for Handsontable Pro:
npm test
- runs all test cases (Handsontable PRO and Handsontable CE).npm test:e2e
- runs only Handsontable PRO end-to-end tests.npm test:unit
- runs only Handsontable PRO unit tests.npm test:handsontable
- runs only Handsontable CE 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 thetest/E2ERunner.html
file which can by executed in the browser environment (Chrome, PhantomJS etc.) to check if tests passes.npm run test:e2e.dump -- --watch
- generates theE2ERunner.html
file on every change detected in test files. It can be helpful for debugging proposes.
Commands available for Handsontable CE:
npm test
- runs all test cases (Handsontable CE and Walkontable).npm test:e2e
- runs only Handsontable end-to-end tests.npm test:unit
- runs only Handsontable unit tests.npm test:walkontable
- runs only Walkontable tests.npm run test:e2e --testPathPattern=selection
- runs only end-to-end tests and suites matching to filename "selection".npm run test:unit --testPathPattern=array
- runs only end-to-end tests and suites matching to filename "array".npm run test:e2e.dump
- generatestest/E2ERunner.html
file which can by executed in browser environment (Chrome, PhantomJS etc.) to check if tests passes.npm run test:e2e.dump -- --watch
- generatesE2ERunner.html
file on every change detected in test files. It can be helpful for debugging proposes.npm run test:mobile.dump
- generatesMobileRunner.html
file which can by executed in browser environment of mobile device to check if tests passes.