Skip to content

Commit a78017a

Browse files
authored
Update README.md
1 parent 87c6e28 commit a78017a

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed

README.md

Lines changed: 39 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ git clone https://github.com/[your_username]/playwright-java-test-automation-arc
3232
## Languages and Frameworks
3333

3434
The project uses the following:
35-
- *[Java 11](https://openjdk.java.net/projects/jdk/11/)* as the programming language.
35+
- *[Java](https://openjdk.java.net/projects/jdk/)* as the programming language.
3636
- *[Playwright](https://playwright.dev/)* as the web browser automation framework using the Java binding.
3737
- *[Univocity Parsers](https://www.univocity.com/pages/univocity_parsers_tutorial)* to parse and handle CSV files.
3838
- *[JUnit 5](https://junit.org/junit5/)* as the testing framework.
@@ -66,51 +66,54 @@ The project is structured as follows:
6666
├─ settings.gradle
6767
└─ src
6868
   ├─ main
69-
   │  └─ java
70-
   │     └─ io
71-
   │        └─ github
72-
   │           └─ tahanima
73-
   │              ├─ config
74-
   │              │  ├─ Configuration.java
75-
   │              │  └─ ConfigurationManager.java
76-
   │              ├─ dto
77-
   │              │  ├─ BaseDto.java
78-
   │              │  ├─ LoginDto.java
79-
   │              │  └─ ProductsDto.java
80-
   │              ├─ factory
81-
   │              │  ├─ BasePageFactory.java
82-
   │              │  └─ BrowserFactory.java
83-
   │              ├─ ui
84-
   │              │  ├─ component
85-
   │              │  │  ├─ BaseComponent.java
86-
   │              │  │  ├─ Header.java
87-
   │              │  │  └─ SideNavMenu.java
88-
   │              │  └─ page
89-
   │              │     ├─ BasePage.java
90-
   │              │     ├─ LoginPage.java
91-
   │              │     └─ ProductsPage.java
92-
   │              └─ util
93-
   │                 └─ BrowserManager.java
69+
   │  ├─ java
70+
   │  │  └─ io
71+
   │  │     └─ github
72+
   │  │        └─ tahanima
73+
   │  │           ├─ config
74+
   │  │           │  ├─ Configuration.java
75+
   │  │           │  └─ ConfigurationManager.java
76+
   │  │           ├─ factory
77+
   │  │           │  ├─ BasePageFactory.java
78+
   │  │           │  └─ BrowserFactory.java
79+
   │  │           ├─ fixture
80+
   │  │           │  ├─ BaseFixture.java
81+
   │  │           │  ├─ LoginFixture.java
82+
   │  │           │  └─ ProductsFixture.java
83+
   │  │           ├─ report
84+
   │  │           │  └─ AllureManager.java
85+
   │  │           ├─ ui
86+
   │  │           │  ├─ component
87+
   │  │           │  │  ├─ BaseComponent.java
88+
   │  │           │  │  ├─ Header.java
89+
   │  │           │  │  └─ SideNavMenu.java
90+
   │  │           │  └─ page
91+
   │  │           │     ├─ BasePage.java
92+
   │  │           │     ├─ LoginPage.java
93+
   │  │           │     └─ ProductsPage.java
94+
   │  │           └─ util
95+
   │  │              └─ BrowserManager.java
96+
   │  └─ resources
97+
   │     ├─ allure.properties
98+
   │     └─ config.properties
9499
   └─ test
95100
      ├─ java
96101
      │  └─ io
97102
      │     └─ github
98103
      │        └─ tahanima
99104
      │           ├─ annotation
100-
      │           │  ├─ DataSource.java
101105
      │           │  ├─ Regression.java
102106
      │           │  ├─ Smoke.java
107+
      │           │  ├─ TestDataSource.java
103108
      │           │  └─ Validation.java
104109
      │           ├─ e2e
105110
      │           │  ├─ BaseTest.java
106111
      │           │  ├─ LoginTest.java
107112
      │           │  └─ ProductsTest.java
108113
      │           └─ util
109-
      │              ├─ CsvToDtoMapper.java
110-
      │              └─ DataArgumentsProvider.java
114+
      │              ├─ TestDataArgumentsProvider.java
115+
      │              └─ TestFixtureCsvLoader.java
111116
      └─ resources
112-
         ├─ allure.properties
113-
         ├─ config.properties
114117
         ├─ junit-platform.properties
115118
         └─ testdata
116119
            ├─ login.csv
@@ -120,7 +123,7 @@ The project is structured as follows:
120123
## Basic Usage
121124

122125
- ### Configuration
123-
The project uses a [*config.properties*](./src/test/resources/config.properties) file to manage global configurations such as browser type and base url.
126+
The project uses a [*config.properties*](./src/main/resources/config.properties) file to manage global configurations such as browser type and base url.
124127

125128
1. To add a new property, register a new entry in this file.
126129
```
@@ -159,7 +162,7 @@ The project is structured as follows:
159162
- ### Test Data
160163
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.
161164
162-
To add configurations for new test data, add a new Java bean in the [*dto*](./src/main/java/io/github/tahanima/fixture) 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:
165+
To add configurations for new test data, add a new Java bean in the [*fixture*](./src/main/java/io/github/tahanima/fixture) 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:
163166
164167
```java
165168
package io.github.tahanima.fixture;
@@ -171,7 +174,7 @@ The project is structured as follows:
171174
172175
@Getter
173176
@ToString(callSuper = true)
174-
public class UserDto extends BaseDto {
177+
public class UserFixture extends BaseFixture {
175178
176179
@Parsed(field = "First Name", defaultNullRead = "")
177180
private String firstName;
@@ -180,14 +183,14 @@ The project is structured as follows:
180183
private String lastName;
181184
}
182185
```
183-
Note that the class extends from BaseDto and thus, inherits the attribute `Test Case ID`.
186+
Note that the class extends from BaseFixture and thus, inherits the attribute `Test Case ID`.
184187

185188
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.
186189
```
187190
Test Case ID,First Name,Last Name
188191
TC-1,Tahanima,Chowdhury
189192
```
190-
For reference, check [this](./src/main/java/io/github/tahanima/fixture/LoginDto.java), [this](./src/test/resources/testdata/login.csv) and [this](./src/test/java/io/github/tahanima/e2e/LoginTest.java).
193+
For reference, check [this](./src/main/java/io/github/tahanima/fixture/LoginFixture.java), [this](./src/test/resources/testdata/login.csv) and [this](./src/test/java/io/github/tahanima/e2e/LoginTest.java).
191194

192195
- ### Page Objects and Page Component Objects
193196
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.

0 commit comments

Comments
 (0)