Home » Tag Archives: JUnit (page 9)

Tag Archives: JUnit

JUnit and Hamcrest: Improving On assertEquals

hamcrest-logo

In my blog post Are Static Imports Becoming Increasingly Accepted in Java?, I discussed the increasing use of static imports in Java to make code more fluent in certain contexts. Unit testing in Java has been particularly affected by the static import and in this blog post I provide one quick example of using static imports to make more fluent ...

Read More »

Beyond JUnit – Testing Frameworks alternatives

selenium-logo

JUnit is the defacto Java unit testing framework, but there’s a couple of new (and not so new) frameworks out there for web development that might be of interest. Questions you might want to ask yourself prior to adoption: Are they fast and easy to develop and therefore low cost?  Are they fast to run and therefore encourage adoption?  Do ...

Read More »

Covering your tests with Cobertura, JUnit, HSQLDB, JPA

hypersql-logo

Hello, how are you? Let us talk today about a very useful tool named “Cobertura”. This framework has the same functions of the Emma framework that we saw in another post. The major difference between Cobertura and Emma is that Cobertura displays the resume page with graphics. If you want to see the other topics about this subject click on ...

Read More »

Effective Unit Testing – Not All Code is Created Equal

junit-logo

Unit Testing is one of the most adopted methodologies for high quality code. Its contribution to a more stable, independent and documented code is well proven . Unit test code is considered and handled as an a integral part of your repository, and as such requires development and maintenance. However, developers often encounter a situation where the resources invested in ...

Read More »

7 mistakes of software testing

junit-logo

Though most developers know the importance of testing, it seems that a lot of them still aren’t testing enough. And if they write tests, they test just test wrong. UNIT TESTS If some tests are written in applications, most of them will be unit tests. It’s easy to test a utility class by just calling all utility methods, passing some ...

Read More »

TestNG or JUnit

junit-logo

For many years now, I have always found myself going back to TestNG whenever it comes to doing Unit Testing with Java Code. Everytime, I picked up TestNG, people have asked me why do I go over to TestNG especially with JUnit is provided by the default development environment like Eclipse or Maven. Continuing the same battle, yesterday I started ...

Read More »

DB unit testing with dbUnit, JSON, HSQLDB and JUnit Rules

dbunit-logo

In this week’s run of my TDD course, I thought it would be interesting to write a little fixture to make it easier to use dbUnit. My original thought was just to teach dbUnit about JSON, but it turns out that Lieven Doclo has done that already. So I decided to go a step further and also combine dbUnit with ...

Read More »

My Testing and Code Analysis Toolbox

findbugs-logo

Last week we kicked of a “Testing Skill Group” at LINEAS, a group for exchanging knowledge about testing. One question that came up over and over again in various flavors was: What tools are there for testing and analyzing your code? So here is my personal answer for this, in the approximately order I tend to introduce them into projects: ...

Read More »

Some Definitions – Testing Techniques 9

junit-logo

I think that I’m coming to the end of my series of blogs on testing techniques, and it feels like it’s been along haul. One of the things that has become clearer to me is that approaches to testing are still in their infancy and as such are a definite source of contention or discussion amongst developers – and that’s ...

Read More »

Why You Should Write Unit Tests – Testing Techniques 8

junit-logo

I’ve had lots of reaction to my recent blog on ‘What you Should Test’, some agreeing with me for varying reasons and others thinking that I’m totally dangerous for suggesting that certain classes may not need unit tests. Having dealt with What to test, today’s blog deals with Why you should write unit tests, and today’s example code is based ...

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