tips&tricks

Cargo + Maven + Two Tomcats

Recently I've been struggling to make Maven execute two Tomcat instances (with different applications on different ports). I decided to put a solution here so you don't have to discover it by yourself.

 

Jenkins Maven - No SNAPSHOT project in the reactor projects list

Sometimes when releasing your projects on Jenkins you will encounter this Maven error message:

You don't have a SNAPSHOT project in the reactor projects list

even if your pom.xml contains proper (x.y-SNAPSHOT) version.

 

Custom Asserts For ModelAndView

This blog posts present some custom assertions written for Spring MVC ModelAndView class to make the tests more readable.

 

Cleaning Old Artifactory Artifacts

Problem: growing number of our own released artifacts (JARs/WARs) in our Artifactory. Solution: regular cleaning. This post explains how.

 

Bad Tests Good Tests - Wasting Your Time

There are some things which are not worth unit-testing. Really, there are. Getters/setters and delegators are the best examples.

 

Java 7, Jenkins, Ubuntu 12.10 64bit issues

While installing Jenkins 1.486 on Ubuntu 12.10 server (64bit) with Java 7u9 I had two issues with libXrender.so.1 and libXtst.so.6 when running the first Maven build. I solved them and this post contains the solution.

 

Bad Tests Good Tests - True, False and Magic Switches

If we expect our tests to act as a documentation then we need to put some effort into their readability.

 

Bad Tests Good Tests - Modification of Global State

For unit tests a rule of thumb is to keep them independent from each other. It is not so bad if we introduce a dependency on purpose (and explicitly declare it e.g. using TestNG dependsOnMethod feature). A worse scenario is when we are not aware of the dependency ourselves. This can bring serious problems on our heads.

 

Jenkins Plugins - Part II - Varia

This is a continuation of my mumblings about useful Jenkins plugins (see the first post here: http://kaczanowscy.pl/tomek/2012-05/recommended-jenkins-plugins). As we progress towards continuous delivery I learn a lot about new plugins.

 

A Glimpse of Awaitility

Today I had a task to first deploy a webapp and then verify whether it was properly deployed. Obviously there are things to consider:

  • it takes time till the app is deployed and started,
  • it is hard to say how long it takes.

One solution would be to wait for some safe time (2 minutes? 3 minutes?) and then check if the app responds to requests. Yes, but it would be definitely more efficient to do it in some kind of a loop, so you do not waste too much time if, for example, everything is up and ready in 1 minute 20 seconds.

 
Please comment using
 
Syndicate content