Are tests written in Robot Framework easy to maintain?



  • Robot Framework claims to be:

    a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and it utilizes the keyword-driven testing approach.

    My first impression is that there will be challenges in maintaining tests that combine natural-language text files with real code (as in Fit, Fitnesse) comparing to tests written purely in code. However, that's my only first impression.

    Are tests written in Robot Framework easy to maintain? Why yes? Why not?



  • Like most software, they are easy to maintain when written well, and hard to maintain when written poorly. In that respect, robot tests are no different from code in any other language. That being said, I think that robot makes it easy to write bad tests.

    I've worked on teams where they were difficult to maintain. This is because they were largely written with predefined keywords, were poorly organized, and used bad programming practices.

    I've also worked on teams where they were relatively easy to maintain. We used a page object pattern, and nearly all of the keywords for each page were written in python. This made the tests exceptionally easy to read, and also easy to maintain. By using python based keywords, you had all of the power of a real programming language so you didn't have to get creative with robot's limited set of programming constructs. This lead to tests that were extremely easy to read, which leads to being easier to maintain.

    Writing maintainable tests, much like writing maintainable code in any language, requires discipline.


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2