Saturday, September 17, 2011

Selenium vs TestNG vs Junit

Selenium vs TestNG vs Junit

People from QTP background or testers with no programming knowledge get confused with the above terms.

Selenium: What is Selenium? It is a program that can recognize objects on the browser, it is a browser automation tool similar to QTP. QTP is an exe file, where you install the program and is packaged with checkpoints and reporting tools. Where as selenium is a set of libraries that are required to compile and execute  the code, it is not an exe file can't be installed like a windows program. There are separate set of libraries for each language.

Selenium1.0 vs Selenium2.0 (Web Driver)

QTP vs Selenium

TestNG: It is a testing framework designed for different testing needs, unit testing, integration testing etc. As Selenium don't have assertions(Checkpoints), data driven testing and reporting facility, we need to implement these frameworks along with the selenium. It had different annotations, where you can group the selenium code into test cases and add assertions(Check points) that determine whether test case is pass/fail. It generate HTML reports at the end of test  and data providers used for data driven testing...many more features. It is also a set of libraries that are required to compile or execute the code. All these libraries are added to your project in Eclipse IDE or ANT during  execution.

JUnit: It is also a testing framework similar to TestNG.

TestNG vs JUnit

---