Running unittest Test Cases and Robot Framework Test Cases Together

python, python-unittest, robotframework

Solution

RobotFramework is not the right tool for unit testing.

- Unit-tests should be written in the same language of the units (modules, classes, etc.)

- The ability to describe scenarios in natural language (which is one of the strongest features of systems like RF) is worthless in unit tests. At this level of testing scenarios are for input x you get output y.

RF is best suited in Acceptance Testing and Integration Testing, the top-grained verification of your system.

Nevertheless you can integrate RF and xunit in your QA system together. And merge reports from RF and unit-test.

Problem

Our group is evaluating Robot Test Framework for our QA group, not just for BDD, but also to possibly cover a lot of our regular functionality testing needs. It certainly is a compelling project. To what extent, if any, is Robot Framework based on xunit (unittest) architecture? I see that unittest asserts can be used, but I don't see that the RF testcases themselves are based on unittest.TestCase. Ideally, our organization would like to be able to be able to write Robot Framework tests, as well as Python unittest testcases, run the testcases together from one runner and get integrated results, reuse RF's Selenium2 Library's "keywords" as functions used by our regular unittest testcases in order to share a common SE code-base. Is this a solved problem? Does anybody do this kind of thing?

Original source