What are the pros and cons of using Robot Framework with selenium2Library (webdriver).
Which one is the better option for web application testing - TestNG or Robot Framework?
TestNG has been created as an alternative to JUnit in unit testing. While, RobotFramework has been created for acceptance testing.
Each has remarkable features:
Both have great reporting frameworks and both can be attached to various Continuous Integration like Jenkins.
And, both have Selenium support.
You should decide that which features you require for your testing and then use the same.
I think the question should be: Java WebDriver + TestNG Vs Robot.
I have worked on both Java + TestNG and RobotFramework. Here is my analysis by points.
TestNG: You need to know Java & ANT/Maven, loggers and more libraries (depending on your need).
Robot: Basic programming language is enough in any language. You can train your manual testing team.
TestNG: Basically, it is Java. Takes a bit more time compared to Robot. You need to write some extra lines which have nothing to do with your business. i.e. the definition of classes, scoping etc. However, people expert in writing code may argue here.
Robot: Write only as much as you need for your automation. (Standard login page code will not be more than 6 lines)
TestNG: Possible. You can do that with Selenium Grid or on Standalone machine
Robot: Possible (using pabot). You can use selenium grid too.
TestNG: If you are used to Java then it is easy. However, you don't get the logs as good/cool as Robot. I guess screenshot is not captured by default unless you implement some logic. you need to use Log4j for detailed logging.
Robot: Neat and clean logs and reports. Comes with a screenshot.
TestNG: This is Java. The Sky is the limit.
Robot: There are many things you can't do. if-else (only if block). No nested loops. And many things if you need complex coding. For many things, you can write a custom keyword in Python.
Winner: TestNG (Java)
TestNG: You have to design the framework.
Robot: It's a readily available framework
TestNG/Java: It is so easy to find a person who knows Java/TestNG. If you don't know Java, there are plenty of developer in dev team who can help the manual tester to begin. However, quality of code will vary depending on who is writing code.
RobotFramework: It is hard to find someone who has worked on RF. Though, the learning curve is very short compared to Java. All one need to know any programming knowledge. Basic knowledge of Python is needed if someone wants to write a customized library.
In most of the cases, I feel Robot will do whatever you want to do. It's supportive libraries are increasing with time. You can do Web, API, Mobile, SSH, DB and many types of automation easily without knowing much in details.