Eclipse and Maven are not designed from the ground up to run automated integration tests separately from unit tests. This is a problem because integration tests typically take longer to run, so when coding, especially if doing test-driven development, there is the need to frequently run just the unit test suite from Eclipse. Maven by […]
Posts in category 'unit testing'
Software engineering research and my own experience have taught me the value of code reviews and automated tests, especially automated unit tests written using test-driven development (TDD). In the past my general pattern when doing code reviews has generally been to focus on production code and do a more minimalistic review of the unit test […]
In this section of the Java Unit Testing Tutorial you will write your first unit test and get it to execute successfully. Tutorial Introduction Previous: Initial Setup Determine What to Test Before you can write your first unit test you need some code to test. If you are trying this in your own project, then […]
In this section of the Java Unit Testing Tutorial you will install JUnit, the unit testing framework you will use for unit testing, configure Eclipse to run your project’s tests, and finally configure your project for the unit test code you will write. Previous: Tutorial Introduction Next: Writing Your First Unit Test Install JUnit Follow […]
This tutorial explains how to set up and write automated unit tests in Java using JUnit 4, a widely used java unit testing framework, Eclipse 3, an open source integrated development environment (IDE), and Java SE 5 or later. This tutorial is intended to be an introduction to unit testing aimed at developers who have […]
My previous post on How to Create Maintainable Software talked about the importance of automated testing. Working with automated test suites over the years, I’ve found that creating good tests is a skill that needs to be developed. I’ve seen many cases of unit tests that I’d consider poor or bad due to a number […]