- Java
- Selenium
- Cucumber
- Junit
- Docker (Docker compose for Selenium GRID 4)
- Java 8 or higher must be installed (Version 8 preferred) Java download link
- Maven must be installed Maven download , Maven install link
.
├── LICENSE
├── README.md
├── config
│ └── baseConfig.properties
├── docker-compose.yml
├── pom.xml
└── src
└── test
├── java
│ └── com
│ └── wikipedia
│ ├── pages
│ │ ├── BasePage.java
│ │ ├── HomePage.java
│ │ ├── SearchPage.java
│ │ └── SearchResultsPage.java
│ ├── runners
│ │ └── CucumberTestRunner.java
│ ├── step_def
│ │ ├── HomePageStepDef.java
│ │ ├── Hooks.java
│ │ ├── SearchPageStepDef.java
│ │ └── SearchResultsPageStepDef.java
│ └── utilities
│ ├── ConfReader.java
│ ├── Driver.java
│ └── Utils.java
└── resources
├── cucumber.properties
└── features
└── search.feature
Conditions are requested when naming. Names should be short and meaningful.
directory names = my-directory (lower camel case)
variable name = myVariable (lower camel case)
method name = myMethod (lower camel case)
class name = MyClass (Upper camel case)
WebElement myElement (lower camel case)
Feature name = MyFeature (Upper camel case)
folder name = my-folder
tag name = @myTag
Maven CLI command to run tests.
execution tests via Tag :
mvn test -Dcucumber.filter.tags="@regression"
execution tests via Cucumber options
mvn test -Dcucumber.options="--tags @smoke"
execution tests via Feature
mvn test -Dcucumber.options="src/test/resources/features/search.feature" -Dcucumber.filter.tags="@regression"
create docker container
docker compose up -d --build
switch the browser type is remote-chrome or remote-firefox on baseConfig.properties
execution tests via Tag :
mvn test -Dcucumber.options="--tags @smoke"