- Download Maven binary folder
- Place the folder under
/opt/
directory - Edit your
.bash_profile
file to add the MAVEN_HOME
export MAVEN_HOME=/opt/apache-maven-3.6.0/bin
export PATH=$PATH:$MAVEN_HOME
- Clone the repository
automation-test-parent
- Open a terminal and navigate to the root folder of the project, then execute the following command:
mvn clean install -Dreporting.skip=true
- Wait until get in console the :
[INFO] -------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -------------------------------------------------------
- Create a new Maven project
- In
pom.xml
file add a parent pom.
<parent>
<groupId>com.identitymind.automation.test</groupId>
<artifactId>automation-test-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Open source tool tests business-readable specifications against your code on any modern development stack.
- Feature
- Scenario
- Given, When, Then, But
- Examples
Sentence : I have 42 cucumbers in my belly
Match expression : I have {int} cucumbers in my belly
Type | Examples |
---|---|
{int} | 1 , -10 |
{float} | .8 , 3.8 , -9.4 |
{word} | banana but not banana split |
{string} | "any words double-quoted" , 'or single-quoted' |
{} | Matches anything /.*/ |
I have a {color} ball
To add {color}
we can use typeRegistry to define new parameter.
typeRegistry.defineParameterType(new ParameterType<>(
"color", // name
"red|blue|yellow", // regexp
Color.class, // type
Color::new // transformer function
))
In Cucumber, an example is called a scenario. Scenarios are defined in .feature
files, which are commonly stored in the src/test/resources directory (or a subdirectory).
Feature: Is it Friday yet?
Everybody wants to know when it's Friday
Scenario: Sunday isn't Friday
Given today is Sunday
When I ask whether it's Friday yet
Then I should be told "Nope"
Pass variables between classes (Hooks-Test Steps)
- Pretty/json
- html
- junit/xml