Filed under: Automation, Continuous deployment, Linux, Tools, — Tags: Gatlin, HAProxy — Thomas Sundberg — 2017-03-29
I want to deploy new versions of an application with no downtime. It turns out to be a bit tricky. Here is one solution that sort of works.
(more...)Filed under: Load testing, Scala, Test automation, Tools, — Tags: Gatling — Thomas Sundberg — 2016-08-04
The documentation for Gatling tells us that "Gatling is an open-source load testing framework based on Scala, Akka and Netty". I have heard good things about it but never tried it.
The technical parts, Scala, Akka and Netty, were less interesting from my perspective. The interesting part was its developer-friendly DSL, Domain Specific Language. I have used tools like JMeter and I have never been impressed by their user interfaces. They are too complicated. As a developer, I like when I can specify my load script using my regular tooling. That is, an editor, a build tool and a command line.
(more...)Filed under: Gradle, Java, Programming, Test automation, Tools, — Tags: Acceptance Test Driven Development, Acceptance testing, Acceptance tests, Automation, Separating tests — Thomas Sundberg — 2015-04-29
It is very convenient to run the unit tests separated from other, slower, tests. There are different ways to do this. One way is to have a separate module for the acceptance tests.
Separating the modules is acceptable in some cases. It is not acceptable in others. There is a simple way to separate the source code for the acceptance tests while keeping the it in the same project if you use Gradle. Separate the tests with different source sets.
Separation on source sets means that you will keep all the acceptance tests in another directory structure than the unit tests. If you use the usual separation of production code and test code, then all you want to do is to add a new source set that contains the acceptance tests.
(more...)Filed under: Tools, — Tags: Class header, IntelliJ IDEA, JetBrains — Thomas Sundberg — 2014-10-24
My weapon of choice when it comes to editors is without question IntelliJ IDEA. It is great and behaves as I want and usually expects. It has, however, one feature that I find annoying and that I always remove.
IDEA will automatically insert a header with my user name and the date when I created a new class. I use version control so this information is never important. Adding a user name implies code ownership. Code ownership is against one principle I think is very important, collective code ownership. It is a core principle in XP with the goal to make sure that every developer feels that it is ok to work on all code in a project.
The header IDEA inserts used to include where to find it so you easily could find and modify it. Today, when I set up a new environment at a new customer, I noticed that the template had changed. It didn't tell me where to find the template. It looked like below:
/** * Created by ${USER} on ${DATE}. */(more...)
Filed under: Java, Tools, — Tags: IntelliJ IDEA, JUnit, Test template — Thomas Sundberg — 2012-06-01
A test template for JUnit tests doesn't exist out of the box for IntelliJ IDEA. Creating one is not complicated.
The goal is to create a simple template that will assist you when you need to write a test in JUnit. I want it to look something like this:
(more...)Filed under: Tools, — Tags: IntelliJ IDEA, never return null, null, return null — Thomas Sundberg — 2011-07-28
Using your IDE to automatically create methods for you maybe a disaster waiting to happen.
(more...)