This project is a test automation suite built using WebdriverIO, aimed at ensuring the functionality and reliability of web-site. It includes a series of automated tests that cover essential user interactions, including login, item selection, and checkout processes.
You can find the test-case details here.
Before you begin, ensure you have met the following requirements:
- Node.js: Install Node.js (version 14 or higher).
- WebdriverIO package and its dependencies (installable via npm).
- A modern web browser (e.g., Google Chrome) installed on your system for running the tests.
To set up the project, follow these steps:
-
Clone the Repository:
git clone https://github.com/gadiim/webdriverio_saucedemo_test.git
-
Navigate into the directory:
cd webdriverio_saucedemo_test
-
Install Dependencies:
npm install
Allure is used for generating detailed test reports.
- To open the WebdriverIO Test Runner:
npm run test
- To run tests for specific test files:
npm run test:login
npm run test:logout
npm run test:cart
npm run test:sorting
npm run test:footer
npm run test:checkout
- To generate the Allure report from the test results:
npm run allure:generate
- To open the Allure report in the browser.
npm run allure:open
- To clears the reports directory.
npm run allure:clean
The tests are organized in the following structure:
webdriverio_saucedemo_test/
├── .gitignore
├── README.md
├── package.json
├── tsconfig.json
├── wdio.conf.js
├── test/
│ ├── specs/
│ │ ├── login_test.js
│ │ ├── logout_test.js
│ │ ├── cart_test.js
│ │ ├── sorting_test.js
│ │ ├── footer_test.js
│ │ ├── checkout_test.js
│ ├── pageobjects/
│ │ ├── loginpage.js
│ │ ├── inventorypage.js
│ │ ├── cartpage.js
│ │ ├── checkoutpage.js
│ └── data/
│ │ ├── fake_data_generator.js
│ │ └── data.js
wdio.conf.js
: The WebdriverIO configuration file that contains test settings, browser capabilities, and environment details.test/specs/
: Contains the end-to-end test files.test/pageobjects/
: Contains the page object files that define the structure and elements of the webpages to interact with.test/data/
: Contains any test data files, such as user information for login.
This project is licensed under the MIT License. You are free to use, modify, and distribute this project. See the LICENSE file for more details.