- Open Sourcing Emcalc, a Legacy Application In 2004 my friend asked me to write him an application - called emcalc - that used his results from his thesis work that he can use in his new job. The application was able to tell the gas emission of different boilers that was common in the households in our neighbourhood at that time.
more...
- Cucumber JVM: Hooks I finished the previous post with the promise that I'm going write more about hooks in cucumber. By definition, hooks allow us to perform actions at various points in the cucumber test cycle. The definition wisely doesn't say much about these actions and the points where they are executed.
more...
- Cucumber JVM: Web Application with Spring MVC It's been a while since the last Cucumber JVM post, and since I've started to work with Java based web applications, it was time to continue the series. Last time I left off, I had a class that could transform an arbitrary sentence such as I like testing into I lkie tnitseg by following the rules of the text munger kata.
more...
- Embedded Web Services For Testing Web Applications from JUnit Quite recently, I was working on a Java based web application. Everything went very well until I tried to test it. I was looking for a way to run my selenium based test cases with one click, because the manual deployment to tomcat was starting to be annoying.
more...
- Put Your TODO Items Into Your Test Case Until now I was using a TODO file for tracking ideas and the things I still had to do. A couple of days ago, while I was working on a small ruby project, I remembered that I had to check out something after I was done with my current task, so I opened the TODO file and added a line.
more...
- How I Start Working with Legacy Code While I was cleaning up one of my old folders, I found an old application jar file from 2004. I remember that I wrote this app for my friend who used it for calculating some kind of gas consumption.
more...
- Cucumber JVM: Mocking In the previous cucumber-jvm post I introduced dependency injection, which makes it possible to use mocks during testing. Usually, it is a bad idea to introduce mocks in cucumber scenarios, because they are supposed to test the whole system as it is, however there are cases when mocking comes in handy: for example, a module or component of your system communicates with a 3rd party system.
more...
- Cucumber JVM: Dependency Injection Last time I finished with a failing test case which drove the development to a phase where I had to deal with a sentence instead of a word. The fix was not a big deal, but I ended up with a method in SimpleTextMunger which did three things.
more...
- Cucumber JVM: More Scenarios In my previous post I started to play around with cucumber-jvm to see how it could be used for Java development. Last time I finished with one scenario and now I'm going to move forward with my simple text munger implementation and see how to use cucumber-jvm with multiple scenarios.
more...
- Cucumber JVM: Preparation Every time I wrote some code in ruby and executed our cucumber features I craved for something similar in Java. I knew that there were several BDD frameworks for Java like JBehave, JDave, and EasyB, but none of them was right for me.
more...
- How to Narrow Down What to Test An old friend told me that they did not do automatic testing at her company, or any kind of testing for that matter, because in terms of money they are better off if they do ad hoc testing and bug fixing one week prior to the delivery date. Then I got into an interesting discussion where the topic was that the customer does not pay for tests, she pays for a working software.
more...
- Weekly - CW15 While I spent most of my time with learning more about Ruby on Rails and RSpec this week, I found the following links worth sharing. So here is my collection for calendar week 15, 2011.
more...
- The Currency Format Kata A couple of days ago, I needed a function which is capable of printing out a certain amount in Hungarian currency format. At that time I found the implementation of this function challenging, so I decided to implement it on my own, without googling for an existing solution.
more...
- Testing the Stack Implementation I've created my own version of the exercise used during my first agile job interview in order to compare it to the result of the pair programming session of the job interview. The exercise was quite simple.
more...
- The First Agile Job Interview In one of my previous posts I was writing about a different kind of job interview. Today, I had the possibility to perform my first agile job interview, and although I only got twenty minutes, it was very well spent. For this twenty minutes, I planned a pair programming session with the candidate.
more...
- jMock versus Mockito I've been using jMock for more than a year now, but recently I came across mockito. In this post, I'll show the difference between jMock and mockito - without judging which one is better - using the basic features I've been using the most often from jMock.
more...
- File Lottery Kata When I do some coding, I use test driven approach, have lots of fake and mock objects, and I use dependency injection for putting everything together. I usually don't work alone, and from time to time I have to introduce these methods to someone with less experience in this particular area.
more...
- One Step Back In Testing There are several advantages and disadvantages of Test Driven Development. In this post, I have no intention of repeating any of these, instead, I'd like to show a way to use TDD effectively while changing legacy code.### The ProblemHave a look at this legacy code:This code does not do much; it accepts two words separated with a space, and returns true/false depending on whether the words are equal or not.
more...