wdi5 quickstart
fast lane for adding wdi5 for e2e tests to your UI5 application
quickstart
$> cd your/ui5/app
# for JavaScript projects:
$> npm init wdi5@latest
# for TypeScript projects:
$> npm init wdi5@latest -- --tsNote that specifically for the TypeScript projects, this quickstart command is suited as a complimentary tool to yo easy-ui5 ts-app!
how it works
the init will…
| for JavaScript | for TypeScript |
|---|---|
install wdi5 and all required WebdriverIO peer dependencies |
(← same) |
assume that you're running the UI5 app with the ui5-tooling on port 8080 |
(← same) |
- add a config file (wdio.conf.js) to your current working directory- assume that your tests are in $ui5-app/webapp/test/**/* and follow the name pattern *.test.js |
- add a config file (wdio.conf.ts) to your current working directory - add a config file ( tsconfig.json ) to a folder test in your current working directory (respecting existing content in test)- assume that your tests are in $ui5-app/test/**/* and follow the name pattern *.test.ts |
set an npm script named "wdi5" to run wdi5 so you can immediately do npm run wdi5 |
(← same) |
note this is a minimal install for running wdi5
- locally
- with
Chromeas target browser - plain JavaScript as notation
mochaas the syntax for testsspecas the output format of the test results
The wdi5 config is already prepared for
--headless: runs Chrome in headless mode (npm run wdi5 -- --headless)--debug: extends test timeouts and auto-opens Chrome's developer tools pane (npm run wdi5 -- --debug)
next
- provide initial test file (skeleton) for JS + TS