You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ The project is structured as follows:
40
40
📦 playwright-java-test-automation-architecture
41
41
├─ .github
42
42
│ ├─ FUNDING.yml
43
+
│ ├─ dependabot.yml
43
44
│ └─ workflows
44
45
│ └─ test-execution.yml
45
46
├─ .gitignore
@@ -62,10 +63,10 @@ The project is structured as follows:
62
63
│ ├─ config
63
64
│ │ ├─ Configuration.java
64
65
│ │ └─ ConfigurationManager.java
65
-
│ ├─ data
66
-
│ │ ├─ BaseData.java
67
-
│ │ ├─ LoginData.java
68
-
│ │ └─ ProductsData.java
66
+
│ ├─ dto
67
+
│ │ ├─ BaseDto.java
68
+
│ │ ├─ LoginDto.java
69
+
│ │ └─ ProductsDto.java
69
70
│ ├─ factory
70
71
│ │ ├─ BasePageFactory.java
71
72
│ │ └─ BrowserFactory.java
@@ -91,11 +92,11 @@ The project is structured as follows:
91
92
│ │ ├─ Smoke.java
92
93
│ │ └─ Validation.java
93
94
│ ├─ e2e
94
-
│ │ ├─ BaseE2ETest.java
95
-
│ │ ├─ LoginE2ETest.java
96
-
│ │ └─ ProductsE2ETest.java
95
+
│ │ ├─ BaseTest.java
96
+
│ │ ├─ LoginTest.java
97
+
│ │ └─ ProductsTest.java
97
98
│ └─ util
98
-
│ ├─ CsvToPOJOMapper.java
99
+
│ ├─ CsvToDtoMapper.java
99
100
│ └─ DataArgumentsProvider.java
100
101
└─ resources
101
102
├─ allure.properties
@@ -148,7 +149,7 @@ The project is structured as follows:
148
149
- ### Test Data
149
150
The project uses *csv* file to store test data and [*univocity-parsers*](https://github.com/uniVocity/univocity-parsers) to retrieve the data and map it to a Java bean.
150
151
151
-
To add configurations for new test data, add a new Java bean in the [*data*](./src/main/java/io/github/tahanima/dto) package. For example, let's say I want to add test data for a `User` with the attributes `First Name` and `Last Name`. The code for this is as follows:
152
+
To add configurations for new test data, add a new Java bean in the [*dto*](./src/main/java/io/github/tahanima/dto) package. For example, let's say I want to add test data for a `User` with the attributes `First Name` and `Last Name`. The code for this is as follows:
152
153
153
154
```java
154
155
package io.github.tahanima.dto;
@@ -160,7 +161,7 @@ The project is structured as follows:
@@ -169,17 +170,17 @@ The project is structured as follows:
169
170
private String lastName;
170
171
}
171
172
```
172
-
Note that the class extends from BaseData and thus, inherits the attribute `Test Case ID`.
173
+
Note that the class extends from BaseDto and thus, inherits the attribute `Test Case ID`.
173
174
174
175
Now, in the [*testdata*](./src/test/resources/testdata) folder you can add a csv file `user.csv` for `User` with the below contents and use it in your tests.
175
176
```
176
177
Test Case ID,First Name,Last Name
177
178
TC-1,Tahanima,Chowdhury
178
179
```
179
-
For reference, check [this](./src/main/java/io/github/tahanima/dto/LoginData.java), [this](./src/test/resources/testdata/login.csv) and [this](./src/test/java/io/github/tahanima/e2e/LoginE2ETest.java).
180
+
For reference, check [this](./src/main/java/io/github/tahanima/dto/LoginDto.java), [this](./src/test/resources/testdata/login.csv) and [this](./src/test/java/io/github/tahanima/e2e/LoginTest.java).
180
181
181
182
-### Page Objects and Page Component Objects
182
183
The project uses [*Page Objects* and *Page Component Objects*](https://www.selenium.dev/documentation/test_practices/encouraged/page_object_models/) to capture the relevant behaviors of a web page. Check the [*ui*](./src/main/java/io/github/tahanima/ui) package for reference.
183
184
184
185
-### Tests
185
-
The project uses *TestNG* as the test runner. Check [this implementation](./src/test/java/io/github/tahanima/e2e/LoginE2ETest.java) for reference.
186
+
The project uses *JUnit 5* as the test runner. Check [this implementation](./src/test/java/io/github/tahanima/e2e/LoginTest.java) for reference.
0 commit comments