Skip to content

Commit 3fa33e3

Browse files
authored
Update README.md
1 parent 95269e2 commit 3fa33e3

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The project is structured as follows:
4040
📦 playwright-java-test-automation-architecture
4141
├─ .github
4242
│  ├─ FUNDING.yml
43+
│  ├─ dependabot.yml
4344
│  └─ workflows
4445
│     └─ test-execution.yml
4546
├─ .gitignore
@@ -62,10 +63,10 @@ The project is structured as follows:
6263
   │              ├─ config
6364
   │              │  ├─ Configuration.java
6465
   │              │  └─ ConfigurationManager.java
65-
   │              ├─ data
66-
   │              │  ├─ BaseData.java
67-
   │              │  ├─ LoginData.java
68-
   │              │  └─ ProductsData.java
66+
   │              ├─ dto
67+
   │              │  ├─ BaseDto.java
68+
   │              │  ├─ LoginDto.java
69+
   │              │  └─ ProductsDto.java
6970
   │              ├─ factory
7071
   │              │  ├─ BasePageFactory.java
7172
   │              │  └─ BrowserFactory.java
@@ -91,11 +92,11 @@ The project is structured as follows:
9192
      │           │  ├─ Smoke.java
9293
      │           │  └─ Validation.java
9394
      │           ├─ e2e
94-
      │           │  ├─ BaseE2ETest.java
95-
      │           │  ├─ LoginE2ETest.java
96-
      │           │  └─ ProductsE2ETest.java
95+
      │           │  ├─ BaseTest.java
96+
      │           │  ├─ LoginTest.java
97+
      │           │  └─ ProductsTest.java
9798
      │           └─ util
98-
      │              ├─ CsvToPOJOMapper.java
99+
      │              ├─ CsvToDtoMapper.java
99100
      │              └─ DataArgumentsProvider.java
100101
      └─ resources
101102
         ├─ allure.properties
@@ -148,7 +149,7 @@ The project is structured as follows:
148149
- ### Test Data
149150
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.
150151
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:
152153
153154
```java
154155
package io.github.tahanima.dto;
@@ -160,7 +161,7 @@ The project is structured as follows:
160161
161162
@Getter
162163
@ToString(callSuper = true)
163-
public class UserData extends BaseData {
164+
public class UserDto extends BaseDto {
164165
165166
@Parsed(field = "First Name", defaultNullRead = "")
166167
private String firstName;
@@ -169,17 +170,17 @@ The project is structured as follows:
169170
private String lastName;
170171
}
171172
```
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`.
173174

174175
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.
175176
```
176177
Test Case ID,First Name,Last Name
177178
TC-1,Tahanima,Chowdhury
178179
```
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).
180181

181182
- ### Page Objects and Page Component Objects
182183
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.
183184

184185
- ### 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

Comments
 (0)