0

How to run Test suite multiple times in robot framework?

Tried using for-loop and Repeat Keyword but both didn't help out , could I get exact solution of how to iterate a test suite in robot framework.

3 Answers 3

4

Robot has nothing to support this. You will need to write your own script which calls robot periodically over the 12 hour period. You can use the --outputdir option to have each run write to a unique output folder, and when the test run is finished you can combine all the reports into one big report with rebot.

Another solution would be to leverage a continuous integration tool such as jenkins or teamcity to automatically schedule runs over a period of time.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks I'll try it out and get back if I get struck anywhere.\
2

You can use looping concept for this Iterating tests robot framework this code worked for me try this

 *** Settings ***
         Documentation  
         Library  Selenium2Library

 *** Variables ***
         @{HOMEPAGES}    https://www.google.com  https://www.google.com
         ${Browser}  Chrome

 *** Test Cases ***
 testing with several links
         :FOR    ${homepage}     IN      @{HOMEPAGES}
         \  Funtionality  ${homepage}

 *** Keywords ***
         Funtionality
         [Arguments]  ${homepage}
         Open Browser     ${homepage}    ${Browser}

         Add all functionality which ever you need to perform

In the above code, I used Funtionality as a keyword and it will consider as one loop and runs, give the result

Comments

1

You could use continuous integration, not sure why you would run the suite multiple times, another thing is you could robot tests/suite.robot tests/suite.robot ... which would result in your suite running twice or more times for example

4 Comments

i need to run same test suite upto 12hours, if i give like this in command line it will be very big and also every time output file will be replaced. please suggest some way like if i want to run for 60times. Thanks
suggest some site to use continuous integration or some syntax how to do
you could try merging your outputs using --merge flag, so they would not be replaced, there is another possibility to output a new log and give it a number so they wouldn't overwrite the previous ones, but I can't find it in the documentation (it is definitely there) robotframework.org/robotframework/latest/… For continuous integration, you could use Jenkins, Circle CI or Travis CI
k thankyou, i will check it out with jenkins, if there is any issue i will get back to you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.