Home » Tag Archives: Testing (page 22)

Tag Archives: Testing

Maven Cargo plugin for Integration Testing

codehaus-cargo-logo

A very common need in the lifecycle of a project is setting up integration testing. Luckily, Maven has built-in support for this exact scenario, with the following phases of the default build lifecycle (from the Maven documentation): pre-integration-test: Perform actions required before integration tests are executed. This may involve things such as setting up the required environment. integration-test: Process and ...

Read More »

5 Tips for Unit Testing Threaded Code

junit-logo

Here’s a few tips on how take make testing your code for logical correctness (as opposed to multi-threaded correctness). I find that there are essentially two stereotypical patterns with threaded code: Task orientated – many, short running, homogeneous tasks, often run within the Java 5 executor framework, Process orientated – few, long running, heterogeneous tasks, often event based (waiting on ...

Read More »

Help, My Code Isn’t Testable! Do I Need to Fix the Design?

software-development-2-logo

Our code is often untestable because there is no easy way to “sense1” the results in a good way and because the code depends on external data/functionality without making it possible to replace or modify these during a test (it’s missing a seam2, i.e. a place where the behavior of the code can be changed without modifying the code itself). ...

Read More »

A Classification of Tests

software-development-2-logo

There are many ways of testing software. This post uses the five Ws to classify the different types of tests and shows how to use this classification. Programmer vs Customer (Who) Tests exist to give confidence that the software works as expected. But whose expectations are we talking about? Developers have different types of expectations about their code than users ...

Read More »

Tips for testing with Java

junit-logo

Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read – opinions) together. Before I start on how best to compose your tests, I briefly ask – What are the reasons for testing? Broadly, I think they are: Reduce total number of bugs / increase product stability Ensure software works as per ...

Read More »

What’s better – Big Fat Tests or Little Tests?

software-development-2-logo

Like most startups, we built a lot of prototypes and wrote and threw out a lot of code as we tried out different ideas. Because we were throwing out the code anyways, we didn’t bother writing tests – why write tests that you’ll just throw away too? But as we ramped the team up to build the prototype out into ...

Read More »

Using EasyMock or Mockito

java-logo

I have been using EasyMock for most of time but recently I worked with a few people who were pretty much inclined to use Mockito. Not intending to use two frameworks for the same purpose in the same project I adopted Mockito. So for the last couple of months I have been using Mockito and here is my comparative analysis ...

Read More »

Testing Spring & Hibernate Without XML

spring-interview-questions-answers

I’m very keen on the improvements in Spring 3 that eventually let you move away from XML into plain Java configuration with proper support from IDE and compiler. It doesn’t change the fact that Spring is a huge suite and it sometimes finding the thing you need can take a while. XML-free unit tests around Hibernate are one such thing. ...

Read More »

Answering with Mockito

mockito-logo

When you are writing unit tests, you must keep in mind to not have dependencies to external components. To avoid this we use mock frameworks which for me the easiest one to use is Mockito. In this post we are going to see an ‘advanced’ technique used in Mockito to return same argument instance on a mocked method using Answer ...

Read More »

Extending JMeter with a WS-Trust/STS sampler

apache-jmeter-logo

JMeter does not have any inbuilt support for WS-Security or WS-Trust and that made me develop this STS Sampler for JMeter – which could make anyone’s life better while load testing an STS. First you need to have the Apache JMeter distribution. I am using v2.7. Then you can download sts.sampler.zip from here – unzip it and copy the “repo” ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close