Tag Archives: RobotFramework

Third-party library integration with Robot Framework’s jar

Personally, I arrived at my new company, and already got some new duties to fulfill. One of them was to get a GWT application under test. Since I made great experiences with Robot Framework and its Selenium Library while automating ParkCalc a while back, I decided to try it out for the application.

Besides all of the awkwardness coming form not generated ids on the xhtml of the web-pages, I finally got a first spike solution to run. After some more refactoring steps, I decided to provide some automation of the tests, so that my colleagues are able to work with it as well. Since the application is developed with eclipse in Java, I wanted to use a similar infrastructure to get the tests automated. Thereby, I decided to try out the packaged jar file of Robot Framework 2.5.x. This went amazingly smooth. Since I had to integrate the Selenium Library with the jar file, I was wondering, if this will be reusable, and what I need to do for it. The UserGuide describes, that I should repackage the jar, but this step I wanted to explicitly avoid.

Instead, I took a closer look. In order to try out the simplest thing that could possibly work, I created a lib directory in the eclipse that I had created, and added the jar file to that lib directory. Inside the lib directory I created a Lib directory (with upper case L), where I copied the SeleniumLibrary directory from my local installation, containing the python files necessary for the integration as well as the Selenium Server library in it’s own lib directory.

I was amazed that this was all I needed to do in order to integrate the Robot Framework jar file (which encapsulated jython) with the Selenium Library. I even tried to rename the installed Selenium Library just to be sure, that this was indeed all I needed to do, and was amazed when I found out that the packaged jython already created .class files for the Selenium Library python classes.

All I then needed to do, was to create an ant build script, which simply invokes the jarfile, and now I can call this from the build server of our continuous integration system. Wonderful, isn’t it?

ParkCalc automation – Templates for data-driven tests

As pointed out earlier, I wanted to work through a test for ParkCalc using templates. As this did not seem to work, and I got no clue why, I gave up and postponed it. Today I was able to take a step back with a fresh mind and approach the problem with a different focus. So, here is the template solution for ParkCalc automation.

Continue reading ParkCalc automation – Templates for data-driven tests

ParkCalc automation – A short reflection

Over the course of the past week or so, I wrote some blog entries on ParkCalc automation. Today I decided it’s time for a brief wrap-up on what I learned over the course. You can find the four parts written up so far here:
Getting started, Refactoring a data-driven test, Refactoring a keyword-driven test, BDD style tests

Continue reading ParkCalc automation – A short reflection

ParkCalc automation – BDD style tests

In the comments on one of the previous blog entries in this series, Pekka Klärck pointed out that another great way to refactor a keyword-driven test to a data-driven is the usage of templates within Robot Framework. Before doing this, we will take a look at BDD style tests using given, when, and then. Following an ATDD approach does not make sense for the problem statement given, but I will at least scratch that topic during the reflection.

Continue reading ParkCalc automation – BDD style tests

ParkCalc automation – Refactoring a keyword-driven test

Today, we’re going to continue our ParkCalc automation excursion. We will take a closer look on the second test in the provided test examples, the keyword-driven format, and see how we can improve it. Please note that I added an update to the previous blog entry showing that we can improve the test even more by extracting the date ranger into meaningfully named variables – just as Dale Emery did in his article Writing Maintainable Automated Acceptance Tests.

Continue reading ParkCalc automation – Refactoring a keyword-driven test

ParkCalc automation – Refactoring a data-driven test

Over the weekend I introduced into ParkCalc automation. Today, we will take a closer look on the third test in the provided test examples, and see how we can improve it. Before I do this, I will point you to two great articles from Dale Emery. The first is tenish pages piece where he walks through a login screen. Uncle Bob showed the same example using FitNesse with Slim. In the second he describes a layered approach to software test automation in a very well manner. Together with Gojko’s anatomy of a good acceptance test this gives us some picture where we should be heading.

Continue reading ParkCalc automation – Refactoring a data-driven test

ParkCalc automation – Getting started

This week Gojko Adzic wrote about the anatomy of a good acceptance test. After having read his elaboration, I remembered how I came up with the preparation for the EWT19 session some weeks ago. We used RobotFramework to automate tests for the Parking Lot Calculator that we asked Weekend Testing participants a few weeks earlier with manual Exploratory Testing. To get testers started we provided them with three examples that I prepared before the session. We then asked testers to automate their tests for the ParkCalc website based on one of the examples we provided. Here is my write-up how I came up with the examples, and what I had in mind.
Continue reading ParkCalc automation – Getting started