Fully automatic Integration tests with Maven and Robot Framework

So how hard would be for me to run the integration tests on my machine,  I asked my colleague. 

This is very hard, he said, you will need at least a couple of days to configure and install everything.

This post will present the solution I put in place for a fully-automated  platform for integration tests, using maven and the Robot Framework. Once we’re done, we could answer the above question something like this:

It’s easy, you should be able to do that in couple of minutes, everything is automated.

The big picture

I will not get into details about the business application we are testing. It is a server application which provides some services for other applications using some communication protocol (sockets, for instance). My application needs itself to connect to some third-party applications to use their services.  We suppose we already have a java library which allows us to write java code to communicate with our application. 

Lets first see the components involved in the platform


  • The application under test. This is a java application using maven as the build tool.
  • A set of  applications (we call them third party applications although, in my case, they are developed by our teams) providing services to the application under test. These applications need to be configured and started in order for the application under test to be able to connect to them and use the services.
  • our Nexus Repository  Manager – this is where we deploy our artifacts. Applications needed by the application under test are deployed here as artifacts.
  • SVN repository – we have an SVN repository for the application under test.  The repo contains a folder (src/test/ressources) where we keep the configuration files for all the applications involved in the tests, as well as the test files themselves.

Goals of our testing platform

  • Anybody can run the tests on his machine  (no prerequisites, no manual download or configuration of any third party component, 2 minutes to set up and run the tests)
  • Anybody can write a test (We mean anybody)
  • Tests are versioned with the application under test (no need to sync tests and the application under test, I can test the development version on my machine )

These are the steps that we will need to perform

  • prepare-package phase
    • prepare configuration files for all applications involved in the tests
  • package phase
    • package application under test
    • download third-party applications artifacts
  • pre-integration-test phase
    • configure and start third party applications
    • configure and start application under test
  • integration test phase
    • run robot tests
    • verify results
  • post-integration-test phase
    • stop all applications

And this is the file structure of my project (commited on SVN):

  • src/main/java – java code of my application
  • src/test/java  – java code of the robot kewords
  • src/test/ressources/config – configuration files for third-party applications
  • src/test/ressources/robotframework – robot test files

My following posts will show how we build this automatic test-platform step by step.

This entry was posted in robot framework, testing and tagged , , , . Bookmark the permalink.

One Response to Fully automatic Integration tests with Maven and Robot Framework

  1. Nanda Ram says:

    Hello, I’m trying to find the rest of your posts on using RobotFramework on integration testing. Could you provide the links to them. We have a similar project on the works at my organization. It uses internally developed software components and Kafka as messaging middle tier/communication mechanism. Any points on how to test the integration and how to setup the robot framework. Btw, Im new to RF and Kafka. Any help will be appreciated.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s