What is the role of TestNG JUnit frameworks in Selenium

0 votes
I am self learning Selenium and know quite a bit about creation of Classes, Interfaces, Objects, Inheritance, Arrays, Loops in Java. And aAs far as Selenium is concerned, I'm able to test web pages by writing the code in Java by locating elements using Firebug/Firepath tool. But I always come across these terms TestNG and JUnit..What do they do? What are they? Are they related to selenium? And is it compulsary to learn them?
Apr 18, 2018 in Selenium by kappa3010
• 2,090 points
2,472 views

2 answers to this question.

0 votes
Well TestNG and JUnit are test frameworks which compliment the working of WebDriver. Selenium WebDriver has limitation wrt test cases and test reports.
1. Test cases cannot be managed very easily. As in, it is a little complex to verify the pass/ fail criteria.
2. The reports that get generated at the end of the test is not structured.

To overcome these 2 main challenges, we use TestNG/ JUnit. Especially with TestNG, we can choose to run any number of test cases and classes by controlling it from the testng.xml file. It is very simple. More over, the assertion of a test case is also fairly easy and we can figure out which test cases passed and which failed from the detailed test reports.
answered Apr 18, 2018 by king_kenny
• 3,710 points
0 votes
TestNG and JUnit are test frameworks .

it make ur life easy .

why framework

1) execution

2) report generation
answered Sep 4, 2020 by Sri
• 3,190 points

Related Questions In Selenium

0 votes
2 answers

what is the need of xpath when you have attributes like id ,class,name in selenium?

some of the controls not have id ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,190 points
1,554 views
0 votes
2 answers
0 votes
1 answer

What is the use of grouping in testNG?

Grouping is the method used to separate ...READ MORE

answered Dec 27, 2018 in Selenium by Trisha
833 views
0 votes
1 answer

What is the use of @listener annotation in TestNG?

 @listeners are used to configure reports and ...READ MORE

answered Jan 2, 2019 in Selenium by Shuvodip
2,405 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
12,576 views
0 votes
1 answer

Diff between WebDriver listeners and TestNG listeners?

This is not a very important concept ...READ MORE

answered Apr 14, 2018 in Selenium by king_kenny
• 3,710 points
6,098 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,558 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
6,603 views
0 votes
1 answer

What is the difference between thoughtworks.selenium and openqa.selenium selenium?

thoughtworks.selenium is the original Selenium (aka Selenium 1, ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,710 points
2,653 views
0 votes
1 answer

What is difference the between Selenium and Celerity?

If you are talking about speed, use Celerity. If ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,710 points
788 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP