How to perform load testing using the invocationCount and threadPoolSize parameters in TestNG
File: KWTestNG.java
Output
[RemoteTestNG] detected TestNG version 7.0.0 Thread Name: TestNG-methods-3 Thread ID: 13 Thread Name: TestNG-methods-2 Thread ID: 12 Thread Name: TestNG-methods-1 Thread ID: 11 Login Successful Thread Name: TestNG-methods-2 Thread ID: 12 Login Successful Thread Name: TestNG-methods-3 Thread ID: 13 Login Successful Login Successful Login Successful PASSED: NavigateLogin PASSED: NavigateLogin PASSED: NavigateLogin PASSED: NavigateLogin PASSED: NavigateLogin =============================================== Default test Tests run: 5, Failures: 0, Skips: 0 =============================================== =============================================== Default suite Total tests run: 5, Passes: 5, Failures: 0, Skips: 0 =============================================== Default test ( 118.707 s) NavigateLogin (24.129 s) NavigateLogin (26.997 s) NavigateLogin (29.213 s) NavigateLogin (18.996 s) NavigateLogin (19.372 s)
What Next?
How to use TestNG Parameters and Data Provider for Data Driven Testing
How to run parallel tests with Selenium WebDriver and TestNG
How to use and implement TestNG Listeners
Advertisement