Quantcast
Channel: Unit testing – Dark Views
Browsing latest articles
Browse All 9 View Live

Image may be NSFW.
Clik here to view.

Hidden JUnit features: @Rules

@Rules seem a better solution than @RunWith to do some special work before/after a test. The release notes mention a couple of ideas: Notification on tests Setting up or tearing down resources,...

View Article


Image may be NSFW.
Clik here to view.

Feeling like Hercules?

In the ancient mythology, Hercules slew the Hydra, a monster which could grow a new head for each one cut off. Does that remind you of your programming job? The punchline is: Hercules didn’t conquer...

View Article


Image may be NSFW.
Clik here to view.

Testing Requirements

When developing software, you’re constantly faced with two issues: Get all the requirements Make sure the requirements are correct When writing code, we use tests to make sure we meet all the goals...

View Article

Image may be NSFW.
Clik here to view.

Eclipse Suddenly Takes Long to Start Unit Tests

When starting a JUnit test in Eclipse suddenly takes ages (the process starts quickly as you can see in the Console view but it takes ages until the tree of tests appears in the JUnit view), you might...

View Article

Image may be NSFW.
Clik here to view.

The Difference Between Unit and Integration Tests

A unit test checks a certain feature of the software. When it fails, you usually know exactly where to look for a place to fix the problem. They are short, compact and fast. They come at a cost,...

View Article


Image may be NSFW.
Clik here to view.

SoCraTes Day: Testing the Impossible

I’m back from SoCraTes Day Switzerland where I help a Code&Hack session called “Testing the Impossible”. The session is based on this Mercurial repository de.pdark.testing. Transcript Space Shuttle...

View Article

Image may be NSFW.
Clik here to view.

Replacing Integration With Unit Tests

Google asks to “Just Say No to More End-to-End Tests” – just go and read it. The suggestion in the document is to have a testing pyramid. A few (slow, expensive, dangerous) End-to-End (E2E) tests, more...

View Article

Image may be NSFW.
Clik here to view.

TNBT – Creating Tests from the Debugger

From my series “The Next Best Thing“: Often, you will find yourself in a debugger, trying to follow some insanely complicated code to find the root cause of a bug. I would like to see a button in my...

View Article


Image may be NSFW.
Clik here to view.

Good and Bad Tests

How do you distinguish good from bad tests in your code? Check these criteria. Good tests Nail down expectations Monitor assumptions Help to locate the cause of a failure Document usage patterns Allow...

View Article

Browsing latest articles
Browse All 9 View Live