why we are using junit,ant,testng,maven etc with selenium ? what is the main purpose of using them? can’t we run our tests without using them?

srinu1537 Default Asked on February 18, 2016 in Selenium WebDriver.
Add Comment
3 Answer(s)

Good Question..

JUnit/NUnit – Are the native test runners for Java & C# namely.
Ant / Maven – Build systems, if we have to efficiently manage the dependencies & later execute the tests on CI.
TestNG- Its an alternative to JUnit, which provides better reporting & Data provider capabilities + enhanced test annotations, better annotations & additional capabilities like- Event listeners etc..

If you look at Forumsqa’s parent site then you can find out loads of useful info on TestNG benefits:

> TestSuites , Suite of suite
> Reporters
> 2 types of Data providers
> Annotations

If you have to run tests without JUnit then you can do it using Cucumber-JVM in Java.

Theoretically you can create your own test methods & hook them using public static void main() & run your tests as runnable Jar file.


laxmisomni Train Answered on February 18, 2016.
Add Comment

You can run your automated tests with just Selenium, however, depending of the complexity of the project you’re working on, you might need to rely on other frameworks.

c4ncri Train Answered on February 23, 2016.
Add Comment

Great Laxmi.

According to you answer,  that will make understand to Srinu.

raviiichauhan85 Train Answered on February 24, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.