Is there a way to execute tests present inside a test suite in a certain order?
while using gird, for certain tests we don’t want the tests to be picked up by different machines and get executed in parallel.
Any way we can mark a suite/tests to run in sequential order instead of executing in parallel.
You can rename files, folders and test names to be prefixed with numbers and _.
For example: Test Number One → 01_Test Number One Test Suite One → 01_Test Suite One Test Suite One/Test Number Two.robot → 01_Test Suite One/02_Test Number Two.robot
This is a feature since the beginning of Robot Framework, and if you use RIDE, the numbers are omitted from the view of test suites.
I have at least ten test suites each having at least 10 test cases. I would like to know if there is a way to run selected tests from each of the suites in an order I would like.
For example, with the following test folder structure:
|--------Tests
|—Suite 1
|-------Test 1
|-------Test 2
|-------Test 3
|—Suite 2
|-------Test 1
|-------Test 2
|-------Test 3
|—Suite 3
|-------Test 1
|-------Test 2
|-------Test 3
Now I want to run the tests in the order for example as below,
1. Suite 1 - Test Case 3
2. Suite 2 - Test Case 2
3. Suite 1 - Test Case 2
4. Suite 3 - Test Case 3
Please note that the tests are not in any random order, it fulfills specific requirement for us. Likewise, there are multiple sequences that testcases has to be executed therefore I cannot rename suites or testcases.
You can prepare the arguments to Robot Framework, based on the documentation:
-t --test name * Select tests by name or by long name containing also
parent suite name like `Parent.Test`. Name is case
and space insensitive and it can also be a simple
pattern where `*` matches anything, `?` matches any
single character, and `[chars]` matches one character
in brackets.
--task name * Alias to --test. Especially applicable with --rpa.
-s --suite name * Select suites by name. When this option is used with
--test, --include or --exclude, only tests in
matching suites and also matching other filtering
criteria are selected. Name can be a simple pattern
similarly as with --test and it can contain parent
name separated with a dot. For example, `-s X.Y`
selects suite `Y` only if its parent is `X`.
-A --argumentfile path * Text file to read more arguments from. Use special
path `STDIN` to read contents from the standard input
stream. File can have both options and input files
or directories, one per line. Contents do not need to
be escaped but spaces in the beginning and end of
lines are removed. Empty lines and lines starting
with a hash character (#) are ignored.
Example file:
| --include regression
| --name Regression Tests
| # This is a comment line
| tests.robot
| path/to/test/directory/
Examples:
--argumentfile argfile.txt --argumentfile STDIN
“Omitted” where? If they are prefixes of files or test cases, they will show in the log.html.
I was mentioning that they are not visualized in RIDE GUI.
NOTE: The prefixes must be in the format: ##__ where ## are numbers and __ two underscores.
Then they don’t show in Log and Report.
You can install RIDE with pip install robotframework-ride