Running unittest Test Cases and Robot Framework Test Cases Together

2024/9/8 9:07:05

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?

Answer

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.

https://en.xdnf.cn/q/72981.html

Related Q&A

numpy.ndarray enumeration over a proper subset of the dimensions?

(In this post, let np be shorthand for numpy.)Suppose a is a (n + k)‑dimensional np.ndarray object, for some integers n > 1 and k > 1. (IOW, n + k > 3 is the value of a.ndim). I w…

How can I work with a GLib.Array in Python?

I am writing a plugin for Rhythmbox, wherein a signal raised is passing in an object of type GArray. The documentation for GLib Arrays shows me a few methods I am interested in, but am unable to acces…

Categorical dtype changes after using melt

In answering this question, I found that after using melt on a pandas dataframe, a column that was previously an ordered Categorical dtype becomes an object. Is this intended behaviour?Note: not looki…

python apscheduler not consistent

Im running a scheduler using python apscheduler inside web.py framework. The function runserver is supposed to run everyday at 9 a.m but it is inconsistent. It runs most days but skips a day once in a …

Change timezone info for multiple datetime columns in pandas

Is there a easy way of converting all timestamp columns in a dataframe to local/any timezone? Not by doing it column by column?

Change permissions via ftp in python

Im using python with ftplib to upload images to a folder on my raspberryPi located in /var/www. Everything is working fine except that uploaded files have 600 permissions and I need 644 for them.Which …

Creating a Persistent Data Object In Django

I have a Python-based maximum entropy classifier. Its large, stored as a Pickle, and takes about a minute to unserialize. Its also not thread safe. However, it runs fast and can classify a sample (a si…

How to catch specific exceptions on sqlalchemy?

I want to catch specific exceptions like UniqueViolation on sqlalchemy.But sqlalchemy throw exceptions only through IntegrityError.So I catched specific exceptions with below code.except sqlalchemy.exc…

numpy.linalg.LinAlgError: SVD did not converge in Linear Least Squares on first run only

I have been wrestling with a known and documented SVD converge issue. Having read up on similar issues raised by others, I have double checked my data and reduced this to a tiny DataFrame - 10 rows/2 c…

Seaborn kde plot plotting probabilities instead of density (histplot without bars)

I have a question about seaborn kdeplot. In histplot one can set up which stats they want to have (counts, frequency, density, probability) and if used with the kde argument, it also applies to the kde…