1. @vue/cli-plugin-e2e-webdriverio
e2e-webdriverio plugin for vue-cli
@vue/cli-plugin-e2e-webdriverio
Package: @vue/cli-plugin-e2e-webdriverio
Created by: vuejs
Last modified: Thu, 07 Jul 2022 10:22:07 GMT
Version: 5.0.8
License: MIT
Downloads: 2,336
Repository: https://github.com/vuejs/vue-cli

Install

npm install @vue/cli-plugin-e2e-webdriverio
yarn add @vue/cli-plugin-e2e-webdriverio

@vue/cli-plugin-e2e-webdriverio

e2e-webdriverio plugin for vue-cli

Injected Commands

  • vue-cli-service test:e2e

    Run end-to-end tests with WebdriverIO.

    Options:

    --remote          Run tests remotely on SauceLabs
    
    All WebdriverIO CLI options are also supported.
    
    

    Additionally, all WebdriverIO CLI options are also supported.
    E.g.: --baseUrl, --bail etc.

Project Structure

The following structure will be generated when installing this plugin:

tests/e2e/
  ├── pageobjects/
  |   └── app.page.js
  ├── specs/
  |   ├── app.spec.js
  └── .eslintrc.js

In addition to that there will be 3 configuration files generated:

  • wdio.shared.conf.js: a shared configuration with all options defined for all environments
  • wdio.local.conf.js: a local configuration for local testing
  • wdio.sauce.conf.js: a remote configuration for testing on a cloud provider like Sauce Labs

The directories contain:

pageobjects

Contains an example for an page object. Read more on using PageObjects with WebdriverIO.

specs

Your e2e tests.

Installing in an Already Created Project

 vue add e2e-webdriverio

For users with older CLI versions you may need to run vue add @vue/e2e-webdriverio.

Running Tests

By default, all tests inside the specs folder will be run using Chrome. If you'd like to run end-to-end tests against Chrome (or Firefox) in headless mode, simply pass the --headless argument. Tests will be automatically run in parallel when executed in the cloud.

 $ vue-cli-service test:e2e

Running a single test

To run a single test supply the filename path. E.g.:

 $ vue-cli-service test:e2e --spec tests/e2e/specs/test.js

Skip Dev server auto-start

If the development server is already running and you want to skip starting it automatically, pass the --url argument:

 $ vue-cli-service test:e2e --baseUrl=http://localhost:8080/

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin