Before we start
Please check if everything is installed for Setting Up the Development Environment
Step 1: Install Docker
- 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.
- 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
-
Go to the Visual Studio Code website and download the version for your operating system.
-
Follow the installation instructions provided on the website. Step 3: Install Node.js
-
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.
- 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
- 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.
- 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
- Docker: Open a terminal or command prompt and run docker –version to check that Docker is installed correctly.
- Visual Studio Code:
- Open Visual Studio Code to ensure it runs correctly.
- 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.
- 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
- Open a terminal or command prompt.
- Create a new directory for the course project and navigate into it.
- Run npm init -y to create a package.json file.
- Install WebDriverIO by running npm install @wdio/cli.
- Setup WebDriverIO with npx wdio config and follow the configuration wizard.
- Python Dependencies:
- 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
- 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