Performance Testing a Multiuser Web Application with JMeter and Maven

When there is the need to create load tests or performance tests for an application, Apache JMeter is a handy tool and set up with ease. In the following short tutorial I’d like to demonstrate how to configure JMeter to log into a Java EE web application with multiple users specified in a CSV file, how to generate some basic reports and how to integrate JMeter into a mavenized build using the JMeter Maven Plugin. ...

January 18, 2015 · 7 min · 1327 words · Micha Kops

BDD Testing with Cucumber, Java and JUnit

Whether behaviour-driven-development, specification by example or acceptance test driven development is the goal, the Cucumber framework eases our life when we need to establish a link between the non-technical, textual description for a new feature and the tests that prove that the application fulfils these requirements. In the following short tutorial I’d like to demonstrate how to add Cucumber to a Java project and how to write feature descriptions and test-cases for each step of these descriptions. ...

December 28, 2014 · 9 min · 1770 words · Micha Kops

A short Introduction to ScalaTest

ScalaTest is an excellent framework to write concise, readable tests for your Scala or Java code with less effort. In addition it integrates well with a variety of frameworks like JUnit, TestNG, Ant, Maven, sbt, ScalaCheck, JMock, EasyMock, Mockito, ScalaMock, Selenium, Eclipse, NetBeans, and IntelliJ. In the following short tutorial we’re going to write some tests using ScalaTest exploring features like rich matchers, BDD syntax support or web tests using Selenium/Webdriver. ...

January 13, 2013 · 7 min · 1346 words · Micha Kops

New features in JUnit 4.11

JUnit is one of the most popular testing frameworks out there. Version 4.11 has just been released and offers some nice improvements that you shouldn’t miss. Dependencies In older versions of JUnit there were two dependencies .. junit:junit contained an old version of hamcrest and could cause some nasty trouble .. junit:junit-dep just referenced hamcrest the maven way. Now with version 4.11 there is just junit:junit with clean references to hamcrest and junit:junit-dep is relocated to junit:junit. ...

November 18, 2012 · 4 min · 850 words · Micha Kops

Testing RESTful Web Services made easy using the REST-assured Framework

Figure 1. REST-assured Integration Test Tutorial Logo There are many frameworks out there to facilitate testing RESTful webservices but there is one framework I’d like to acquaint you with is my favourite framework named REST-assured. REST-assured offers a bunch of nice features like a DSL-like syntax, XPath-Validation, Specification Reuse, easy file uploads and those features we’re going to explore in the following article. With a few lines of code and Jersey I have written a RESTful web service that allows us to explore the features of the REST-assured framework and to run tests against this service. ...

October 23, 2011 · 9 min · 1742 words · Micha Kops

REST-assured vs Jersey-Test-Framework: Testing your RESTful Web-Services

Today we’re going to take a look at two specific frameworks that enables you to efficiently test your REST-ful services: On the one side there is the framework REST-assured that offers a nice DSL-like syntax to create well readable tests – on the other side there is the Jersey-Test-Framework that offers a nice execution environment and is built upon the JAX-RS reference implementation, Jersey. In the following tutorial we’re going to create a simple REST service first and then implement integration tests for this service using both frameworks. ...

September 5, 2011 · 6 min · 1094 words · Micha Kops