Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Testing

  • submit to reddit
Dustin Marx05/09/12
795 views
0 replies

Improving On assertEquals with JUnit and Hamcrest

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 unit tests that use JUnit and Hamcrest.

John Dobie05/08/12
1200 views
0 replies

Unit and Integration Tests With Maven and JUnit Categories

This example shows how to split unit and integration tests using Maven and JUnit categories. It is especially useful for existing test suites and can be implemented in minutes.

Mohamed Sanaulla05/03/12
2468 views
2 replies

My First steps in Test Driven Development- A Win-Win Strategy

Agile practitioners talk about Test Driven Development(TDD), so do lot of developers who care about their code quality and workability.

Giorgio Sironi04/30/12
5217 views
0 replies

MongoDB and Java

How to access MongoDB from Java code and isolate the rest of the application from persistence concerns.

Jens Schauder04/19/12
5070 views
15 replies

TDD: Do We Really Have To Do It?

Many really smart people tell us we have to use TDD if we want to create code that is worth a penny. But the one thing these people do not provide is anything close to a proof. They offers their own experience, which might be distorted for all kinds of things.

Dan Allen04/10/12
5126 views
3 replies

Death to all bugs! Arquillian testing platform reaches first stable release

Red Hat, Inc. and the JBoss Community today announced the 1.0.0.Final release of Arquillian, its award-winning testing platform built to run on the Java Virtual Machine (JVM). Arquillian substantially reduces the effort required to write and execute Java middleware integration and functional tests. It even enables test engineers to address scenarios previously considered untestable or too expensive to test.

Mark Needham03/31/12
1747 views
0 replies

Trying Not to Overdo It With Testing

Typically we might expect to see unit level test against all the classes, but we’ve actually been trying out an approach where we don’t test the orchestration code directly but rather only test it via the resource which makes use of it.

Dustin Marx03/29/12
2969 views
0 replies

Unit Testing is a Means to an End

As with most good things, even unit testing enthusiasm can go too far. The benefits of unit testing can lead to overly enthusiastic unit testing developers forgetting that unit tests are not the end themselves, but rather are a means to the real end.

Alex Ruiz03/12/12
2708 views
0 replies

Testing Formatting in Eclipse Editors: Real Unit Tests

Previously I described how I tested formatting in an Eclipse editor. Now I know that I can use INodeModelFormatter to unit-test formatting, which makes the creation of formatting tests easy, without the need for any UI during the test execution.

Fredrik Håård03/09/12
6867 views
0 replies

On Useless Testing...

Fredrik Haard is at it again, this time explaining why all testing is not valuable, and why the most important question to ask yourself when coding is: "What value does this code add?"...

Giorgio Sironi03/06/12
4461 views
0 replies

Asynchronous and negative testing

How to test that something eventually happens or does not happen at all?

Swizec Teller03/01/12
6506 views
13 replies

Unit testing is for lazy people

The other day I was talking to a guy about a possible freelancing gig and he said how wonderful it was that I should bring up the topic of unit/automated testing without being asked. He said that most (many?) developers don’t have the level of rigor to use automated testing. My reaction was one of disbelief “Rigor!? But automated testing is one of the laziest things a developer can do! It speeds stuff up so much!”

Howard Lewis Ship02/27/12
1596 views
1 replies

What Assumptions Do Your Tests Make?

Does your test suite launch your application or expect it to be running already? This question came up while working on a client project; I launched the Selenium-based test suite and everything failed ... no requests got processed and I spent some time tracking down why the test suite was failing to launch the application.

Rob Williams02/20/12
2909 views
0 replies

Test Driven Development and Neo4J: Using @Rule and Avoiding Containers

I've been doing some coding with Neo4J and one thing is for sure: being able to write seriously sophisticated code that has a large, complex model underneath it, from inside unit tests that run in a few milliseconds is priceless. There are still a couple of challenges to consider, but the reality is with a simple custom rule (using JUnit 4), you can have an embedded database that will be ready for each test, and cleaned up after each one. But is there really a need to use the container from the start?

Rob Williams02/17/12
2064 views
0 replies

The Difficulty With Custom @Rule in JUnit 4

There is a right way to create custom rules, but it's not as easy as you might hope. First I found a bunch of people talking about making rules by implementing MethodRule, but that is now deprecated . And then I found that you can't put a Rule inside a Rule.