Skip to content

Latest commit

 

History

History
61 lines (40 loc) · 1.32 KB

File metadata and controls

61 lines (40 loc) · 1.32 KB

DAP automated testing docs

The automated tests for the DAP code are implemented using cucumber-js and puppeteer.

By default the tests use the local version of the DAP javascript files. Loading the code into a test HTML page, performing various user actions, and testing the behavior of the code in response to the user actions.

Use the DAP_ENV environment variable to insert live versions of the code into the test HTML page instead of the local version as described below.

Running the tests

Start up the test site at http://localhost:8080/:

npm run test-site-dev

Then run the tests against the test site:

npm run cucumber

Running the tests with a debugger attached

npm run cucumber:debug

Running the tests and generating a nicely formatted test report

npm run cucumber:report

Test report should be available in output/test-results.html.

Configuring with environment variables

Verbose mode

Print debugging information to stdout while running the tests:

VERBOSE=true npm run cucumber

Run tests against the live staging environment

DAP_ENV=staging npm run cucumber

Run tests against the live production environment

DAP_ENV=production npm run cucumber