What editor for Robot Framework test cases

Robot Framework home page lists a number of plugins to edit Robot Framework test cases along with Robot’s own editor RIDE. Here is a feedback based on my experience with some of those tools.

RIDE was my first choice four years ago when I started using Robot. We were a team of 20 quality engineers working on Windows machine. Some of us had a technical background and some others were more on the banking business side (we were producing a financial software). RIDE ended up being a good choice, specially for the non-tech people as it hided part of the grammar of test cases: Suite Setup, Tags, Library etc. are all input boxes in a GUI. The ability to launch test cases from Ride was also very handy and kept us away from the command-line (which most of the team was never using). Overall we had a very good experience with RIDE and I would recommend it in a similar context.

TextMate (with its Robot’s bundle) was the editor I switched to when I switched to Mac. There were 2 motivations to move away from RIDE. First one is that RIDE is not very slick on Mac (there are several issues opened for a while) and even install is a bit complicated with WxPython and Python versions collisions. Second motivation was that I joined a more technical company where manipulating the source code of the test was much more frequent (e.g. editing the test case on a remote VM via SSH with vi, merging changes done by another tester…). So I didn’t want anymore to have a GUI layer hiding the source code of the tests. I chose TextMate because it was free, lightweight and worked at once with Robot and SVN. After some time, I started to miss keyword completion and quick access to keywords source code though.

PyCharm is the editor I am using for a couple of weeks now. This time the switch was motivated by some limitation of TextMate (see before) and also by looking over my colleague’s  shoulder who were getting happier and happier with PyCharm. Looks like  JetBrains’s IDE is getting momentum in the Python  community as I hear/read more and more about it. There are currently 2 competing plugins for Robot Framework: Robot Plugin and Intellibot. Both are providing Syntax Highlighting, Code Completion, Jump to Source with some little differences. Best thing is to try them both and see which one fits best.

A side note about this editor topic. when I moved to PyCharm, the amount of syntax checking became one level higher than on previous editor, and I was bothered by the fact that all my TXT files were getting analysed by the plugin (making my non-Robot TXT files uneasy to read). So I changed the extensions of my Robot Test Cases and libraries from .txt from .robot. This way I can configure Robot Plugin to affect only my Robot files and not all the classical text files.

 

 

30 thoughts on “What editor for Robot Framework test cases

  1. I enjoy reading about the experience of others with regard to robot framework. I especially like hearing about people who switched from RIDE. I was a contributor to that project a few years ago, but I always thought the tool got in my way. I don’t think that hiding robot syntax is the right strategy.

    I’d like to suggest you try out the brackets (http://brackets.io) editor. I’m the author of the robot framework plugin (https://github.com/boakley/brackets-robotframework/wiki), which I think you might like. I’m building in some smart editing features to make writing robot tests a bit more pleasant, such as using the tab key to insert space-pipe-space, and a special macro for inserting ${}.

    Right now it only supports the pipe-delimited format, but I’m in the process of adding in support for space-separated format, too. Personally I think the pipe separated format is the best compromise between readability and ease of editing, which is why I started with support for that format first.

    Thanks for blogging about robot framework. The more that people hear about it the more they’ll want to use it, and the more they want to use it, the more likely it is that it will become even better.

    • Thanks for your comment. I am following you on SO, Twitter and your blog so I am familiar with what you do for Robot. Thanks to you as well for everything you give to the community! I did not try Bracket yet. I want to give it a try soon.

  2. I have also moved away from RIDE, but I use Sub Lime Text and it’s RF plugin to edit the test data. I love Sub Lime as an editor but I do not like the plugin so much. But it beats RIDE but perhaps I should give PyCharm a try.

    • I tried Sublime for a couple of days, but somehow I did not get used to it so I went back to TextMate (all a matter of taste…). You might like PyCharm though because it is really nice and works quite well without much customisation.

    • Hi,
      I have been using RIDE for a long time but started trying sublime and I like sublime and the only issue I face is, my test cases are getting executed only when I give full path of my resource file like this

      Resource /Users/BH/RF/Resources/resources.txt

      In RIDE, i would set my PYTHONPATH and provide my resource file name alone

      Resource resources.txt

      How can I make sublime plugin to locate my resource files using relative path? I did a resource scan and the resource files are located scan but some reason it only works with full path

      Any suggestions pls

  3. Hello,
    I started using PyCharm with the robot framework, but i’m facing an issue.
    how can i run my tests ? All the time i right click on my tests folder, i get an Empty test suit message from the console log.

    Is there anyway to run each test separatly like right click on the test case and hit the test runner ?

    thanks

    • I am not running the test from PyCharm but rather use an external terminal.
      Though I tried to make it work like you want, but indeed I could not.
      I created a “run configuration” (/run/edit configuration) but there I don’t know how to tell PyCharm “run this on the current opened file” or how to have this run configuration available on right-click on a given tests.
      So I am not able to help you Sorry!

  4. do you use sublime’s robot framework plugin? If so, could you please tell me how to run robot framework’s tests in sublime?

  5. I had previously attempted basic coding in Java and currently I am working on writing testing suite in RF using RIDE. I’d like to know more about PyCharm as I had used other Python IDE(Spyder) to work on my web scraping project.

    You had said “I am not running the test from PyCharm but rather use an external terminal.” Would you be able to elaborate further ? What external terminal did you use, what are other pointers to consider while writing cases in PyCharm using RF and how to run the cases?

    I understand I would need to get my hands dirty and I am going to. But I’d appreciate some direction.

    Thank you

  6. Hello! Is there any resource where I can get a really good guide to install RIDE roboframework on Mac EI Captain. I have seen so many stack overflow posts and lots of resources but never found one which can help me to run RIDE on Mac. I am able to successfully install RIDE 3 RF 3.0 Python 2.7 (already available). Please let me know what else is required to run RIDE. When I try to run RIDE it say’s can’t find any file or directory. I’m really in trouble. Do let me know if you guys have any good information of resources. Thanks

  7. As this seems to be a place that quickly pops up when looking for Robot Framework IDE comparison I’d like to add my 2 cents as well.

    I tried RIDE for a few days, but I just couldn’t get used to it. Perhaps it was the UI that simply wasn’t working for me, but I quickly reverted back to a text editor and only used it a few times to start Robot when I was still a little unfamiliar with the command line options of Robot Framework

    Then later one I moved to RED (https://github.com/nokia/RED) which is an Eclipse based editor. It has similar UI based editing features you find in RIDE but complements that with a strong code-editor.

    The code editor is where I spend most of my time. The syntax highlighting is great, code completion and the F3 go-to-declaration is a great time saver and the Robot run options of a single file, or even a single test case are just what a code oriented person needs.

    Other notable features are the documentation panels that show for a used Keyword what the docs say, this works for your Robot script based keywords as well as the python libraries. This is especially convenient when new to a piece of code.

    Last, but far from least, is the debug option. For those who have some programming experience will be familiar with line-by-line debugging. RED has managed to create a similar experience and this is a great feature for those of us who are writing more complex keyword code. Code that provides the abstraction layer a tester would need. It even supports external debugging, where your script is running on (for example) linux and your editor on windows.

    As this is built using the Eclipse framework, all of its eco-space goodness is also accessible. Although the editor comes as an all-in-one package download, there is also the option to add its functionality to your existing Eclipse installation. Plugins for Source Code repositories, combining it with other programming language support (Python, JavaScript come to mind) are all options to make the editor work.

  8. I like to read experiences about how people switch from one thing and that is how we grow. Keep trying better and better. Recently I started learning PyCharm. I am looking for good web source where can get some hints of how to write and enhance scripts. Your help would be highly appreciable.
    Thanks in advance

  9. I know this might be very late to found your blog at this time.
    But I want to ask for your recommendation, I started to work with Robotframework, official website is quite confuse for me. So what should I start to code/write script to run Robot. Now I installed the Python runtime 2.7, PyCharm community edition, and RIDE.
    What’s next I should go, or do you have any open source Robot script for learning by example?

    Thanks.

  10. Hi, Nice blog. I am new starter with Pycharm IDE and Robot framework.
    Do you have any step by step regarding how to configure Pycharm with Robot framework, Basic TC, and Execution process.
    Thank you.

    • I don’t have this. I just added the Intellibot plugin to PyCharm and then my tests got “syntax highlighted”. And I don’t use PyCharm to launch the tests, I am too much used to launch them in a terminal.

  11. Hi thanks for the article! But i was wondering why working in PyCharm made my whole code just pitch black :/ The codes actually works but no distinguishing font colors tho

  12. i am new to robot framework, can you guide please should i use robot framework on centos or on windows because i am trying on both but on windows i am unable to import external libraries and also getting permission error in running frequently and on centos 7 .6 i am unable to install wxpython and robot framework-ride
    so kindly suggest what should i do .

    • If you have problems with wxpython, I suppose you are trying to use the IDE Ride. My suggestion would be to forget about this module for now. You can edit your test with any simple text editor. That should be enough to get started.

  13. Hi,

    I am new to Robot Framework and currently working using PyCharm. I would like to know which is the best IDE for RF, RIDE or PyCharm?

    Also, I am using Intellibot@SeleniumLibrary plugin in PyCharm, but when I tried to get auto suggestions from IDE, it showed ‘no suggestions’. Can somebody help me how to resolve this?

    Thanks!!!

    • For the IDE, I prefer pyCharm and I don’t think RIDE is much maintained anyway.
      For the suggestion in pyCharm, I don’t know where the problem could come from.
      Good luck with that!

  14. Hi Guys,

    Thats such a nice article and very useful comments. I am a newbie to Robot framework and exploring it to automate my web application’s testing. I have a few questions if some could clarify these:

    1- Whats the best way to provide the test data to your test cases in robot ? Would it be better to use CSV or Excel to manage the data. How would you do that for an enterprise grade application?

    2- Can I use Robot to write automated test cases for the REST based APIs or this is just useful for the front end web and desktop applications ? Any alternatives on automating APIs.

    3- Is there a generic way in robot framework scripting to ensure that your test cases wont break even if there are changes in the UI ?

    4- do you have some example which explains how to implement an enterprise grade test suit using robot ?

    5- Can this tool be used to perform integration testing ? Can i call external APIs and systems within my robot scripts or do i need to write the python libraries ?

    • > Whats the best way to provide the test data to your test cases in robot ?
      > Would it be better to use CSV or Excel to manage the data.
      > How would you do that for an enterprise grade application?
      It depends on the context.
      Sometimes I keep the data within the tests because each test use a limited set of data specific to each test.
      Sometimes I put the data in external files because I need a larger volume of data or because I want to do other stuff with the data. The format will depend on my need. For example if I want to do some computation on the data, Excel is convenient.

      > 2- Can I use Robot to write automated test cases for the REST based APIs
      > or this is just useful for the front end web and desktop applications ? Any alternatives on automating APIs.
      Robot along with Python Requests library works very well to test REST bases APIs.
      I you have a very large SUT to test with many many endpoints you might reach the limit of Robot/Requests and you might have to go for a tool specific for API test.

      > 3- Is there a generic way in robot framework scripting to ensure
      > that your test cases wont break even if there are changes in the UI ?
      No magic way. Just create additionnal layers of keywords to centralize actions and have only one place to update when things change.
      Look for “page object pattern” for example

      > 4- do you have some example which explains how to implement
      > an enterprise grade test suit using robot ?
      Nope. It grows depending on your need in my experience.
      But I can tell you I did it a couple of times, with a number of tests growing to several 1000’s

      > 5- Can this tool be used to perform integration testing ?
      > Can i call external APIs and systems within my robot scripts or do i need to write the python libraries ?
      yes you can do any level of scripting.
      Usually you will have to code some Python at some points.
      Robot libraries provides a lot of features and you can do a lot of things in Robot DSL but usually you have to go to Python level at some point in the project. Which should be fine.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.