7

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?

12

TestNG has been created as an alternative to JUnit in unit testing. While, RobotFramework has been created for acceptance testing.

Each has remarkable features:

TestNG

  • TestNG is easily integrated into maven cycle and used mostly with Data Driven testing
  • TestNG is pure Java
  • Annotations are easier to understand
  • Test cases can be grouped more easily
  • Parallel testing is possible
  • TestNG supports only Java (so this is one of the limitation)

Robot Framework

  • Robot Framework allows Keyword Driven Testing and even behavior driven one.
  • Robot Framework was initially written in Python but latest version has Java bindings as well. Robot is highly extensible, in python, java, and/or any .NET language.
  • Robot Framework is a generic, application and technology independent framework.
  • Robot can be used for REST and SOAP service tests, database tests

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.

7

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.

Ease of use

  • 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.

Winner: Robot

Code writing

  • 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)

Winner: Robot

Parallel Execution

  • TestNG: Possible. You can do that with Selenium Grid or on Standalone machine

  • Robot: Possible (using pabot). You can use selenium grid too.

Winner: Tie

Logging and Failure Analysis

  • 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.

Winner: Robot

Flexibility

  • 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)

Framework Design

  • TestNG: You have to design the framework.

  • Robot: It's a readily available framework

Winner: Robot

Resource Availablity

  • 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.

Winner: Java

Conclusion

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.