Yearly Archives: 2013

How to write a Jenkins Plugin – Part 4

In this part we’ll look at getting your plugin hosted on the Jenkins GitHub, performing a release, and documenting your plugin in the Jenkins wiki. Your main point of reference for this should be the official guide in the Jenkins

Posted in Jenkins, Jenkins Plugins

How to write a Jenkins Plugin – Part 3

In this part we will find a way to count the number of failed jobs in a view and pass it back to our Jelly UI fragment. Counting Failed Jobs In a View First we’re going to modify our viewTabs.jelly

Posted in Jenkins, Jenkins Plugins

How to write a Jenkins Plugin – Part 2

In this part we will create a form fragment for the global config page using Jelly, and see how to save and use changes to the config submitted by users. Then we’ll customise the view tabs Jelly to call our

Posted in Jenkins, Jenkins Plugins

How to write a Jenkins Plugin – Part 1

Maven Settings You will need Maven 3 for this. Maven 2 will not work. (Also needs JDK 6 or higher.) You will need to add some junk to your settings.xml: In pluginGroups add <pluginGroup></pluginGroup> And In profiles, add a profile like

Posted in Jenkins, Jenkins Plugins

How to write a Jenkins Plugin – Introduction

Why? I love Jenkins. Use it all the time. Depend on it, rely on it. Wherever I work, I always make considerable and sustained efforts to improve the way that Jenkins is used. Extending from commit builds to complete delivery

Posted in Jenkins, Jenkins Plugins

JUnit Rule for Annotations in EasyMock 3.3

In my first contribution for EasyMock 3.3 I have added support for processing the annotations with a JUnit Rule instead of the JUnit Runner. In 3.2 you could do this: @RunWith(EasyMockRunner.class) public class SomethingTest extends EasyMockSupport{ @Test public void shouldDoSomething()

Posted in EasyMock, JUnit

Annotations in EasyMock 3.2

Lots of people have been asking for annotation support in EasyMock, including me: EASYMOCK-51. I created EasyMockRule as a way to add annotation driven mocking, and a few other nice features like Hamcrest matcher support for expectation setters and automatic verification, mostly

Posted in EasyMock

Signal to Noise Ratio

By which characteristics do we judge whether a unit test is clean? I know it when I see it, but what is it I’m seeing that tells me a test is clean or not? There are lots of things we

Posted in Clean Test Code

A Philosophy of Names

Reading a colleague’s unit tests recently and noticing some odd choices of test cases, like a test called “testConstructor” to confirm that no exceptions are thrown when you call the default constructor, it struck me that the choice of names

Posted in Clean Test Code

Annotations for EasyMock

Look at this: With JUnit, that’s all you have to do make a method behave as a test. It’s clear at first glance that this is a test. That one simple annotation makes the method take on all the characteristics

Posted in EasyMock, JUnit