filmov
tv
How to use same DataProvider for Multiple TestNG Methods | Use of Method and ITestContext in TestNG

Показать описание
▶️ In this session, I have shown How to use same DataProvider for Multiple TestNG Methods. So there will be a single dataProvider having all the test data stored in the 2D array objects and depending upon method name we will send specific 2D array object reference to particular testng method.
1] Using Method -- Using getName() method we will get the current TestNG method name so we just need to compare it with the expected method and return specific 2 D array object reference.
2] Using ITestContext
-- Depending upon TestNG Test name - Using getName() we will get the test name that we have added in the testng xml file and so compare it using if else block and use specific data from data provider.
-- Depending upon TestNG Group name
✅TestNG Framework Videos:=
======================================
****************AJ AUTOMATION**************
======================================
Hi guys, Please share and Like the content whichever you find informative to reach more beginner candidates learning Test Automation. Thanks for your Support !!
🔔 Learn automation from basic !! 🔔
✅ Let's Learn the Concept in 5 To 10 Mins :=
✅ Selenium series videos Playlist :=
✅ Maven Tool videos playlist :=
✅ Selenium WebDriver Exceptions Playlist :=
✅ Selenium Grid With Docker:==
✅ Jenkins Tool Series :==
✅ Upload and Download Files in Selenium :=
✅ Excel and CSV files operations :=
✅ Java Language Concepts :=
✅TestNG Framework Videos:=
✅ Become Master in Xpath:=
✅ Protractor series videos playlist :=
✅ Recent Uploads :=
⚡️ Thanks for your support !! ⚡️
======================================
**************** Thanks for watching !!**************
======================================
⚡️ Keep Learning...Keep Sharing...Keep Growing. ⚡️
#LearnSeleniumInEasyWay #SeleniumWebDriver
1] Using Method -- Using getName() method we will get the current TestNG method name so we just need to compare it with the expected method and return specific 2 D array object reference.
2] Using ITestContext
-- Depending upon TestNG Test name - Using getName() we will get the test name that we have added in the testng xml file and so compare it using if else block and use specific data from data provider.
-- Depending upon TestNG Group name
✅TestNG Framework Videos:=
======================================
****************AJ AUTOMATION**************
======================================
Hi guys, Please share and Like the content whichever you find informative to reach more beginner candidates learning Test Automation. Thanks for your Support !!
🔔 Learn automation from basic !! 🔔
✅ Let's Learn the Concept in 5 To 10 Mins :=
✅ Selenium series videos Playlist :=
✅ Maven Tool videos playlist :=
✅ Selenium WebDriver Exceptions Playlist :=
✅ Selenium Grid With Docker:==
✅ Jenkins Tool Series :==
✅ Upload and Download Files in Selenium :=
✅ Excel and CSV files operations :=
✅ Java Language Concepts :=
✅TestNG Framework Videos:=
✅ Become Master in Xpath:=
✅ Protractor series videos playlist :=
✅ Recent Uploads :=
⚡️ Thanks for your support !! ⚡️
======================================
**************** Thanks for watching !!**************
======================================
⚡️ Keep Learning...Keep Sharing...Keep Growing. ⚡️
#LearnSeleniumInEasyWay #SeleniumWebDriver
Комментарии