WDIO Webpack Dev Server Service
This allows you to run a local server with your built static assets using Webpack Dev Server before testing.
Installation
1 | npm install wdio-webpack-dev-server-service --save-dev |
Configuration
This assumes you have:
- set up WebdriverIO.
- set up Webpack Dev Server - the example will use
webpack.dev.config.js
as the configuration file.
Add the Webpack Dev Server service to your WebdriverIO services list:
1 | // wdio.conf.js |
Options are set directly on your WebdriverIO config as well, e.g.
1 | // wdio.conf.js |
Options
webpackConfig
Type: String
| Object
Default: webpack.config.js
Either the absolute path to your Webpack configuration, or your actual Webpack configuration.
webpackPort
Type: Number
Default: 8080
The port the Dev Server should be run on. You’ll want to set this same port in the baseUrl
option of your WebdriverIO configuration.