-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.md
60 lines (51 loc) · 1.83 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# RestAssured with Cucumber - Serenity
[![RestAssured-Cucumber-Serenity](https://github.com/ghoshasish99/SerenityRestAssured/actions/workflows/maven.yml/badge.svg)](https://github.com/ghoshasish99/SerenityRestAssured/actions/workflows/maven.yml)
### Getting started:
3 main maven dependencies are as follows :
```xml
<!-- serenity-core -->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
</dependency>
<!-- serenity-cucumber -->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.cucumber.version}</version>
</dependency>
<!-- serenity-rest-assured -->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>${serenity.version}</version>
</dependency>
```
Working folder structure :
```
src
|-- test
|-- java
|-- steps
|-- steps.java (individual steps are captured)
|-- stepdefinitions.java (stepdefinitions are captured)
|-- TestRunner.java
|-- resources
|-- features
|-- .feature (feature files)
|-- payloads
|-- .json (request payloads)
|-- pom.xml
```
The TestRunner file is simple :
```java
import cucumber.api.CucumberOptions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import org.junit.runner.RunWith;
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features= "src/test/resources/features/payments.feature")
public class TestRunner {
}
```
You can study this repository for a detailed implementation