Running robotframework tests simultaneously - robotframework

Is there a way to run all my test cases simultaneously? if so could you please post an example of how to do it?
Regards,
Meir

There is nothing built-in to robot to run tests in parallel. If your tests are spread across multiple suites you can write a script that runs them all at the same time, and then you can use rebot to combine all of the output.xml files into a single report.
There is an open source program that might do what you want. The project is named "pabot" and can be found here: https://github.com/mkorpela/pabot

Related

How to mark pass the test when is retested in robotframework

Right now when my team made a deploy in out QA environment, I run one suite tests of robotframework. This, have several test that failed at first cause the environment is not "warm up". So, in the same pipeline I have the "--rerun" option if some test has failed. Usually, in the second run they work just fine. Then, I merge the outputs with rebot:
rebot --merge output.xml output2.xml
And even the log.html is showing correctly the information (on the test and on the suite level).
Now comes the fun part. Even when in the output.xml now I have two runs of the test (all with some failled and the retries with all pass), when I upload this to XRay, it create a test execution with the results of the first run only.
So, my question is: why? In the output.xml is clearly al the results as the last run. If not, I would understand that this create one test execution and then put all the results inside (first and second run) which is not the case.
It seems to me that XRay is not importing the data correctly.
First, I have never used rebot in that way.
However, I think what you obtained in Xray is the consequence of the "merged" output.xml you have and how Xray works.
Whenever you upload test automation results to Xray, usually a Test Execution is going to be created, containing Test Runs (one per each Test)🤞🏻.
Test issues will be autoprovisioned unless they already exist; if they exist, only Test Runs will be created for those Tests.
A Test Execution cannot contain more than one Test Run for each Test. In other words, a test execution is like a task for running (or that contains the results of) a list of tests; this list cannot have duplicates.
I would advise to upload all the reports, individually. Xray will consider the latest results whenever showing coverage status.

Set directory for saving my result (report, log) in a specific folder before running robot framework script

I want to save my results in a specific folder for each running in robot framework.
I know there is a command call --outputdir which I also use.
But I want to know if there is any possibility to set the path for saving my results before in the robot script?
Thanks.
Best
psad
No, there is no way to do that.
The internal variables for paths are set as constants.
Also you should not have that approach because the test operations should be separated from the orchestration operations.

Best way to go from RStudio project development to scheduled R Script

I am developing processes for collecting, cleaning and storing various data sets. The development is done with RStudio projects. I won't say I'm following every tidyverse/RStudio workflow recommendation but in general I'm using that framework-- relevant now is that I'm using standard subdirectories and the here package for referencing them.
Every project has a MAIN.R script that ultimately sources the functions from the other scripts-- one only needs to run MAIN.R to execute the process. I did this not only for simplicity but also because the long-term intent is to have this be a scheduled process.
For now at least my method for scheduling R Scripts is with Windows Task Scheduler. Getting an R Script scheduled and running is not a problem. The issue is the contextual assumptions of developing within a project: source(here("CODE", "some-file.R")) fails when I run MAIN.R outside of the scope of the project.
One obvious solution would be to hard-code the project location as one of the parameters. I would need to have two different MAIN.R files, one for development that uses the project and one that uses that parameter for scheduling. I don't hate that idea, don't love it as it someone nullifies the whole point of the project/here approach. Is there a more elegant solution that someone else has created that I couldn't find on Google, or better workaround ideas?
I ended up using the solution described here: https://community.rstudio.com/t/how-to-play-nice-with-taskscheduler-r-studio-projects-and-here/24406/2 .
I didn't have to make any changes to the MAIN.R script. Instead, I scheduled it directly but added the project directory to the "Starts In" argument of the Windows Task Scheduler task.

ReTest bloc of tests in Robotframework

I have a list of tests to execute on robot framework where it has a block of tests that can be executed again if a specific test fails as the following flow explains, And i want to know if this is dowable with robot framework.
No, it is not doable. At least, not in a single test run, and not without a lot of work. Robot has no ability to re-run a test within a single test run. You would have to exec a second instance of robot where the output is sent to a separate output file, and then you would have to somehow merge the output files of the original test run and the second exec.
However, robot does support being able to give it the output.xml from a previous run so that it will re-run only the failed test cases. You can do that with the --rerunfailed command line option. See Re-executing failed test cases in the robot framework user guide.

Is there any way to run Jubula tests from console?

I want to run prewritten Jubula tests (possibly on remote machine) from console and receive output in logfile. Is there any way to do it? I haven't found any information about that nor in Google neither in Jubula help.
Sure there is!
You need to call the testexec.exe (It's placed in "jubula_install"/jubula/ folder)
It has a LOT of parameters and many of them is mandatory. See them below:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jubula.client.ua.help%2Fhtml%2Fmanual%2Fnode260.html
Thus I'd recommend you writing batch files for your favorite configurations.

Resources