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
-*[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.
36
36
-*[Playwright](https://playwright.dev/)* as the web browser automation framework using the Java binding.
37
37
-*[Univocity Parsers](https://www.univocity.com/pages/univocity_parsers_tutorial)* to parse and handle CSV files.
38
38
-*[JUnit 5](https://junit.org/junit5/)* as the testing framework.
@@ -66,51 +66,54 @@ The project is structured as follows:
66
66
├─ settings.gradle
67
67
└─ src
68
68
├─ 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
94
99
└─ test
95
100
├─ java
96
101
│ └─ io
97
102
│ └─ github
98
103
│ └─ tahanima
99
104
│ ├─ annotation
100
-
│ │ ├─ DataSource.java
101
105
│ │ ├─ Regression.java
102
106
│ │ ├─ Smoke.java
107
+
│ │ ├─ TestDataSource.java
103
108
│ │ └─ Validation.java
104
109
│ ├─ e2e
105
110
│ │ ├─ BaseTest.java
106
111
│ │ ├─ LoginTest.java
107
112
│ │ └─ ProductsTest.java
108
113
│ └─ util
109
-
│ ├─ CsvToDtoMapper.java
110
-
│ └─ DataArgumentsProvider.java
114
+
│ ├─ TestDataArgumentsProvider.java
115
+
│ └─ TestFixtureCsvLoader.java
111
116
└─ resources
112
-
├─ allure.properties
113
-
├─ config.properties
114
117
├─ junit-platform.properties
115
118
└─ testdata
116
119
├─ login.csv
@@ -120,7 +123,7 @@ The project is structured as follows:
120
123
## Basic Usage
121
124
122
125
-### 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.
124
127
125
128
1. To add a new property, register a new entry in this file.
126
129
```
@@ -159,7 +162,7 @@ The project is structured as follows:
159
162
- ### Test Data
160
163
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.
161
164
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:
163
166
164
167
```java
165
168
package io.github.tahanima.fixture;
@@ -171,7 +174,7 @@ The project is structured as follows:
@@ -180,14 +183,14 @@ The project is structured as follows:
180
183
private String lastName;
181
184
}
182
185
```
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`.
184
187
185
188
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.
186
189
```
187
190
Test Case ID,First Name,Last Name
188
191
TC-1,Tahanima,Chowdhury
189
192
```
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).
191
194
192
195
-### Page Objects and Page Component Objects
193
196
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