2

I have about half a dozen of integration tests (handled with Robot Framework) to run in a GitLab CI pipeline. Once upon a time, we did not care about the execution order of these tests. The corresponding code (extracted from the .gitlab-ci.yml file) then looked like the following:

test:
  stage: test
  before_script:
    - pip install RobotNapalm
  script:
    - robot -b debug.log -d log/ ./*.robot

But now I need to run those tests in a specific order. What GitLab's doc says about the script keyword is that it can handle a handful of commands at once, and then it would look like the following:

script:
  - robot -b debug.log -d log/ ./some-test.robot
  - robot -b debug.log -d log/ ./here-is-another-one.robot
  - robot -b debug.log -d log/ ./yet-another-test.robot

The doc yet does not say whether those robot commands would be handled simultaneously or sequentially. Knowing that I can't influence the tests execution order by giving them alphabetically sorted names, how could I ensure that those tests are executed in a particular order?

  • 1
    What you put in script will be executed sequentially as in bash script. – Tensibai Dec 14 '18 at 14:03
  • @Tensibai Okay, then it'll be mandatory to sort them in alphabetical order I guess. Do you know of a way to give a specific execution order to GitLab CI? – avazula Dec 14 '18 at 14:05
  • 1
    The order you write them is the order they will be executed.... there's no magic behind – Tensibai Dec 14 '18 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.