About this question
I have started Selenium scripting in one of my projects and I want to know the exact difference between Junit & TestNG. Which one is useful for Testers in Selenium? Any reference link/Site for the same?
I have started Selenium scripting in one of my projects and I want to know the exact difference between Junit & TestNG. Which one is useful for Testers in Selenium? Any reference link/Site for the same?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask QA Expert
Answered on Apr 22, 2022
The Major difference between TestNG and JUnit test frameworks is their scope. I suggest using TestNG as the core unit test framework for a Java project, because TestNG is more advanced in parameterize testing, dependency testing and suite testing (Grouping concept). TestNG is meant for high-level testing and complex integration tests. Its flexibility is especially useful with large test suites. In addition, TestNG also covers the entire core JUnit4 functionality. It’s just no reason for me to use JUnit anymore.
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step QA Testing guides from industry experts
Common QA Testing interview questions, answered
Guides, tips and career advice on QA Testing from JanBask experts.
Selenium Selenium Tutorial: Complete Guide to Automation Testing for Beginners
The Selenium tutorial covers both fundamental & advanced Selenium concepts. It is for individuals at all levels. Learn about…
QA Testing Software Testing Basics: Fundamentals, Principles, Lifecycle & Best Practices
Learn software testing basics, including key principles, lifecycle stages, types of testing, and best practices. A complete…
QA Testing You Can’t Miss the Top 20 Security Testing Interview Questions
Are you getting ready for your information security interview? Get a hold of the top 20 information security interview questions…