Robot Framework Tutorial
Part I: Robot Framework Tutorial – Overview
Part II: Robot Framework – A complete example
Part III: Robot Framework IDE
Part IV: How to Structure a Scalable And Maintainable Acceptance Test Suite
Part V: Robot Framework Tutorial – Writing Keyword Libraries in Java
Part VI: Robot Framework Tutorial – Loops, Conditional Execution and more
Part VII: Robot Framework – Testing Windows Applications
Appendix A: Robot Framework – Compact Sheet
The new Robot Framework Tutorial 2016 series
The Robot Framework IDE (RIDE) is the integrated development environment to implement automated tests for the Robot Framework . The Robot Framework is a generic test-automatation framework. A quick overview on the Robot Framework is available from the following introduction slides .
The latest available version of RIDE is currently 0.40.1, which has been used as a basis for this blog post. First releases of this tool have been a little bit bumpy, but it can be seen that a lot of progress has been made in the meantime. A minor stumbling block was the download, as the hosting of the project is currently in a transition phase from Google Code to GitHub. The download for releases up to 0.39.1 is still available from the old RIDE pages at Google Code . The newer downloads are only available from GitHub.
The download and the installation as such have been running smoothly on my Windows XP machine. On first startup one big change was immediately visible for a veteran RIDE user. There is a new panel that allows editing of open files as plain text. But first things first :).
Once a testsuite has been loaded (or alternatively a whole directory containing several testsuites) it will be displayed in a tree-like structure on the left hand side of the editor. For each testsuite individual testcases can be selected for editing from this navigation tree. It is positive that every referenced resource file is automatically loaded and shown in the navigation tree under External Resources. As long as the testsuite is selected it is possible to configure its global settings, for example Suite-Setup and Suite-Teardown.
A big advantage of the Robot-IDE is the support in configuring different aspects of testsuites. Writing everything manually one might not even be aware that some features exist. Together with the very complete Robot Framework documentation this really helps in writing testcases with the Robot Framework. Editing some of the input fields is still something that one needs getting used to. When clicking on the Edit-Button a new window pops up for editing. Sometimes part of the syntax has to be known and entered here as well. For example the separation of arguments for a keyword using the pipe symbol.
Once you are getting used to this editing those fields is working without any problems. To edit an individual testcase one has to select that testcase from the navigation tree first. Generic fields for this testcase – for example documentation and tagging – can then be defined in the upper part of the editor. In the lower part the testcase is written in tabular format as a sequence of corresponding keyword calls. Thereby the keyword is written in the first column and all possible parameters in the other columns. This is intuitive and gets supported by additional features that are described in the following.
But for now I am very curious to take a look at the new text editor. So let’s switch to the corresponding panel. First I am a little bit surprised that the pure text format is shown here and not the HTML format as RIDE is storing files per default in that format. But of course this makes sense as hardly anyone would like to edit HTML directly. Internally all data structures are anyway handled independently from the output format.
A quick test shows that changes in the text editor show up in the visual editor and vice versa. Switching between both views is thus working very smoothly and as expected.
Of course one is expecting further support for the daily implementation work from an IDE. RIDE implements this support already for some time by offering an auto completion for keywords. This can be activated by pressing “CTRL-Space” when entering a keyword. In an empty field this will then show all available – read from all included test libraries – keywords. Otherwise it is possible to start typing and then get the auto completion for all keywords starting with the already typed text. In addition the available documentation for those keywords is shown. Please note that in the following the screenshot is not 100% complete.
For those keywords that are defined in included resource files it is in possible to jump to the corresponding definition directly performing a double click on that keyword in the test definition (or another keyword definition). A very nice feature is the possibility to also perform this operation in the other direction, thus finding all places where a specific keyword has been used. This can be done by pressing the button Find Usages in the corresponding editor page. This features exists as well for all keywords included via test libraries. Therefore it is first of all possible to get an overview of all those keywords under the menu option “Tools -> Search Keywords”.
As already mentioned it is also possible here to search for all places in all open files where such a keyword is used. This is especially useful when refactoring testcases. By pressing on one of the search results RIDE jumps directly to the corresponding place in the editor.
Finally let’s have a look at the third panel that is named Run. This enables the user to directly execute the tests for the currently opended testsuite. This can be done by using pybot, jybot or a customized script. For smaller projects one of the first two options might work quite well. But bigger projects usually also have quite some additional parameters and potentially other startup configuration that is defined in individual startup scripts. It is a very good solution that those ones can be executed from here. The output of the script execution can be seen in the editor. The following shows an example where all testcases have been failing :-).
My individual conclusion is that RIDE is evolving more and more to a very complete IDE for developing tests with the Robot Framework. The tool offers a lot of guidance and internal documentation. Especially for less technical users this is a big advantage. In the other extreme there is still the possibility to use Eclipse and Maven to develop tests :). For all users (and users-to-be) of RIDE I think it will be very interesting to see how the tool will evolve in the upcoming releases.
More articles
fromThomas Jaspers
Your job at codecentric?
Jobs
Agile Developer und Consultant (w/d/m)
Alle Standorte
More articles in this subject area
Discover exciting further topics and let the codecentric world inspire you.
Gemeinsam bessere Projekte umsetzen.
Wir helfen deinem Unternehmen.
Du stehst vor einer großen IT-Herausforderung? Wir sorgen für eine maßgeschneiderte Unterstützung. Informiere dich jetzt.
Hilf uns, noch besser zu werden.
Wir sind immer auf der Suche nach neuen Talenten. Auch für dich ist die passende Stelle dabei.
Blog author
Thomas Jaspers
Do you still have questions? Just send me a message.
Do you still have questions? Just send me a message.