├── .idea ├── .gitignore ├── compiler.xml ├── encodings.xml ├── jarRepositories.xml ├── misc.xml ├── uiDesigner.xml └── vcs.xml ├── README.md ├── pom.xml ├── reports ├── 13_11_2022 │ ├── 07_40_41.html │ ├── 07_44_27.html │ ├── 07_57_34.html │ ├── 07_58_47.html │ ├── 08_07_23.html │ └── 08_19_24.html └── 14_11_2022 │ ├── 02_42_09.html │ └── 02_47_43.html ├── src ├── main │ ├── java │ │ ├── base │ │ │ ├── Commons.java │ │ │ ├── CustomWaits.java │ │ │ └── SetupDriver.java │ │ ├── pages │ │ │ ├── HomePage.java │ │ │ ├── LoginPage.java │ │ │ ├── RegisterPage.java │ │ │ └── products │ │ │ │ ├── AccountPage.java │ │ │ │ ├── DesktopPage.java │ │ │ │ └── LaptopPage.java │ │ └── utils │ │ │ ├── ExtentReportHelper.java │ │ │ ├── ListenerHelper.java │ │ │ └── PropertyReaderHelper.java │ └── resources │ │ └── config.properties └── test │ └── java │ ├── pageTests │ ├── HomePageTests.java │ ├── LoginPageTests.java │ ├── ProductTests │ │ ├── DesktopPageTests.java │ │ └── LaptopPageTests.java │ └── RegisterPageTests.java │ ├── testConfig │ └── BaseTest.java │ └── testData │ └── ecom_login_data.json ├── suites ├── allTestSuite_testNG.xml ├── regression_testNG.xml └── smoke_testNG.xml └── target ├── classes ├── base │ ├── Commons$1.class │ ├── Commons.class │ ├── CustomWaits.class │ └── SetupDriver.class ├── config.properties ├── pages │ ├── HomePage.class │ ├── LoginPage.class │ ├── RegisterPage.class │ └── products │ │ ├── AccountPage.class │ │ ├── DesktopPage.class │ │ └── LaptopPage.class └── utils │ ├── ExtentReportHelper.class │ ├── ListenerHelper.class │ └── PropertyReaderHelper.class ├── maven-status └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ ├── createdFiles.lst │ └── inputFiles.lst ├── surefire-reports ├── All Test Suite │ ├── HomePageTests.html │ ├── HomePageTests.xml │ ├── LoginPageTests.html │ ├── LoginPageTests.xml │ ├── RegisterPageTests.html │ ├── RegisterPageTests.xml │ └── testng-failed.xml ├── TEST-TestSuite.xml ├── TEST-testConfig.BaseTest.xml ├── TestSuite.txt ├── bullet_point.png ├── collapseall.gif ├── emailable-report.html ├── failed.png ├── index.html ├── jquery-1.7.1.min.js ├── junitreports │ ├── TEST-pageTests.HomePageTests.xml │ ├── TEST-pageTests.LoginPageTests.xml │ └── TEST-pageTests.RegisterPageTests.xml ├── navigator-bullet.png ├── old │ ├── All Test Suite │ │ ├── HomePageTests.properties │ │ ├── LoginPageTests.properties │ │ ├── RegisterPageTests.properties │ │ ├── classes.html │ │ ├── groups.html │ │ ├── index.html │ │ ├── main.html │ │ ├── methods-alphabetical.html │ │ ├── methods-not-run.html │ │ ├── methods.html │ │ ├── reporter-output.html │ │ ├── testng.xml.html │ │ └── toc.html │ ├── index.html │ └── testConfig.BaseTest │ │ ├── Command line test.properties │ │ ├── classes.html │ │ ├── groups.html │ │ ├── index.html │ │ ├── main.html │ │ ├── methods-alphabetical.html │ │ ├── methods-not-run.html │ │ ├── methods.html │ │ ├── reporter-output.html │ │ ├── testng.xml.html │ │ └── toc.html ├── passed.png ├── skipped.png ├── testConfig.BaseTest.txt ├── testConfig.BaseTest │ ├── Command line test.html │ └── Command line test.xml ├── testng-failed.xml ├── testng-reports.css ├── testng-reports.js ├── testng-results.xml └── testng.css └── test-classes ├── pageTests ├── HomePageTests.class ├── LoginPageTests.class ├── ProductTests │ ├── DesktopPageTests.class │ └── LaptopPageTests.class └── RegisterPageTests.class └── testConfig └── BaseTest.class /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | # Editor-based HTTP Client requests 5 | /httpRequests/ 6 | # Datasource local storage ignored files 7 | /dataSources/ 8 | /dataSources.local.xml 9 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 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 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Skills Gained 2 | 3 | - **Test Automation Framework Design** 4 | - **Selenium WebDriver Integration** 5 | - **TestNG Suite Management** 6 | - **Maven Dependency Management** 7 | - **HTML Report Generation** 8 | - **Page Object Model (POM) Implementation** 9 | - **Modular Code Organization** 10 | - **Configuration Management** 11 | - **Custom Wait Implementation** 12 | - **JSON Data Handling** 13 | - **Utility Class Development** 14 | - **Listener Integration in TestNG** 15 | - **Extent Reports Customization** 16 | - **Cross-Browser Testing Setup** 17 | - **Reusable Code Development** 18 | - **Debugging and Troubleshooting Test Cases** 19 | - **Scalability and Maintenance of Frameworks** 20 | 21 | # Project Structure Breakdown 22 | 23 | ## Root Directory: `JapneetSachdeva1-SeleniumFramework/` 24 | - This is the base folder containing all the framework components. 25 | 26 | ### `suites/` 27 | - Contains TestNG XML suite files that define test execution flow. 28 | 29 | #### Files: 30 | - **`allTestSuite_testNG.xml`**: Likely includes all test cases in the framework. 31 | - **`smoke_testNG.xml`**: Focuses on critical "smoke" tests to verify the basic functionality. 32 | - **`regression_testNG.xml`**: Contains tests that ensure changes don’t break existing functionality. 33 | 34 | ### `pom.xml` 35 | - The Maven Project Object Model (POM) file. Manages dependencies, build lifecycle, and plugins for the project. 36 | - Examples of dependencies it may include: 37 | - Selenium WebDriver 38 | - TestNG 39 | - Extent Reports 40 | - JSON parsing libraries (e.g., Jackson or Gson) 41 | 42 | ### `reports/` 43 | - Contains HTML test execution reports, generated for each test run. Organized by date: 44 | - **`13_11_2022/`** and **`14_11_2022/`**: Subfolders with timestamped HTML reports for specific execution times. 45 | 46 | ### `README.md` 47 | - A documentation file in Markdown format. Typically provides: 48 | - Overview of the project 49 | - Setup instructions 50 | - How to run the tests 51 | - Contribution guidelines 52 | 53 | ### `src/` 54 | - This folder holds the main source code and test files. 55 | 56 | 57 | ![napkin-selection (1)](https://github.com/user-attachments/assets/4bb6d5f8-e230-403a-bf54-cc7013ff37bd) 58 | 59 | 60 | # Framework Structure 61 | 62 | ## 6.1. `main/` 63 | - Contains the framework's core functionality. 64 | 65 | ### `resources/config.properties` 66 | - Configuration file for properties like URLs, browser types, and timeout durations. 67 | 68 | ### `java/` 69 | 70 | #### `base/` 71 | - Core classes shared across the framework: 72 | - **`SetupDriver.java`**: Manages WebDriver setup and teardown. 73 | - **`CustomWaits.java`**: Contains utility methods for custom explicit/implicit waits. 74 | - **`Commons.java`**: Commonly used helper functions. 75 | 76 | #### `pages/` 77 | - Implements the Page Object Model (POM) design. 78 | - Subfolders organize pages by category: 79 | - **`products/`**: Classes representing product-related pages: 80 | - **`LaptopPage.java`**, **`DesktopPage.java`**, etc. 81 | - **`LoginPage.java`**, **`HomePage.java`**, **`RegisterPage.java`**, etc.: Represent specific application pages. 82 | 83 | #### `utils/` 84 | - Utility/helper classes: 85 | - **`ExtentReportHelper.java`**: Manages Extent Report generation. 86 | - **`ListenerHelper.java`**: Implements TestNG listeners for logging and reporting. 87 | - **`PropertyReaderHelper.java`**: Reads and fetches values from `config.properties`. 88 | 89 | ## 6.2. `test/` 90 | - Holds the test cases and related configurations. 91 | 92 | ### `testData/` 93 | - Stores test data files. 94 | - Example: **`ecom_login_data.json`**: Contains login credentials or other test data. 95 | 96 | ### `pageTests/` 97 | - Test classes for each page: 98 | - **`RegisterPageTests.java`**, **`LoginPageTests.java`**, **`HomePageTests.java`**, etc. 99 | - Organized into subfolders like **`ProductTests/`** for product-related test cases. 100 | 101 | ### `testConfig/` 102 | - Contains test configurations. 103 | - Example: **`BaseTest.java`**: A base class for test setup and teardown (e.g., WebDriver initialization, loading config). 104 | 105 | # Key Highlights 106 | 107 | - **TestNG and Maven**: A well-organized framework leveraging TestNG for test execution and Maven for dependency management. 108 | - **Page Object Model (POM)**: Follows POM design for better maintainability and readability. 109 | - **Modular Design**: Separate modules for pages, utilities, and tests enhance scalability. 110 | - **Reporting**: Includes timestamped HTML reports for test execution tracking. 111 | - **Reusable Components**: Shared code in base and utils promotes reusability and reduces redundancy. 112 | - **Industry Standard**: This framework structure aligns with industry standards for Selenium-based test automation. 113 | 114 | 115 | ![napkin-selection](https://github.com/user-attachments/assets/6afe8e4f-45be-4b49-8810-5f0248e71494) 116 | 117 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | org.example 8 | OpenCart 9 | 1.0-SNAPSHOT 10 | 11 | 12 | 18 13 | 18 14 | UTF-8 15 | 16 | 17 | 18 | 19 | org.seleniumhq.selenium 20 | selenium-java 21 | 4.6.0 22 | 23 | 24 | 25 | org.seleniumhq.selenium 26 | selenium-api 27 | 4.6.0 28 | 29 | 30 | 31 | org.testng 32 | testng 33 | 6.14.3 34 | 35 | 36 | com.aventstack 37 | extentreports 38 | 5.0.9 39 | 40 | 41 | 42 | 43 | org.projectlombok 44 | lombok 45 | 1.18.24 46 | provided 47 | 48 | 49 | 50 | 51 | com.fasterxml.jackson.core 52 | jackson-databind 53 | 2.13.4.2 54 | 55 | 56 | 57 | 58 | commons-io 59 | commons-io 60 | 2.11.0 61 | 62 | 63 | 64 | 65 | 66 | 67 | Smoke 68 | 69 | 70 | 71 | 72 | org.apache.maven.plugins 73 | maven-surefire-plugin 74 | 3.0.0-M7 75 | 76 | 77 | suites/smoke_testNG.xml 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | Regression 88 | 89 | 90 | 91 | 92 | org.apache.maven.plugins 93 | maven-surefire-plugin 94 | 3.0.0-M7 95 | 96 | 97 | suites/regression_testNG.xml 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | AllTests 108 | 109 | 110 | 111 | 112 | org.apache.maven.plugins 113 | maven-surefire-plugin 114 | 3.0.0-M7 115 | 116 | 117 | suites/allTestSuite_testNG.xml 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /reports/13_11_2022/07_40_41.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Test Results 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
43 |
44 | 61 |
62 |
63 |
64 |
65 |
66 |
67 | 70 | 86 |
87 |
    88 |
  • 92 |
    93 |

    testURLLoading

    94 |

    95 | 7:40:43 PM / 00:00:03:182 96 | Pass 97 |

    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    testURLLoading
    104 | 11.13.2022 7:40:43 PM 105 | 11.13.2022 7:40:46 PM 106 | 00:00:03:182 107 | · #test-id=1 108 | 109 | 110 |
    111 |
    smoke
    112 |
    Description for test: Test routing to Homepage is working fine
    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 133 |
    StatusTimestampDetails
    Info7:40:43 PM 122 | Driver Start Time: 19:40:43 123 |
    Pass7:40:46 PM 129 | testURLLoadingis successful!! 130 |
    134 |
    135 |
    136 |
  • 137 |
  • 141 |
    142 |

    testLoginPageRouting

    143 |

    144 | 7:40:48 PM / 00:00:05:920 145 | Pass 146 |

    147 |
    148 |
    149 |
    150 |
    151 |
    152 |
    testLoginPageRouting
    153 | 11.13.2022 7:40:48 PM 154 | 11.13.2022 7:40:53 PM 155 | 00:00:05:920 156 | · #test-id=2 157 | 158 | 159 |
    160 |
    regression
    161 |
    Description for test: Test routing to login page is working from Homepage
    162 |
    163 |
    164 | 165 | 166 | 167 | 168 | 169 | 170 | 173 | 174 | 175 | 176 | 177 | 180 | 181 | 182 | 183 | 184 | 187 | 188 | 189 |
    StatusTimestampDetails
    Info7:40:48 PM 171 | Driver Start Time: 19:40:48 172 |
    Pass7:40:53 PM 178 | testLoginPageRoutingis successful!! 179 |
    Info7:40:53 PM 185 | Driver quit time: 19:40:53 186 |
    190 |
    191 |
    192 |
  • 193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 | 206 | 207 |
208 |
209 |
    210 |
  • 211 |
    212 | 213 | 1 214 | 215 |

    smoke

    216 |

    1 tests

    217 |
    218 |
    219 |
    220 |

    smoke

    221 | 1 passed 222 |
    223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 238 | 239 | 240 |
    StatusTimestampTestName
    Pass19:40:43 PM 236 | testURLLoading 237 |
    241 |
    242 |
  • 243 |
  • 244 |
    245 | 246 | 1 247 | 248 |

    regression

    249 |

    1 tests

    250 |
    251 |
    252 |
    253 |

    regression

    254 | 1 passed 255 |
    256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 271 | 272 | 273 |
    StatusTimestampTestName
    Pass19:40:48 PM 269 | testLoginPageRouting 270 |
    274 |
    275 |
  • 276 |
277 |
278 |
279 |
280 |
281 |
282 |
283 |
284 |
285 |
286 |
287 |
288 |

Started

289 |

Sunday, November 13, 2022, 07:40 PM (IST)

290 |
291 |
292 |
293 |
294 |

Ended

295 |

Sunday, November 13, 2022, 07:40 PM (IST)

296 |
297 |
298 |
299 |
300 |

Tests Passed

301 |

2

302 |
303 |
304 |
305 |
306 |

Tests Failed

307 |

0

308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
Tests
316 |
317 |
318 |
319 | 320 |
321 |
322 | 333 |
334 |
335 |
336 |
337 |
338 |
Log events
339 |
340 |
341 |
342 | 343 |
344 |
345 | 353 |
354 |
355 |
356 |
357 |

Timeline

358 |
359 | 360 |
361 |
362 |
363 | 368 |
369 |
370 |
371 |

Tags

372 |
373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 |
NamePassedFailedSkippedOthersPassed %
smoke1000100%
regression1000100%
392 |
393 |
394 |
395 |
396 |

System/Environment

397 |
398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 |
NameValue
Tester is: Japneet Sachdeva
406 |
407 |
408 |
409 |
410 |
437 |
438 |
439 |
440 | 441 | 442 | -------------------------------------------------------------------------------- /reports/13_11_2022/07_44_27.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Test Results 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
43 |
44 | 61 |
62 |
63 |
64 |
65 |
66 |
67 | 70 |
    71 | 79 | 85 |
86 |
87 |
    88 |
  • 92 |
    93 |

    testLoginPageRouting

    94 |

    95 | 7:44:29 PM / 00:00:05:519 96 | Pass 97 |

    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    testLoginPageRouting
    104 | 11.13.2022 7:44:29 PM 105 | 11.13.2022 7:44:34 PM 106 | 00:00:05:519 107 | · #test-id=1 108 | 109 | 110 |
    111 |
    regression
    112 |
    Description for test: Test routing to login page is working from Homepage
    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 |
    StatusTimestampDetails
    Info7:44:29 PM 122 | Driver Start Time: 19:44:29 123 |
    Pass7:44:34 PM 129 | testLoginPageRoutingis successful!! 130 |
    Info7:44:34 PM 136 | Driver quit time: 19:44:34 137 |
    141 |
    142 |
    143 |
  • 144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 |
159 |
160 |
    161 |
  • 162 |
    163 | 164 | 1 165 | 166 |

    regression

    167 |

    1 tests

    168 |
    169 |
    170 |
    171 |

    regression

    172 | 1 passed 173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 189 | 190 | 191 |
    StatusTimestampTestName
    Pass19:44:29 PM 187 | testLoginPageRouting 188 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |

Started

207 |

Sunday, November 13, 2022, 07:44 PM (IST)

208 |
209 |
210 |
211 |
212 |

Ended

213 |

Sunday, November 13, 2022, 07:44 PM (IST)

214 |
215 |
216 |
217 |
218 |

Tests Passed

219 |

1

220 |
221 |
222 |
223 |
224 |

Tests Failed

225 |

0

226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
Tests
234 |
235 |
236 |
237 | 238 |
239 |
240 | 251 |
252 |
253 |
254 |
255 |
256 |
Log events
257 |
258 |
259 |
260 | 261 |
262 |
263 | 271 |
272 |
273 |
274 |
275 |

Timeline

276 |
277 | 278 |
279 |
280 |
281 | 286 |
287 |
288 |
289 |

Tags

290 |
291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
NamePassedFailedSkippedOthersPassed %
regression1000100%
302 |
303 |
304 |
305 |
306 |

System/Environment

307 |
308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 |
NameValue
Tester is: Japneet Sachdeva
316 |
317 |
318 |
319 |
320 |
347 |
348 |
349 |
350 | 351 | 352 | -------------------------------------------------------------------------------- /reports/13_11_2022/07_57_34.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Test Results 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
43 |
44 | 61 |
62 |
63 |
64 |
65 |
66 |
67 | 70 |
    71 | 79 | 85 |
86 |
87 |
    88 |
  • 92 |
    93 |

    TestUserLogin

    94 |

    95 | 7:57:36 PM / 00:00:01:648 96 | Pass 97 |

    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    TestUserLogin
    104 | 11.13.2022 7:57:36 PM 105 | 11.13.2022 7:57:38 PM 106 | 00:00:01:648 107 | · #test-id=1 108 | 109 | 110 |
    111 |
    smoke
    112 |
    Description for test: Test user is able to login
    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 |
    StatusTimestampDetails
    Info7:57:36 PM 122 | Driver Start Time: 19:57:36 123 |
    Pass7:57:37 PM 129 | TestUserLoginis successful!! 130 |
    Info7:57:38 PM 136 | Driver quit time: 19:57:38 137 |
    141 |
    142 |
    143 |
  • 144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 |
159 |
160 |
    161 |
  • 162 |
    163 | 164 | 1 165 | 166 |

    smoke

    167 |

    1 tests

    168 |
    169 |
    170 |
    171 |

    smoke

    172 | 1 passed 173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 189 | 190 | 191 |
    StatusTimestampTestName
    Pass19:57:36 PM 187 | TestUserLogin 188 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |

Started

207 |

Sunday, November 13, 2022, 07:57 PM (IST)

208 |
209 |
210 |
211 |
212 |

Ended

213 |

Sunday, November 13, 2022, 07:57 PM (IST)

214 |
215 |
216 |
217 |
218 |

Tests Passed

219 |

1

220 |
221 |
222 |
223 |
224 |

Tests Failed

225 |

0

226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
Tests
234 |
235 |
236 |
237 | 238 |
239 |
240 | 251 |
252 |
253 |
254 |
255 |
256 |
Log events
257 |
258 |
259 |
260 | 261 |
262 |
263 | 271 |
272 |
273 |
274 |
275 |

Timeline

276 |
277 | 278 |
279 |
280 |
281 | 286 |
287 |
288 |
289 |

Tags

290 |
291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
NamePassedFailedSkippedOthersPassed %
smoke1000100%
302 |
303 |
304 |
305 |
306 |

System/Environment

307 |
308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 |
NameValue
Tester is: Japneet Sachdeva
316 |
317 |
318 |
319 |
320 |
347 |
348 |
349 |
350 | 351 | 352 | -------------------------------------------------------------------------------- /reports/13_11_2022/07_58_47.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Test Results 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
43 |
44 | 61 |
62 |
63 |
64 |
65 |
66 |
67 | 70 |
    71 | 79 | 85 |
86 |
87 |
    88 |
  • 92 |
    93 |

    TestUserLogin

    94 |

    95 | 7:58:51 PM / 00:00:05:572 96 | Pass 97 |

    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    TestUserLogin
    104 | 11.13.2022 7:58:51 PM 105 | 11.13.2022 7:58:56 PM 106 | 00:00:05:572 107 | · #test-id=1 108 | 109 | 110 |
    111 |
    smoke
    112 |
    Description for test: Test user is able to login
    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 |
    StatusTimestampDetails
    Info7:58:51 PM 122 | Driver Start Time: 19:58:51 123 |
    Pass7:58:56 PM 129 | TestUserLoginis successful!! 130 |
    Info7:58:56 PM 136 | Driver quit time: 19:58:56 137 |
    141 |
    142 |
    143 |
  • 144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 |
159 |
160 |
    161 |
  • 162 |
    163 | 164 | 1 165 | 166 |

    smoke

    167 |

    1 tests

    168 |
    169 |
    170 |
    171 |

    smoke

    172 | 1 passed 173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 189 | 190 | 191 |
    StatusTimestampTestName
    Pass19:58:51 PM 187 | TestUserLogin 188 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |

Started

207 |

Sunday, November 13, 2022, 07:58 PM (IST)

208 |
209 |
210 |
211 |
212 |

Ended

213 |

Sunday, November 13, 2022, 07:58 PM (IST)

214 |
215 |
216 |
217 |
218 |

Tests Passed

219 |

1

220 |
221 |
222 |
223 |
224 |

Tests Failed

225 |

0

226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
Tests
234 |
235 |
236 |
237 | 238 |
239 |
240 | 251 |
252 |
253 |
254 |
255 |
256 |
Log events
257 |
258 |
259 |
260 | 261 |
262 |
263 | 271 |
272 |
273 |
274 |
275 |

Timeline

276 |
277 | 278 |
279 |
280 |
281 | 286 |
287 |
288 |
289 |

Tags

290 |
291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
NamePassedFailedSkippedOthersPassed %
smoke1000100%
302 |
303 |
304 |
305 |
306 |

System/Environment

307 |
308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 |
NameValue
Tester is: Japneet Sachdeva
316 |
317 |
318 |
319 |
320 |
347 |
348 |
349 |
350 | 351 | 352 | -------------------------------------------------------------------------------- /reports/13_11_2022/08_07_23.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Test Results 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
43 |
44 | 61 |
62 |
63 |
64 |
65 |
66 |
67 | 70 |
    71 | 79 | 85 |
86 |
87 |
    88 |
  • 92 |
    93 |

    TestUserLogin

    94 |

    95 | 8:07:25 PM / 00:00:05:853 96 | Pass 97 |

    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    TestUserLogin
    104 | 11.13.2022 8:07:25 PM 105 | 11.13.2022 8:07:31 PM 106 | 00:00:05:853 107 | · #test-id=1 108 | 109 | 110 |
    111 |
    smoke
    112 |
    Description for test: Test user is able to login and routed to Account Page
    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 |
    StatusTimestampDetails
    Info8:07:25 PM 122 | Driver Start Time: 20:07:25 123 |
    Pass8:07:31 PM 129 | TestUserLoginis successful!! 130 |
    Info8:07:31 PM 136 | Driver quit time: 20:07:31 137 |
    141 |
    142 |
    143 |
  • 144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 |
159 |
160 |
    161 |
  • 162 |
    163 | 164 | 1 165 | 166 |

    smoke

    167 |

    1 tests

    168 |
    169 |
    170 |
    171 |

    smoke

    172 | 1 passed 173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 189 | 190 | 191 |
    StatusTimestampTestName
    Pass20:07:25 PM 187 | TestUserLogin 188 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |

Started

207 |

Sunday, November 13, 2022, 08:07 PM (IST)

208 |
209 |
210 |
211 |
212 |

Ended

213 |

Sunday, November 13, 2022, 08:07 PM (IST)

214 |
215 |
216 |
217 |
218 |

Tests Passed

219 |

1

220 |
221 |
222 |
223 |
224 |

Tests Failed

225 |

0

226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
Tests
234 |
235 |
236 |
237 | 238 |
239 |
240 | 251 |
252 |
253 |
254 |
255 |
256 |
Log events
257 |
258 |
259 |
260 | 261 |
262 |
263 | 271 |
272 |
273 |
274 |
275 |

Timeline

276 |
277 | 278 |
279 |
280 |
281 | 286 |
287 |
288 |
289 |

Tags

290 |
291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
NamePassedFailedSkippedOthersPassed %
smoke1000100%
302 |
303 |
304 |
305 |
306 |

System/Environment

307 |
308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 |
NameValue
Tester is: Japneet Sachdeva
316 |
317 |
318 |
319 |
320 |
347 |
348 |
349 |
350 | 351 | 352 | -------------------------------------------------------------------------------- /reports/13_11_2022/08_19_24.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Test Results 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |
43 |
44 | 61 |
62 |
63 |
64 |
65 |
66 |
67 | 70 |
    71 | 79 | 85 |
86 |
87 |
    88 |
  • 92 |
    93 |

    TestNegativeUserLogin

    94 |

    95 | 8:19:28 PM / 00:00:05:643 96 | Pass 97 |

    98 |
    99 |
    100 |
    101 |
    102 |
    103 |
    TestNegativeUserLogin
    104 | 11.13.2022 8:19:28 PM 105 | 11.13.2022 8:19:34 PM 106 | 00:00:05:643 107 | · #test-id=1 108 | 109 | 110 |
    111 |
    smoke
    112 |
    Description for test: Test user is no able to login
    113 |
    114 |
    115 | 116 | 117 | 118 | 119 | 120 | 121 | 124 | 125 | 126 | 127 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 139 | 140 |
    StatusTimestampDetails
    Info8:19:28 PM 122 | Driver Start Time: 20:19:28 123 |
    Pass8:19:33 PM 129 | TestNegativeUserLoginis successful!! 130 |
    Info8:19:34 PM 136 | Driver quit time: 20:19:34 137 |
    141 |
    142 |
    143 |
  • 144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 |
159 |
160 |
    161 |
  • 162 |
    163 | 164 | 1 165 | 166 |

    smoke

    167 |

    1 tests

    168 |
    169 |
    170 |
    171 |

    smoke

    172 | 1 passed 173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 189 | 190 | 191 |
    StatusTimestampTestName
    Pass20:19:28 PM 187 | TestNegativeUserLogin 188 |
    192 |
    193 |
  • 194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |

Started

207 |

Sunday, November 13, 2022, 08:19 PM (IST)

208 |
209 |
210 |
211 |
212 |

Ended

213 |

Sunday, November 13, 2022, 08:19 PM (IST)

214 |
215 |
216 |
217 |
218 |

Tests Passed

219 |

1

220 |
221 |
222 |
223 |
224 |

Tests Failed

225 |

0

226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
Tests
234 |
235 |
236 |
237 | 238 |
239 |
240 | 251 |
252 |
253 |
254 |
255 |
256 |
Log events
257 |
258 |
259 |
260 | 261 |
262 |
263 | 271 |
272 |
273 |
274 |
275 |

Timeline

276 |
277 | 278 |
279 |
280 |
281 | 286 |
287 |
288 |
289 |

Tags

290 |
291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
NamePassedFailedSkippedOthersPassed %
smoke1000100%
302 |
303 |
304 |
305 |
306 |

System/Environment

307 |
308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 |
NameValue
Tester is: Japneet Sachdeva
316 |
317 |
318 |
319 |
320 |
347 |
348 |
349 |
350 | 351 | 352 | -------------------------------------------------------------------------------- /src/main/java/base/Commons.java: -------------------------------------------------------------------------------- 1 | package base; 2 | 3 | import com.fasterxml.jackson.core.type.TypeReference; 4 | import com.fasterxml.jackson.databind.ObjectMapper; 5 | import org.apache.commons.io.FileUtils; 6 | 7 | import java.io.File; 8 | import java.io.IOException; 9 | import java.nio.charset.StandardCharsets; 10 | import java.util.HashMap; 11 | import java.util.List; 12 | 13 | public class Commons 14 | { 15 | public List> getjsonData(String jsonFilePath) throws IOException 16 | { 17 | //TODO: Convert json file content to JSON string 18 | String jsonContent = FileUtils.readFileToString(new File(jsonFilePath), StandardCharsets.UTF_8); 19 | 20 | ObjectMapper mapper = new ObjectMapper(); 21 | List> data = mapper.readValue(jsonContent, new TypeReference>>() { 22 | 23 | }); 24 | return data; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/base/CustomWaits.java: -------------------------------------------------------------------------------- 1 | package base; 2 | 3 | public class CustomWaits 4 | { 5 | public static void staticWait(int sleepTimeInSeconds) 6 | { 7 | try { 8 | Thread.sleep(sleepTimeInSeconds* 1000L); 9 | } catch (InterruptedException e) { 10 | throw new RuntimeException(e); 11 | } 12 | } 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/base/SetupDriver.java: -------------------------------------------------------------------------------- 1 | package base; 2 | 3 | 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.chrome.ChromeDriver; 6 | import org.openqa.selenium.edge.EdgeDriver; 7 | import org.openqa.selenium.firefox.FirefoxDriver; 8 | 9 | public class SetupDriver extends Commons 10 | { 11 | public WebDriver driver; 12 | public String browserTypeKey; 13 | //TODO: Will help to trigger browser depending upon user selection 14 | public void setupDriver() 15 | { 16 | if(browserTypeKey.equalsIgnoreCase("chrome")) 17 | { 18 | driver = new ChromeDriver(); 19 | } else if (browserTypeKey.equalsIgnoreCase("firefox")) 20 | { 21 | driver = new FirefoxDriver(); 22 | } else if (browserTypeKey.equalsIgnoreCase("edge")) 23 | { 24 | driver = new EdgeDriver(); 25 | } else 26 | { 27 | System.out.println("Driver not supported!!!"); 28 | } 29 | 30 | driver.manage().window().maximize(); 31 | driver.manage().deleteAllCookies(); 32 | } 33 | 34 | public void quitDriver() 35 | { 36 | driver.quit(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/pages/HomePage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | 6 | import static base.CustomWaits.staticWait; 7 | import static utils.PropertyReaderHelper.getCustomProperty; 8 | 9 | // page_url = https://naveenautomationlabs.com/opencart/ 10 | public class HomePage 11 | { 12 | public WebDriver driver; 13 | 14 | //locators 15 | private final By profileSwitch = By.xpath("//a[@title='My Account']"); 16 | private final By loginBtn = By.xpath("//a[@href='https://naveenautomationlabs.com/opencart/index.php?route=account/login']"); 17 | 18 | public HomePage(WebDriver driver) 19 | { 20 | this.driver = driver; 21 | } 22 | 23 | public void loadHomePage() 24 | { 25 | System.out.println(getCustomProperty("homePageUrl")); 26 | driver.get(getCustomProperty("homePageUrl")); 27 | staticWait(2); 28 | } 29 | 30 | public LoginPage goToLoginPage() 31 | { 32 | driver.findElement(profileSwitch).click(); 33 | driver.findElement(loginBtn).click(); 34 | staticWait(2); 35 | return new LoginPage(driver); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/pages/LoginPage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import pages.products.AccountPage; 6 | 7 | import static base.CustomWaits.staticWait; 8 | 9 | // page_url = https://naveenautomationlabs.com/opencart/index.php?route=account/login 10 | public class LoginPage 11 | { 12 | protected WebDriver driver; 13 | 14 | //locators 15 | private final By emailId = By.xpath("//*[@id='input-email']"); 16 | private final By password = By.xpath("//*[@id='input-password']"); 17 | private final By loginBtn = By.xpath("//input[@type='submit']"); 18 | private final By incorrectLoginWarning = By.xpath("//div[contains(text(),' Warning: No match for E-Mail Address and/or Password.')]"); 19 | public LoginPage(WebDriver driver) 20 | { 21 | this.driver = driver; 22 | } 23 | 24 | public void routeToLoginPage(String url) 25 | { 26 | driver.get(url); 27 | } 28 | public void setEmailId(String email) 29 | { 30 | driver.findElement(emailId).sendKeys(email); 31 | } 32 | 33 | public void setPassword(String pswd) 34 | { 35 | driver.findElement(password).sendKeys(pswd); 36 | } 37 | 38 | public void setLoginBtn() 39 | { 40 | driver.findElement(loginBtn).click(); 41 | } 42 | 43 | public AccountPage loginUser(String email, String pswd) 44 | { 45 | setEmailId(email); 46 | staticWait(1); 47 | setPassword(pswd); 48 | staticWait(1); 49 | setLoginBtn(); 50 | staticWait(2); 51 | 52 | return new AccountPage(driver); 53 | } 54 | 55 | public String getIncorrectLoginWarning() 56 | { 57 | return driver.findElement(incorrectLoginWarning).getText(); 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/pages/RegisterPage.java: -------------------------------------------------------------------------------- 1 | package pages; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import pages.products.AccountPage; 6 | 7 | import static base.CustomWaits.staticWait; 8 | 9 | // page_url = https://naveenautomationlabs.com/opencart/index.php?route=account/register 10 | public class RegisterPage 11 | { 12 | WebDriver driver; 13 | 14 | //locators 15 | private final By firstName = By.xpath("//*[@id='input-firstname']"); 16 | private final By lastName = By.xpath("//*[@id='input-lastname']"); 17 | private final By email = By.xpath("//*[@id='input-email']"); 18 | private final By telephone = By.xpath("//*[@id='input-telephone']"); 19 | private final By password = By.xpath("//*[@id='input-password']"); 20 | private final By confirmPswd = By.xpath("//*[@id='input-confirm']"); 21 | private final By agreePrivacyPolicy = By.xpath("//input[@name='agree']"); 22 | 23 | private final By continueBtn = By.xpath("//input[@type='submit']"); 24 | private final String page_url = "https://naveenautomationlabs.com/opencart/index.php?route=account/register"; 25 | 26 | public RegisterPage(WebDriver driver) 27 | { 28 | this.driver = driver; 29 | } 30 | 31 | public void routeToRegisterPage() 32 | { 33 | driver.get(page_url); 34 | staticWait(2); 35 | } 36 | 37 | public void setFirstName(String fName) 38 | { 39 | driver.findElement(firstName).sendKeys(fName); 40 | } 41 | 42 | public void setLastName(String lName) 43 | { 44 | driver.findElement(lastName).sendKeys(lName); 45 | } 46 | 47 | public void setEmail(String Email) 48 | { 49 | driver.findElement(email).sendKeys(Email); 50 | } 51 | 52 | public void setTelephone(String number) 53 | { 54 | driver.findElement(telephone).sendKeys(number); 55 | } 56 | 57 | public void setPassword(String pswd) 58 | { 59 | driver.findElement(password).sendKeys(pswd); 60 | } 61 | 62 | public void setConfirmPswd(String cPswd) 63 | { 64 | driver.findElement(confirmPswd).sendKeys(cPswd); 65 | } 66 | 67 | public void setAgreePrivacyPolicy() 68 | { 69 | driver.findElement(agreePrivacyPolicy).click(); 70 | } 71 | 72 | public void setContinueBtn() 73 | { 74 | driver.findElement(continueBtn).click(); 75 | } 76 | 77 | public AccountPage RegisterUser(String fName, String lName, String Email, String number, 78 | String pswd) 79 | { 80 | setFirstName(fName); 81 | staticWait(1); 82 | setLastName(lName); 83 | staticWait(1); 84 | setEmail(Email); 85 | staticWait(1); 86 | setTelephone(number); 87 | staticWait(1); 88 | setPassword(pswd); 89 | staticWait(1); 90 | setConfirmPswd(pswd); 91 | staticWait(1); 92 | setAgreePrivacyPolicy(); 93 | staticWait(1); 94 | setContinueBtn(); 95 | staticWait(10); 96 | return new AccountPage(driver); 97 | } 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/main/java/pages/products/AccountPage.java: -------------------------------------------------------------------------------- 1 | package pages.products; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | 6 | public class AccountPage 7 | { 8 | public WebDriver driver; 9 | 10 | public AccountPage(WebDriver driver) 11 | { 12 | this.driver = driver; 13 | } 14 | 15 | //locators 16 | private final By accountText = By.xpath("//div[@id='content']//h2[contains(text(),'Account')]"); 17 | private final By accountCreatedText = By.xpath("//div[@id='content']//h1"); 18 | 19 | public String getAccountText() 20 | { 21 | return driver.findElement(accountText).getText(); 22 | } 23 | 24 | public String getAccountCreatedText() 25 | { 26 | return driver.findElement(accountCreatedText).getText(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/pages/products/DesktopPage.java: -------------------------------------------------------------------------------- 1 | package pages.products; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | 5 | // page_url = https://naveenautomationlabs.com/opencart/index.php?route=product/category&path=20 6 | public class DesktopPage 7 | { 8 | WebDriver driver; 9 | public DesktopPage(WebDriver driver) 10 | { 11 | this.driver = driver; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/pages/products/LaptopPage.java: -------------------------------------------------------------------------------- 1 | package pages.products; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | 5 | // page_url = https://naveenautomationlabs.com/opencart/index.php?route=product/category&path=18 6 | public class LaptopPage 7 | { 8 | WebDriver driver; 9 | public LaptopPage(WebDriver driver) 10 | { 11 | this.driver = driver; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/utils/ExtentReportHelper.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import com.aventstack.extentreports.ExtentReports; 4 | import com.aventstack.extentreports.reporter.ExtentSparkReporter; 5 | import com.aventstack.extentreports.reporter.configuration.Theme; 6 | 7 | import java.time.LocalDateTime; 8 | import java.time.format.DateTimeFormatter; 9 | 10 | public class ExtentReportHelper 11 | { 12 | public static ExtentReports reports; 13 | static DateTimeFormatter dtf = DateTimeFormatter.ofPattern("dd_MM_yyyy\\hh_mm_ss"); 14 | 15 | public static ExtentReports getReportObject() 16 | { 17 | 18 | String reportPath = "./reports/"+dtf.format(LocalDateTime.now()); 19 | //System.out.println(reportPath); 20 | ExtentSparkReporter sparkReporter = new ExtentSparkReporter(reportPath); 21 | 22 | sparkReporter.config().setTimeStampFormat("EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'"); 23 | sparkReporter.config().setTheme(Theme.DARK); 24 | sparkReporter.config().setReportName("Automation Results"); 25 | sparkReporter.config().setDocumentTitle("Test Results"); 26 | sparkReporter.config().setJs("document.getElementsByClassName('col-sm-12 col-md-4')[0].style.setProperty('min-inline-size','-webkit-fill-available');"); 27 | 28 | 29 | reports = new ExtentReports(); 30 | reports.attachReporter(sparkReporter); 31 | 32 | reports.setSystemInfo("Tester is: ", "Japneet Sachdeva"); 33 | return reports; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/utils/ListenerHelper.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import com.aventstack.extentreports.ExtentReports; 4 | import com.aventstack.extentreports.ExtentTest; 5 | import com.aventstack.extentreports.MediaEntityBuilder; 6 | import com.aventstack.extentreports.Status; 7 | import com.aventstack.extentreports.markuputils.ExtentColor; 8 | import com.aventstack.extentreports.markuputils.MarkupHelper; 9 | import lombok.SneakyThrows; 10 | import org.openqa.selenium.WebDriver; 11 | import org.openqa.selenium.remote.RemoteWebDriver; 12 | import org.testng.ITestContext; 13 | import org.testng.ITestListener; 14 | import org.testng.ITestResult; 15 | 16 | import java.time.LocalDateTime; 17 | import java.time.format.DateTimeFormatter; 18 | 19 | import static utils.ExtentReportHelper.getReportObject; 20 | 21 | public class ListenerHelper implements ITestListener 22 | { 23 | private final ExtentReports extentReports = getReportObject(); 24 | ExtentTest logger; 25 | //ThreadLocal to generate the report for parallel execution 26 | ThreadLocal extentTestThreadLocal = new ThreadLocal<>(); 27 | 28 | DateTimeFormatter dtf = DateTimeFormatter.ofPattern("HH:mm:ss"); 29 | 30 | public void onTestStart(ITestResult result) 31 | { 32 | logger = extentReports.createTest(result.getMethod().getMethodName(), 33 | " Description for test: "+result.getMethod().getDescription()); 34 | extentTestThreadLocal.set(logger); 35 | logger.assignCategory(result.getMethod().getGroups()); 36 | extentTestThreadLocal.get().log(Status.INFO, "Driver Start Time: "+ dtf.format(LocalDateTime.now())); 37 | } 38 | 39 | public void onTestSuccess(ITestResult result) 40 | { 41 | extentTestThreadLocal.get().log(Status.PASS, MarkupHelper.createLabel(result.getMethod().getMethodName()+"is successful!!", ExtentColor.GREEN)); 42 | } 43 | 44 | @SneakyThrows 45 | public void onTestFailure(ITestResult result) 46 | { 47 | extentTestThreadLocal.get().log(Status.FAIL, MarkupHelper.createLabel((result.getMethod().getMethodName()+"is failed!!"), ExtentColor.RED)); 48 | extentTestThreadLocal.get().log(Status.FAIL, result.getThrowable()); 49 | } 50 | 51 | 52 | public void onTestSkipped(ITestResult result) { 53 | // not implemented 54 | 55 | 56 | } 57 | 58 | public void onTestFailedButWithinSuccessPercentage(ITestResult result) { 59 | // not implemented 60 | } 61 | 62 | public void onTestFailedWithTimeout(ITestResult result) { 63 | 64 | } 65 | 66 | public void onStart(ITestContext context) { 67 | // not implemented 68 | } 69 | 70 | public void onFinish(ITestContext context) 71 | { 72 | extentTestThreadLocal.get().log(Status.INFO, "Driver quit time: "+ dtf.format(LocalDateTime.now())); 73 | extentReports.flush(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/utils/PropertyReaderHelper.java: -------------------------------------------------------------------------------- 1 | package utils; 2 | 3 | import java.io.FileInputStream; 4 | import java.util.Properties; 5 | 6 | public class PropertyReaderHelper 7 | { 8 | private static Properties properties = new Properties(); 9 | private final static String propFilePath = System.getProperty("user.dir")+"/src/main/resources/config.properties"; 10 | public static String getCustomProperty(String customPropertyName) 11 | { 12 | try { 13 | properties.load(new FileInputStream(propFilePath)); 14 | } catch (Exception e) { 15 | e.printStackTrace(); 16 | } 17 | 18 | return properties.getProperty(customPropertyName); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | homePageUrl = https://naveenautomationlabs.com/opencart/ 2 | loginPageUrl = https://naveenautomationlabs.com/opencart/index.php?route=account/login 3 | username = opencart@mailinator.com 4 | password = Hello123# 5 | 6 | incorrectUsername = opencart@Hello.com -------------------------------------------------------------------------------- /src/test/java/pageTests/HomePageTests.java: -------------------------------------------------------------------------------- 1 | package pageTests; 2 | 3 | import org.testng.annotations.Listeners; 4 | import org.testng.annotations.Test; 5 | import testConfig.BaseTest; 6 | 7 | 8 | @Listeners(utils.ListenerHelper.class) 9 | 10 | public class HomePageTests extends BaseTest 11 | { 12 | //PageObjects 13 | //HomePage homePage; 14 | 15 | public HomePageTests() 16 | { 17 | key = "homepage"; 18 | } 19 | 20 | @Test(priority = 1, groups = {"smoke"}, 21 | description = "Test routing to Homepage is working fine") 22 | public void testURLLoading() 23 | { 24 | homePage.loadHomePage(); 25 | } 26 | 27 | @Test(priority = 2,groups = {"regression"}, 28 | description = "Test routing to login page is working from Homepage") 29 | public void testLoginPageRouting() 30 | { 31 | homePage.loadHomePage(); 32 | homePage.goToLoginPage(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/test/java/pageTests/LoginPageTests.java: -------------------------------------------------------------------------------- 1 | package pageTests; 2 | 3 | import org.testng.Assert; 4 | import org.testng.annotations.Listeners; 5 | import org.testng.annotations.Test; 6 | import testConfig.BaseTest; 7 | 8 | import java.awt.image.PackedColorModel; 9 | 10 | import static utils.PropertyReaderHelper.getCustomProperty; 11 | 12 | @Listeners(utils.ListenerHelper.class) 13 | 14 | public class LoginPageTests extends BaseTest 15 | { 16 | public LoginPageTests() 17 | { 18 | key = "loginPage"; 19 | } 20 | 21 | @Test(priority = 1, groups = {"smoke"}, description = "Test user is able to login and routed to Account Page") 22 | public void TestPositiveUserLogin() 23 | { 24 | loginPage.routeToLoginPage(getCustomProperty("loginPageUrl")); 25 | accountPage = loginPage.loginUser(getCustomProperty("username"), 26 | getCustomProperty("password")); 27 | Assert.assertEquals(accountPage.getAccountText(), "My Account"); 28 | 29 | } 30 | 31 | @Test(priority = 2, groups = {"smoke"}, description = "Test user is no able to login") 32 | public void TestNegativeUserLogin() 33 | { 34 | loginPage.routeToLoginPage(getCustomProperty("loginPageUrl")); 35 | loginPage.loginUser(getCustomProperty("incorrectUsername"), 36 | getCustomProperty("password")); 37 | String text = loginPage.getIncorrectLoginWarning(); 38 | Assert.assertEquals(text, "Warning: No match for E-Mail Address and/or Password."); 39 | System.out.println(text); 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/test/java/pageTests/ProductTests/DesktopPageTests.java: -------------------------------------------------------------------------------- 1 | package pageTests.ProductTests; 2 | 3 | public class DesktopPageTests { 4 | } 5 | -------------------------------------------------------------------------------- /src/test/java/pageTests/ProductTests/LaptopPageTests.java: -------------------------------------------------------------------------------- 1 | package pageTests.ProductTests; 2 | 3 | public class LaptopPageTests { 4 | } 5 | -------------------------------------------------------------------------------- /src/test/java/pageTests/RegisterPageTests.java: -------------------------------------------------------------------------------- 1 | package pageTests; 2 | 3 | import org.testng.Assert; 4 | import org.testng.annotations.DataProvider; 5 | import org.testng.annotations.Test; 6 | import testConfig.BaseTest; 7 | 8 | import java.io.IOException; 9 | import java.util.HashMap; 10 | import java.util.List; 11 | 12 | public class RegisterPageTests extends BaseTest { 13 | public RegisterPageTests() { 14 | key = "registerPage"; 15 | } 16 | 17 | @Test(priority = 1, groups = {"regression"}, description = "Register a new user and is routed to Account page", 18 | dataProvider = "getRegisterUserData") 19 | public void testPositiveRegistrationOfUser(HashMap input) 20 | { 21 | registerPage.routeToRegisterPage(); 22 | accountPage = registerPage.RegisterUser(input.get("fName"),input.get("lName"),input.get("email"), 23 | input.get("telephone"), input.get("password")); 24 | String text = accountPage.getAccountCreatedText(); 25 | Assert.assertEquals(text,"Your Account Has Been Created!"); 26 | } 27 | 28 | @DataProvider 29 | public Object[][] getRegisterUserData() throws IOException 30 | { 31 | List> data = getjsonData(System.getProperty("user.dir") + "/src/test/java/testData/ecom_login_data.json"); 32 | return new Object[][] 33 | { 34 | {data.get(0)} 35 | }; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/test/java/testConfig/BaseTest.java: -------------------------------------------------------------------------------- 1 | package testConfig; 2 | 3 | import base.SetupDriver; 4 | import org.openqa.selenium.WebDriver; 5 | import org.testng.annotations.AfterMethod; 6 | import org.testng.annotations.BeforeMethod; 7 | import pages.HomePage; 8 | import pages.LoginPage; 9 | import pages.RegisterPage; 10 | import pages.products.AccountPage; 11 | import pages.products.DesktopPage; 12 | import pages.products.LaptopPage; 13 | 14 | public class BaseTest extends SetupDriver 15 | { 16 | //PageObjects 17 | public HomePage homePage; 18 | protected LoginPage loginPage; 19 | protected RegisterPage registerPage; 20 | protected DesktopPage desktopPage; 21 | protected LaptopPage laptopPage; 22 | protected AccountPage accountPage; 23 | 24 | //Key for pageObject initialization 25 | protected String key; 26 | 27 | public BaseTest() 28 | { 29 | browserTypeKey = "chrome"; 30 | } 31 | @BeforeMethod(alwaysRun = true) 32 | public void setup() 33 | { 34 | setupDriver(); 35 | if(key.equalsIgnoreCase("homepage")) 36 | { 37 | homePage = new HomePage(driver); 38 | } else if(key.equalsIgnoreCase("loginpage")) 39 | { 40 | loginPage = new LoginPage(driver); 41 | } else if(key.equalsIgnoreCase("registerpage")) 42 | { 43 | registerPage = new RegisterPage(driver); 44 | } else if(key.equalsIgnoreCase("desktoppage")) 45 | { 46 | desktopPage = new DesktopPage(driver); 47 | } else if(key.equalsIgnoreCase("laptoppage")) 48 | { 49 | laptopPage = new LaptopPage(driver); 50 | } else if (key.equalsIgnoreCase("accountpage")) 51 | { 52 | accountPage = new AccountPage(driver); 53 | } else { 54 | System.out.println("Page not yet defined!!"); 55 | } 56 | } 57 | 58 | @AfterMethod(alwaysRun = true) 59 | public void tearDown() 60 | { 61 | quitDriver(); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/test/java/testData/ecom_login_data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "fName": "Open", 4 | "lName": "Cart", 5 | "email": "opencar@mailinator.com", 6 | "telephone": "3332221144", 7 | "password": "Hello12" 8 | } 9 | ] -------------------------------------------------------------------------------- /suites/allTestSuite_testNG.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /suites/regression_testNG.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /suites/smoke_testNG.xml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /target/classes/base/Commons$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/base/Commons$1.class -------------------------------------------------------------------------------- /target/classes/base/Commons.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/base/Commons.class -------------------------------------------------------------------------------- /target/classes/base/CustomWaits.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/base/CustomWaits.class -------------------------------------------------------------------------------- /target/classes/base/SetupDriver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/base/SetupDriver.class -------------------------------------------------------------------------------- /target/classes/config.properties: -------------------------------------------------------------------------------- 1 | homePageUrl = https://naveenautomationlabs.com/opencart/ 2 | loginPageUrl = https://naveenautomationlabs.com/opencart/index.php?route=account/login 3 | username = opencart@mailinator.com 4 | password = Hello123# 5 | 6 | incorrectUsername = opencart@Hello.com -------------------------------------------------------------------------------- /target/classes/pages/HomePage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/pages/HomePage.class -------------------------------------------------------------------------------- /target/classes/pages/LoginPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/pages/LoginPage.class -------------------------------------------------------------------------------- /target/classes/pages/RegisterPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/pages/RegisterPage.class -------------------------------------------------------------------------------- /target/classes/pages/products/AccountPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/pages/products/AccountPage.class -------------------------------------------------------------------------------- /target/classes/pages/products/DesktopPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/pages/products/DesktopPage.class -------------------------------------------------------------------------------- /target/classes/pages/products/LaptopPage.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/pages/products/LaptopPage.class -------------------------------------------------------------------------------- /target/classes/utils/ExtentReportHelper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/utils/ExtentReportHelper.class -------------------------------------------------------------------------------- /target/classes/utils/ListenerHelper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/utils/ListenerHelper.class -------------------------------------------------------------------------------- /target/classes/utils/PropertyReaderHelper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/classes/utils/PropertyReaderHelper.class -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\utils\ExtentReportHelper.java 2 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\base\SetupDriver.java 3 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\pages\LoginPage.java 4 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\pages\products\AccountPage.java 5 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\base\Commons.java 6 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\pages\products\DesktopPage.java 7 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\utils\ListenerHelper.java 8 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\pages\RegisterPage.java 9 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\pages\HomePage.java 10 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\pages\products\LaptopPage.java 11 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\utils\PropertyReaderHelper.java 12 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\main\java\base\CustomWaits.java 13 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\test\java\pageTests\ProductTests\DesktopPageTests.java 2 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\test\java\pageTests\LoginPageTests.java 3 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\test\java\pageTests\ProductTests\LaptopPageTests.java 4 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\test\java\pageTests\HomePageTests.java 5 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\test\java\testConfig\BaseTest.java 6 | C:\Users\Japneet Sachdeva\AquaProjects\OpenCart\src\test\java\pageTests\RegisterPageTests.java 7 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/HomePageTests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: HomePageTests 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

HomePageTests

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:2/0/0
Started on:Mon Nov 14 14:47:43 IST 2022
Total time:13 seconds (13211 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
testLoginPageRouting
Test class: pageTests.HomePageTests
Test method: Test routing to login page is working from Homepage
5pageTests.HomePageTests@7c24b813
testURLLoading
Test class: pageTests.HomePageTests
Test method: Test routing to Homepage is working fine
3pageTests.HomePageTests@7c24b813

88 | 89 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/HomePageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/LoginPageTests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: LoginPageTests 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

LoginPageTests

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:2/0/0
Started on:Mon Nov 14 14:47:43 IST 2022
Total time:16 seconds (16268 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
TestNegativeUserLogin
Test class: pageTests.LoginPageTests
Test method: Test user is no able to login
5pageTests.LoginPageTests@2c1b194a
TestPositiveUserLogin
Test class: pageTests.LoginPageTests
Test method: Test user is able to login and routed to Account Page
5pageTests.LoginPageTests@2c1b194a

88 | 89 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/LoginPageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/RegisterPageTests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: RegisterPageTests 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

RegisterPageTests

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/1/0
Started on:Mon Nov 14 14:47:57 IST 2022
Total time:22 seconds (22434 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 113 | 114 | 115 |
FAILED TESTS
Test methodExceptionTime (seconds)Instance
testPositiveRegistrationOfUser
Test class: pageTests.RegisterPageTests
Test method: Register a new user and is routed to Account page
Parameters: {lName=Cart, password=Hello12, telephone=3332221144, fName=Open, email=opencar@mailinator.com}
java.lang.AssertionError: expected [Your Account Has Been Created!] but found [Register Account]
 80 | 	at pageTests.RegisterPageTests.testPositiveRegistrationOfUser(RegisterPageTests.java:25)
 81 | 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
 82 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
 83 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
 84 | 	at java.base/java.lang.Thread.run(Thread.java:833)
 85 | ... Removed 20 stack frames
Click to show all stack frames 86 |
java.lang.AssertionError: expected [Your Account Has Been Created!] but found [Register Account]
 87 | 	at org.testng.Assert.fail(Assert.java:96)
 88 | 	at org.testng.Assert.failNotEquals(Assert.java:776)
 89 | 	at org.testng.Assert.assertEqualsImpl(Assert.java:137)
 90 | 	at org.testng.Assert.assertEquals(Assert.java:118)
 91 | 	at org.testng.Assert.assertEquals(Assert.java:453)
 92 | 	at org.testng.Assert.assertEquals(Assert.java:463)
 93 | 	at pageTests.RegisterPageTests.testPositiveRegistrationOfUser(RegisterPageTests.java:25)
 94 | 	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
 95 | 	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
 96 | 	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
 97 | 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:583)
 98 | 	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719)
 99 | 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989)
100 | 	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
101 | 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
102 | 	at org.testng.TestRunner.privateRun(TestRunner.java:648)
103 | 	at org.testng.TestRunner.run(TestRunner.java:505)
104 | 	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
105 | 	at org.testng.SuiteRunner.access$000(SuiteRunner.java:40)
106 | 	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:489)
107 | 	at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52)
108 | 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
109 | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
110 | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
111 | 	at java.base/java.lang.Thread.run(Thread.java:833)
112 | 
20pageTests.RegisterPageTests@71a8adcf

116 | 117 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/RegisterPageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /target/surefire-reports/All Test Suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /target/surefire-reports/TEST-testConfig.BaseTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 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 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /target/surefire-reports/TestSuite.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: TestSuite 3 | ------------------------------------------------------------------------------- 4 | Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 36.697 s <<< FAILURE! - in TestSuite 5 | pageTests.RegisterPageTests.testPositiveRegistrationOfUser[{lName=Cart, password=Hello12, telephone=3332221144, fName=Open, email=opencar@mailinator.com}](1) Time elapsed: 20.78 s <<< FAILURE! 6 | java.lang.AssertionError: expected [Your Account Has Been Created!] but found [Register Account] 7 | at org.testng.Assert.fail(Assert.java:96) 8 | at org.testng.Assert.failNotEquals(Assert.java:776) 9 | at org.testng.Assert.assertEqualsImpl(Assert.java:137) 10 | at org.testng.Assert.assertEquals(Assert.java:118) 11 | at org.testng.Assert.assertEquals(Assert.java:453) 12 | at org.testng.Assert.assertEquals(Assert.java:463) 13 | at pageTests.RegisterPageTests.testPositiveRegistrationOfUser(RegisterPageTests.java:25) 14 | at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) 15 | at java.base/java.lang.reflect.Method.invoke(Method.java:577) 16 | at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124) 17 | at org.testng.internal.Invoker.invokeMethod(Invoker.java:583) 18 | at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:719) 19 | at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:989) 20 | at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) 21 | at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) 22 | at org.testng.TestRunner.privateRun(TestRunner.java:648) 23 | at org.testng.TestRunner.run(TestRunner.java:505) 24 | at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) 25 | at org.testng.SuiteRunner.access$000(SuiteRunner.java:40) 26 | at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:489) 27 | at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52) 28 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 29 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 30 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 31 | at java.base/java.lang.Thread.run(Thread.java:833) 32 | 33 | -------------------------------------------------------------------------------- /target/surefire-reports/bullet_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/surefire-reports/bullet_point.png -------------------------------------------------------------------------------- /target/surefire-reports/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/surefire-reports/collapseall.gif -------------------------------------------------------------------------------- /target/surefire-reports/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG Report 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
Test# Passed# Skipped# FailedTime (ms)Included GroupsExcluded Groups
All Test Suite
HomePageTests20013,211
LoginPageTests20016,268
RegisterPageTests00122,434
Total40151,913
17 | 18 | 19 | 20 |
ClassMethodStartTime (ms)
All Test Suite
HomePageTests — passed
pageTests.HomePageTeststestLoginPageRouting16684174712365537
testURLLoading16684174662153645
LoginPageTests — passed
pageTests.LoginPageTestsTestNegativeUserLogin16684174739885616
TestPositiveUserLogin16684174661625978
RegisterPageTests — failed
pageTests.RegisterPageTeststestPositiveRegistrationOfUser166841747872120779
21 |

HomePageTests

pageTests.HomePageTests#testLoginPageRouting

back to summary

22 |

pageTests.HomePageTests#testURLLoading

back to summary

23 |

LoginPageTests

pageTests.LoginPageTests#TestNegativeUserLogin

back to summary

24 |

pageTests.LoginPageTests#TestPositiveUserLogin

back to summary

25 |

RegisterPageTests

pageTests.RegisterPageTests#testPositiveRegistrationOfUser

Parameter #1
{lName=Cart, password=Hello12, telephone=3332221144, fName=Open, email=opencar@mailinator.com}
Exception
java.lang.AssertionError: expected [Your Account Has Been Created!] but found [Register Account] 26 | at pageTests.RegisterPageTests.testPositiveRegistrationOfUser(RegisterPageTests.java:25) 27 | at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) 28 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 29 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 30 | at java.base/java.lang.Thread.run(Thread.java:833) 31 | ... Removed 20 stack frames

back to summary

32 | 33 | 34 | -------------------------------------------------------------------------------- /target/surefire-reports/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/surefire-reports/failed.png -------------------------------------------------------------------------------- /target/surefire-reports/junitreports/TEST-pageTests.HomePageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/junitreports/TEST-pageTests.LoginPageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/junitreports/TEST-pageTests.RegisterPageTests.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /target/surefire-reports/navigator-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/surefire-reports/navigator-bullet.png -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/HomePageTests.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=HomePageTests][SuiteResult context=LoginPageTests][SuiteResult context=RegisterPageTests] -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/LoginPageTests.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=HomePageTests][SuiteResult context=LoginPageTests][SuiteResult context=RegisterPageTests] -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/RegisterPageTests.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=HomePageTests][SuiteResult context=LoginPageTests][SuiteResult context=RegisterPageTests] -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/classes.html: -------------------------------------------------------------------------------- 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 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 |
Class nameMethod nameGroups
pageTests.LoginPageTests  
@Test
 TestNegativeUserLoginsmoke
 TestPositiveUserLoginsmoke
@BeforeClass
@BeforeMethod
 setup 
@AfterMethod
 tearDown 
@AfterClass
pageTests.HomePageTests  
@Test
 testLoginPageRoutingregression
 testURLLoadingsmoke
@BeforeClass
@BeforeMethod
 setup 
@AfterMethod
 tearDown 
@AfterClass
pageTests.RegisterPageTests  
@Test
 testPositiveRegistrationOfUserregression
@BeforeClass
@BeforeMethod
 setup 
@AfterMethod
 tearDown 
@AfterClass
110 | -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

2 | 3 | 4 |
Group nameMethods
regressionHomePageTests.testLoginPageRouting()[pri:2, instance:pageTests.HomePageTests@7c24b813]
RegisterPageTests.testPositiveRegistrationOfUser(java.util.HashMap)[pri:1, instance:pageTests.RegisterPageTests@71a8adcf]
smokeLoginPageTests.TestNegativeUserLogin()[pri:2, instance:pageTests.LoginPageTests@2c1b194a]
HomePageTests.testURLLoading()[pri:1, instance:pageTests.HomePageTests@7c24b813]
LoginPageTests.TestPositiveUserLogin()[pri:1, instance:pageTests.LoginPageTests@2c1b194a]
5 | -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/index.html: -------------------------------------------------------------------------------- 1 | Results for All Test Suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/main.html: -------------------------------------------------------------------------------- 1 | Results for All Test Suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


All Test Suite

(Hover the method name to see the test class name)

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 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
22/11/14 14:47:53 0      TestNegativeUserLoginTestNG-tests-2@1539635967
22/11/14 14:47:46 -7826      TestPositiveUserLoginTestNG-tests-2@1539635967
22/11/14 14:47:43 -10229     >>setup  TestNG-tests-1@753648373
22/11/14 14:47:43 -10229     >>setup  TestNG-tests-2@1539635967
22/11/14 14:47:50 -3944     >>setup  TestNG-tests-1@753648373
22/11/14 14:47:52 -1533     >>setup  TestNG-tests-2@1539635967
22/11/14 14:47:57 3409     >>setup  TestNG-tests-1@753648373
22/11/14 14:47:49 -4124     <<tearDown  TestNG-tests-1@753648373
22/11/14 14:47:52 -1847     <<tearDown  TestNG-tests-2@1539635967
22/11/14 14:47:56 2785     <<tearDown  TestNG-tests-1@753648373
22/11/14 14:47:59 5616     <<tearDown  TestNG-tests-2@1539635967
22/11/14 14:48:19 25515     <<tearDown  TestNG-tests-1@753648373
22/11/14 14:47:51 -2752      testLoginPageRoutingTestNG-tests-1@753648373
22/11/14 14:47:58 4733      testPositiveRegistrationOfUserTestNG-tests-1@753648373
22/11/14 14:47:46 -7773      testURLLoadingTestNG-tests-1@753648373
35 | -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


All Test Suite

(Hover the method name to see the test class name)

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 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
22/11/14 14:47:43 0     >>setup  TestNG-tests-1@753648373
22/11/14 14:47:43 0     >>setup  TestNG-tests-2@1539635967
22/11/14 14:47:46 2403      TestPositiveUserLoginTestNG-tests-2@1539635967
22/11/14 14:47:46 2456      testURLLoadingTestNG-tests-1@753648373
22/11/14 14:47:49 6105     <<tearDown  TestNG-tests-1@753648373
22/11/14 14:47:50 6285     >>setup  TestNG-tests-1@753648373
22/11/14 14:47:51 7477      testLoginPageRoutingTestNG-tests-1@753648373
22/11/14 14:47:52 8382     <<tearDown  TestNG-tests-2@1539635967
22/11/14 14:47:52 8696     >>setup  TestNG-tests-2@1539635967
22/11/14 14:47:53 10229      TestNegativeUserLoginTestNG-tests-2@1539635967
22/11/14 14:47:56 13014     <<tearDown  TestNG-tests-1@753648373
22/11/14 14:47:57 13638     >>setup  TestNG-tests-1@753648373
22/11/14 14:47:58 14962      testPositiveRegistrationOfUserTestNG-tests-1@753648373
22/11/14 14:47:59 15845     <<tearDown  TestNG-tests-2@1539635967
22/11/14 14:48:19 35744     <<tearDown  TestNG-tests-1@753648373
35 | -------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for All Test Suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="2" parallel="tests" name="All Test Suite" guice-stage="DEVELOPMENT" verbose="0">
  <listeners>
    <listener class-name="utils.ListenerHelper"/>
  </listeners>
  <test thread-count="2" parallel="tests" name="HomePageTests" verbose="0">
    <classes>
      <class name="pageTests.HomePageTests"/>
    </classes>
  </test> <!-- HomePageTests -->
  <test thread-count="2" parallel="tests" name="LoginPageTests" verbose="0">
    <classes>
      <class name="pageTests.LoginPageTests"/>
    </classes>
  </test> <!-- LoginPageTests -->
  <test thread-count="2" parallel="tests" name="RegisterPageTests" verbose="0">
    <classes>
      <class name="pageTests.RegisterPageTests"/>
    </classes>
  </test> <!-- RegisterPageTests -->
</suite> <!-- All Test Suite -->
-------------------------------------------------------------------------------- /target/surefire-reports/old/All Test Suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for All Test Suite 4 | 5 | 6 | 7 | 8 |

Results for
All Test Suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
3 tests3 classes5 methods:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
2 groupsreporter outputtestng.xml
23 | 24 |

29 |

25 |
RegisterPageTests (0/1/0) 26 | Results 27 |
28 |
30 | 31 | 32 |

37 |

33 |
HomePageTests (2/0/0) 34 | Results 35 |
36 |
38 | 39 | 40 |

45 |

41 |
LoginPageTests (2/0/0) 42 | Results 43 |
44 |
46 | -------------------------------------------------------------------------------- /target/surefire-reports/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total410 
All Test Suite410Link
10 | -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/Command line test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Command line test] -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
Class nameMethod nameGroups
7 | -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/index.html: -------------------------------------------------------------------------------- 1 | Results for testConfig.BaseTest 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/main.html: -------------------------------------------------------------------------------- 1 | Results for testConfig.BaseTest 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


testConfig.BaseTest

(Hover the method name to see the test class name)

2 | 3 | -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 |
-------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


testConfig.BaseTest

(Hover the method name to see the test class name)

2 | 3 | -------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for testConfig.BaseTest<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="testConfig.BaseTest" verbose="0">
  <test thread-count="5" name="Command line test" verbose="0">
    <classes>
      <class name="testConfig.BaseTest"/>
    </classes>
  </test> <!-- Command line test -->
</suite> <!-- testConfig.BaseTest -->
-------------------------------------------------------------------------------- /target/surefire-reports/old/testConfig.BaseTest/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for testConfig.BaseTest 4 | 5 | 6 | 7 | 8 |

Results for
testConfig.BaseTest

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test0 class0 method:
14 |   chronological
15 |   alphabetical
16 |   not run (0)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Command line test (0/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /target/surefire-reports/passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/surefire-reports/passed.png -------------------------------------------------------------------------------- /target/surefire-reports/skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/surefire-reports/skipped.png -------------------------------------------------------------------------------- /target/surefire-reports/testConfig.BaseTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: testConfig.BaseTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.325 sec 5 | -------------------------------------------------------------------------------- /target/surefire-reports/testConfig.BaseTest/Command line test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | TestNG: Command line test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Command line test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:0/0/0
Started on:Mon Nov 14 14:43:06 IST 2022
Total time:0 seconds (3 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | -------------------------------------------------------------------------------- /target/surefire-reports/testConfig.BaseTest/Command line test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0px 0px 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0px; 7 | } 8 | 9 | li { 10 | list-style-type: none; 11 | } 12 | 13 | a { 14 | text-decoration: none; 15 | } 16 | 17 | a:hover { 18 | text-decoration: underline; 19 | } 20 | 21 | .navigator-selected { 22 | background: #ffa500; 23 | } 24 | 25 | .wrapper { 26 | position: absolute; 27 | top: 60px; 28 | bottom: 0; 29 | left: 400px; 30 | right: 0; 31 | overflow: auto; 32 | } 33 | 34 | .navigator-root { 35 | position: absolute; 36 | top: 60px; 37 | bottom: 0; 38 | left: 0; 39 | width: 400px; 40 | overflow-y: auto; 41 | } 42 | 43 | .suite { 44 | margin: 0px 10px 10px 0px; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times; 52 | } 53 | 54 | .main-panel-header { 55 | padding: 5px; 56 | background-color: #9FB4D9; //afeeee; 57 | font-family: monospace; 58 | font-size: 18px; 59 | } 60 | 61 | .main-panel-content { 62 | padding: 5px; 63 | margin-bottom: 10px; 64 | background-color: #DEE8FC; //d0ffff; 65 | } 66 | 67 | .rounded-window { 68 | border-radius: 10px; 69 | border-style: solid; 70 | border-width: 1px; 71 | } 72 | 73 | .rounded-window-top { 74 | border-top-right-radius: 10px 10px; 75 | border-top-left-radius: 10px 10px; 76 | border-style: solid; 77 | border-width: 1px; 78 | overflow: auto; 79 | } 80 | 81 | .light-rounded-window-top { 82 | border-top-right-radius: 10px 10px; 83 | border-top-left-radius: 10px 10px; 84 | } 85 | 86 | .rounded-window-bottom { 87 | border-style: solid; 88 | border-width: 0px 1px 1px 1px; 89 | border-bottom-right-radius: 10px 10px; 90 | border-bottom-left-radius: 10px 10px; 91 | overflow: auto; 92 | } 93 | 94 | .method-name { 95 | font-size: 12px; 96 | font-family: monospace; 97 | } 98 | 99 | .method-content { 100 | border-style: solid; 101 | border-width: 0px 0px 1px 0px; 102 | margin-bottom: 10; 103 | padding-bottom: 5px; 104 | width: 80%; 105 | } 106 | 107 | .parameters { 108 | font-size: 14px; 109 | font-family: monospace; 110 | } 111 | 112 | .stack-trace { 113 | white-space: pre; 114 | font-family: monospace; 115 | font-size: 12px; 116 | font-weight: bold; 117 | margin-top: 0px; 118 | margin-left: 20px; 119 | } 120 | 121 | .testng-xml { 122 | font-family: monospace; 123 | } 124 | 125 | .method-list-content { 126 | margin-left: 10px; 127 | } 128 | 129 | .navigator-suite-content { 130 | margin-left: 10px; 131 | font: 12px 'Lucida Grande'; 132 | } 133 | 134 | .suite-section-title { 135 | margin-top: 10px; 136 | width: 80%; 137 | border-style: solid; 138 | border-width: 1px 0px 0px 0px; 139 | font-family: Times; 140 | font-size: 18px; 141 | font-weight: bold; 142 | } 143 | 144 | .suite-section-content { 145 | list-style-image: url(bullet_point.png); 146 | } 147 | 148 | .top-banner-root { 149 | position: absolute; 150 | top: 0; 151 | height: 45px; 152 | left: 0; 153 | right: 0; 154 | padding: 5px; 155 | margin: 0px 0px 5px 0px; 156 | background-color: #0066ff; 157 | font-family: Times; 158 | color: #fff; 159 | text-align: center; 160 | } 161 | 162 | .top-banner-title-font { 163 | font-size: 25px; 164 | } 165 | 166 | .test-name { 167 | font-family: 'Lucida Grande'; 168 | font-size: 16px; 169 | } 170 | 171 | .suite-icon { 172 | padding: 5px; 173 | float: right; 174 | height: 20; 175 | } 176 | 177 | .test-group { 178 | font: 20px 'Lucida Grande'; 179 | margin: 5px 5px 10px 5px; 180 | border-width: 0px 0px 1px 0px; 181 | border-style: solid; 182 | padding: 5px; 183 | } 184 | 185 | .test-group-name { 186 | font-weight: bold; 187 | } 188 | 189 | .method-in-group { 190 | font-size: 16px; 191 | margin-left: 80px; 192 | } 193 | 194 | table.google-visualization-table-table { 195 | width: 100%; 196 | } 197 | 198 | .reporter-method-name { 199 | font-size: 14px; 200 | font-family: monospace; 201 | } 202 | 203 | .reporter-method-output-div { 204 | padding: 5px; 205 | margin: 0px 0px 5px 20px; 206 | font-size: 12px; 207 | font-family: monospace; 208 | border-width: 0px 0px 0px 1px; 209 | border-style: solid; 210 | } 211 | 212 | .ignored-class-div { 213 | font-size: 14px; 214 | font-family: monospace; 215 | } 216 | 217 | .ignored-methods-div { 218 | padding: 5px; 219 | margin: 0px 0px 5px 20px; 220 | font-size: 12px; 221 | font-family: monospace; 222 | border-width: 0px 0px 0px 1px; 223 | border-style: solid; 224 | } 225 | 226 | .border-failed { 227 | border-top-left-radius: 10px 10px; 228 | border-bottom-left-radius: 10px 10px; 229 | border-style: solid; 230 | border-width: 0px 0px 0px 10px; 231 | border-color: #f00; 232 | } 233 | 234 | .border-skipped { 235 | border-top-left-radius: 10px 10px; 236 | border-bottom-left-radius: 10px 10px; 237 | border-style: solid; 238 | border-width: 0px 0px 0px 10px; 239 | border-color: #edc600; 240 | } 241 | 242 | .border-passed { 243 | border-top-left-radius: 10px 10px; 244 | border-bottom-left-radius: 10px 10px; 245 | border-style: solid; 246 | border-width: 0px 0px 0px 10px; 247 | border-color: #19f52d; 248 | } 249 | 250 | .times-div { 251 | text-align: center; 252 | padding: 5px; 253 | } 254 | 255 | .suite-total-time { 256 | font: 16px 'Lucida Grande'; 257 | } 258 | 259 | .configuration-suite { 260 | margin-left: 20px; 261 | } 262 | 263 | .configuration-test { 264 | margin-left: 40px; 265 | } 266 | 267 | .configuration-class { 268 | margin-left: 60px; 269 | } 270 | 271 | .configuration-method { 272 | margin-left: 80px; 273 | } 274 | 275 | .test-method { 276 | margin-left: 100px; 277 | } 278 | 279 | .chronological-class { 280 | background-color: #0ccff; 281 | border-style: solid; 282 | border-width: 0px 0px 1px 1px; 283 | } 284 | 285 | .method-start { 286 | float: right; 287 | } 288 | 289 | .chronological-class-name { 290 | padding: 0px 0px 0px 5px; 291 | color: #008; 292 | } 293 | 294 | .after, .before, .test-method { 295 | font-family: monospace; 296 | font-size: 14px; 297 | } 298 | 299 | .navigator-suite-header { 300 | font-size: 22px; 301 | margin: 0px 10px 5px 0px; 302 | background-color: #deb887; 303 | text-align: center; 304 | } 305 | 306 | .collapse-all-icon { 307 | padding: 5px; 308 | float: right; 309 | } 310 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').click(function() { 3 | // Extract the panel for this link 4 | var panel = getPanelName($(this)); 5 | 6 | // Mark this link as currently selected 7 | $('.navigator-link').parent().removeClass('navigator-selected'); 8 | $(this).parent().addClass('navigator-selected'); 9 | 10 | showPanel(panel); 11 | }); 12 | 13 | installMethodHandlers('failed'); 14 | installMethodHandlers('skipped'); 15 | installMethodHandlers('passed', true); // hide passed methods by default 16 | 17 | $('a.method').click(function() { 18 | showMethod($(this)); 19 | return false; 20 | }); 21 | 22 | // Hide all the panels and display the first one (do this last 23 | // to make sure the click() will invoke the listeners) 24 | $('.panel').hide(); 25 | $('.navigator-link').first().click(); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').click(function() { 29 | var contents = $('.navigator-suite-content'); 30 | if (contents.css('display') == 'none') { 31 | contents.show(); 32 | } else { 33 | contents.hide(); 34 | } 35 | }); 36 | }); 37 | 38 | // The handlers that take care of showing/hiding the methods 39 | function installMethodHandlers(name, hide) { 40 | function getContent(t) { 41 | return $('.method-list-content.' + name + "." + t.attr('panel-name')); 42 | } 43 | 44 | function getHideLink(t, name) { 45 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); 46 | return $(s); 47 | } 48 | 49 | function getShowLink(t, name) { 50 | return $('a.show-methods.' + name + "." + t.attr('panel-name')); 51 | } 52 | 53 | function getMethodPanelClassSel(element, name) { 54 | var panelName = getPanelName(element); 55 | var sel = '.' + panelName + "-class-" + name; 56 | return $(sel); 57 | } 58 | 59 | $('a.hide-methods.' + name).click(function() { 60 | var w = getContent($(this)); 61 | w.hide(); 62 | getHideLink($(this), name).hide(); 63 | getShowLink($(this), name).show(); 64 | getMethodPanelClassSel($(this), name).hide(); 65 | }); 66 | 67 | $('a.show-methods.' + name).click(function() { 68 | var w = getContent($(this)); 69 | w.show(); 70 | getHideLink($(this), name).show(); 71 | getShowLink($(this), name).hide(); 72 | showPanel(getPanelName($(this))); 73 | getMethodPanelClassSel($(this), name).show(); 74 | }); 75 | 76 | if (hide) { 77 | $('a.hide-methods.' + name).click(); 78 | } else { 79 | $('a.show-methods.' + name).click(); 80 | } 81 | } 82 | 83 | function getHashForMethod(element) { 84 | return element.attr('hash-for-method'); 85 | } 86 | 87 | function getPanelName(element) { 88 | return element.attr('panel-name'); 89 | } 90 | 91 | function showPanel(panelName) { 92 | $('.panel').hide(); 93 | var panel = $('.panel[panel-name="' + panelName + '"]'); 94 | panel.show(); 95 | } 96 | 97 | function showMethod(element) { 98 | var hashTag = getHashForMethod(element); 99 | var panelName = getPanelName(element); 100 | showPanel(panelName); 101 | var current = document.location.href; 102 | var base = current.substring(0, current.indexOf('#')) 103 | document.location.href = base + '#' + hashTag; 104 | var newPosition = $(document).scrollTop() - 65; 105 | $(document).scrollTop(newPosition); 106 | } 107 | 108 | function drawTable() { 109 | for (var i = 0; i < suiteTableInitFunctions.length; i++) { 110 | window[suiteTableInitFunctions[i]](); 111 | } 112 | 113 | for (var k in window.suiteTableData) { 114 | var v = window.suiteTableData[k]; 115 | var div = v.tableDiv; 116 | var data = v.tableData 117 | var table = new google.visualization.Table(document.getElementById(div)); 118 | table.draw(data, { 119 | showRowNumber : false 120 | }); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /target/surefire-reports/testng-results.xml: -------------------------------------------------------------------------------- 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 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /target/surefire-reports/testng.css: -------------------------------------------------------------------------------- 1 | .invocation-failed, .test-failed { background-color: #DD0000; } 2 | .invocation-percent, .test-percent { background-color: #006600; } 3 | .invocation-passed, .test-passed { background-color: #00AA00; } 4 | .invocation-skipped, .test-skipped { background-color: #CCCC00; } 5 | 6 | .main-page { 7 | font-size: x-large; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /target/test-classes/pageTests/HomePageTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/test-classes/pageTests/HomePageTests.class -------------------------------------------------------------------------------- /target/test-classes/pageTests/LoginPageTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/test-classes/pageTests/LoginPageTests.class -------------------------------------------------------------------------------- /target/test-classes/pageTests/ProductTests/DesktopPageTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/test-classes/pageTests/ProductTests/DesktopPageTests.class -------------------------------------------------------------------------------- /target/test-classes/pageTests/ProductTests/LaptopPageTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/test-classes/pageTests/ProductTests/LaptopPageTests.class -------------------------------------------------------------------------------- /target/test-classes/pageTests/RegisterPageTests.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/test-classes/pageTests/RegisterPageTests.class -------------------------------------------------------------------------------- /target/test-classes/testConfig/BaseTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JapneetSachdeva1/SeleniumFramework/906d0c22ac2d7cced949acec1cbdfba02c4983a4/target/test-classes/testConfig/BaseTest.class --------------------------------------------------------------------------------