Performance testing with webdriverio installation guide

Feb 26, 2024 | by Ralph Van Der Horst

Performance testing with webdriverio installation guide

Before we start

Please check if everything is installed for Setting Up the Development Environment

Step 1: Install Docker

  1. Windows/Mac:
  • Go to the Docker website and download Docker Desktop for Windows or Mac, depending on your operating system.
  • Follow the installation instructions provided on the website.
  • After installation, run Docker Desktop to start the Docker daemon.
  1. Linux:
  • Update your package index: sudo apt-get update
  • Install Docker using the package manager
  • Verify that Docker is installed correctly by running: sudo docker run hello-world Step 2: Install Visual Studio Code
  1. Go to the Visual Studio Code website and download the version for your operating system.

  2. Follow the installation instructions provided on the website. Step 3: Install Node.js

  3. Windows/Mac:

  • Go to the Node.js website and download the LTS version for your operating system.
  • Follow the installation instructions provided on the website.
  1. Linux:
  • You can install Node.js via the package manager. For example, on Ubuntu:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs

Install Python

  1. Windows/Mac:
  • Go to the Python website and download the latest version for your operating system.
  • Follow the installation instructions provided on the website. Ensure you check the box to add Python to PATH during installation.
  1. Linux: Python usually comes pre-installed on Linux distributions. You can check

python --version
  • If it’s not installed or you need a different version, you can install it using the package manager. For example, on Ubuntu:
sudo apt-get update
sudo apt-get install python3.8

Step 5: Verify Installation

  1. Docker: Open a terminal or command prompt and run docker –version to check that Docker is installed correctly.
  2. Visual Studio Code:
  3. Open Visual Studio Code to ensure it runs correctly.
  4. Node.js: Open a terminal or command prompt and run node –version and npm –version to check that Node.js and npm (Node Package Manager) are installed correctly.
  5. Python: Open a terminal or command prompt and run python –version (or python3 –version for Linux) to verify Python installation.

Additional Setup for the Course

  • Download webdriverio performance test course repository
    1. Open a terminal or command prompt.
    2. Create a new directory for the course project and navigate into it.
    3. Run npm init -y to create a package.json file.
    4. Install WebDriverIO by running npm install @wdio/cli.
    5. Setup WebDriverIO with npx wdio config and follow the configuration wizard.
  • Python Dependencies:
    1. It’s recommended to create a virtual environment for Python dependencies:
    • Install the virtual environment package: pip install virtualenv
    • Create a virtual environment: virtualenv venv
    • Activate the virtual environment:
      • Windows: .\venv\Scripts\activate
      • Mac/Linux: source venv/bin/activate
    1. Install any required Python packages for the course using pip install <package_name>. After downloading the structure will look as follows
.
├── .gitlab
        # CI/CD pipelines (e.g., nightly tasks)
├── data
   ├── input            # Input data for tests (e.g., cookies from production)
   └── output           # Output data from tests
       ├── reports      # Reports generated for analysis
       └── sqlite       # SQLite databases with test execution data
├── test
   ├── pageObjects      # Page object models for WebDriverIO tests
   ├── specs            # Test specifications for WebDriverIO
   └── helpers          # Helpers for tests (generateFiles, performanceHelper, xhrHelper, etc.)
├── reporting            # Python scripts for reporting and threshold analysis
├── node_modules         # Node.js dependencies (ignored in version control)
├── .env                 # Environment variables file (ignored in version control)
├── package.json         # Project metadata and dependencies
├── .gitlab-ci.yml      # setup the cicd part of executing performance test
└── README.md            # Project documentation

by Ralph Van Der Horst

arrow right
back to blog

share this article

Relevant articles

How to Create a Great API A Guide for functional performance security

Mar 7, 2024

How to Create a Great API A Guide for functional performance security

AI Generated course leveraging on Chat gpt

AI Generated course leveraging on Chat gpt

Chat GPT and Testdatacreation

Chat GPT and Testdatacreation