Перейти к содержимому

Selenium Framework for Beginners 20 | What are TestNG Listeners | How to use TestNG Listeners

Automation Step by Step

0:00 / 0:00

Selenium Framework for Beginners 20 | What are TestNG Listeners | How to use TestNG Listeners

52 833 просмотра · 8 лет назад
Automation Step by Step
591 тыс. подписчиков
52 833 просмотра · 8 лет назад
All FREE courses - https://automationstepbystep.com/ Today we will learn 1 What are TestNG listeners 2 Types of listeners 3 How to use TestNG listeners at class level at suite level (multiple classes) 4 Selenium test example helpful tips What are TestNG Listeners Listeners are components in TestNG that listens ( keep a track ) of test execution and helps to perform actions at multiple stages of test execution Example OnStart OnFinish OnSuccess OnFailure Etc… Listeners are interfaces in TestNG library How to use TestNG listeners Step 1 Create a new package and new Class Step 2 Implement ITestListener interface public class TestNGListener implements ITestListener Step 3 Add unimplemented methods of ITestListener interface Step 4 Create a Demo class and provide annotation @Listeners(packageName.ClassName) Step 5 Run and validate How to use at Suite Level (multiple classes) Step 1 Create testng.xml file Step 2 Define listeners in testng.xml file Step 3 Run and validate Adding more listeners from TestNG You can implement more listener interfaces in your existing class and add implemented methods REFERENCES http://testng.org/doc/documentation-m... http://testng.org/doc/documentation-m... https://jitpack.io/com/github/cbeust/... #SeleniumJavaFramework #SeleniumTutorials #TestNGListeners #SeleniumForBeginners PLAYLISTS SELENIUM JAVA FRAMEWORK BEGINNERS    • Selenium Java Framework for Beginners   KATALON STUDIO    • Katalon Studio   SELENIUM BEGINNERS    • Selenium Beginner Tutorial   SELENIUM TIPS    • Selenium Tips   SELENIUM PYTHON    • Selenium Python   SELENIUM BUILDER    • Selenium Builder   JAVA    • Java   JAVA TIPS & TRICKS    • Java Tips and Tricks   JENKINS    • Jenkins   JENKINS TIPS & TRICKS    • Jenkins Tips n Tricks   JMETER BEGINNER    • JMeter Beginner   JMETER INTERMEDIATE    • Jmeter Intermediate   JMETER ADVANCED    • JMeter Advanced   JMETER TIPS & TRICKS    • JMeter Tips n Tricks   SOAPUI    • SoapUI   POSTMAN    • Postman Beginner Tutorial   GIT & GITHUB    • Git and GitHub   DOCKER    • Docker   ROBOT FRAMEWORK    • Robot Framework Beginner Tutorial   WEB SERVICES (API)    • API Web Services   REDIS BEGINNER TUTORIALS    • Redis Beginner Tutorials   MAVEN    • Maven   MISC    • Misc Tutorials   TOOLS & TIPS    • Tools and Tips   QnA FRIDAY    • QnA Friday   SUNDAY SPECIAL    • Sunday Special   ALL PLAYLISTS    / @raghavpal   Like on FACEBOOK :   / automationstepbystep   Follow on TWITTER:   / automationsbs   Subscribe on YOUTUBE :    / automationstepbystep   _______ ONLINE COURSES TO LEARN _______ https://automationstepbystep.com/ Never Stop Learning Raghav