1

Our team wants to migrate the tests from QTP. We have the automation flows for UI, API and some database tests. After a long research, I found robotframework would be a nice tool.However as I started writing tests, I found that I am writing tests and corresponding keywords for test case in single file.

As the number of test cases increase, it seems I cannot maintain all of the code in one file. I would like to separate the tests and keywords in to different files. Is there a way we can do it? If it is, please provide some examples on usage.

asked Jan 22, 2017 at 6:51

2 Answers 2

2

The most common and the most logical way to partition your tests is to organize them as per their testing areas.

You can refer to this link for more details. Robot Framework doc

answered Jan 22, 2017 at 19:47
0

You should definitely separate your keywords from your tests and can use resource files to do so. A good practice is to have a page object file that holds all the keywords for interacting directly with the page. The page elements should be in variables and this file is where all the selenium keywords should be. This way, if the UI changes, you only have to change this file and not each and every test. The actual tests should read as plainly as possible so that non technical folks can clearly understand them. Typically, don't use Selenium keywords here. This will also make the results file much easier to read.

answered Jan 26, 2017 at 2:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.