A basic test automation project for Wikipedia using Selenium, Cucumber, and TestNG. This repository contains practice scripts for automating interactions with the Wikipedia website.
- Language: Java
- Automation Tool: Selenium WebDriver
- BDD Framework: Cucumber
- Test Runner: TestNG
- Build Tool: Maven
This guide provides step-by-step instructions on how to clone this repository, import it correctly into the Eclipse IDE, and run the automation tests.
- Eclipse IDE: Download Eclipse for Java Developers
- Java (JDK): Ensure JDK is installed and configured in your system path.
- Git: Download Git
- TestNG Suite: Ensure TestNG is configured on Eclipse. Refer to Troubleshooting for TestNG installation instructions.
Open your terminal or command prompt and run:
git clone https://github.com/ElementZ76/Wikipedia-Automation.git
- Open Eclipse.
- Go to File > Import...
- Expand the Maven folder and select Existing Maven Projects.
- Click Next.
- Click Browse and select the root folder of the project you just cloned (the folder containing the
pom.xmlfile). - Ensure the
pom.xmlcheckbox is ticked. - Click Finish.
Note: Wait for the progress bar at the bottom right (Building Workspace) to finish. Eclipse is downloading dependencies.
- In the Project Explorer, locate the
TestRunner.javafile (src/test/java/runners). - Right-click
TestRunner.java. - Select Run As > TestNG Test. (refer to Troubleshooting if you cannot find the TestNG option)
- Right-click the project > Maven > Update Project...
- Check Force Update of Snapshots/Releases.
- Click OK.
-
Download "TestNG for Eclipse" from Eclipse Marketplace. (Help > Eclipse Marketplace > Search for "TestNG" and download)
-
After downloading, force update the project.
-
Right click on Wikipedia-Automation > Maven > Update Project > Select "Force update of Snapshots/Releases" > Click OK.
-
src/test/java: Contains the Step Definitions and Test Runner files. -
src/test/resources: Contains the Cucumber Feature files (.feature). -
pom.xml: Manages project dependencies and build configuration.