Home » Tag Archives: Testing (page 23)

Tag Archives: Testing

Moving Beyond Core Hamcrest in JUnit

hamcrest-logo

In the post Improving On assertEquals with JUnit and Hamcrest I introduced use of Hamcrest with JUnit. I then looked at JUnit’s Built-in Hamcrest Core Matcher Support. In this post, I look at how to apply Hamcrest’s non-core matchers with JUnit. These non-core matchers are NOT included with JUnit by default, but are available by including a Hamcrest JAR in ...

Read More »

Testing Abstract Classes and Template Method Pattern

java-interview-questions-answers

From wikipedia “A template method defines the program skeleton of an algorithm. One or more of the algorithm steps can be overridden by subclasses to allow differing behaviors while ensuring that the overarching algorithm is still followed”. Typically this pattern is composed by two or more classes, one that is an abstract class providing template methods (non-abstract) that have calls ...

Read More »

Java EE 6 Testing Part I – EJB 3.1 Embeddable API

java-logo

One of the most common requests we hear from Enterprise JavaBeans developers is for improved unit/integration testing support. EJB 3.1 Specification introduced the EJB 3.1 Embeddable API for executing EJB components within a Java SE environment. Unlike traditional Java EE server-based execution, embeddable usage allows client code and its corresponding enterprise beans to run within the same JVM and class ...

Read More »

JUnit’s Built-in Hamcrest Core Matcher Support

junit-logo

In the post Improving On assertEquals with JUnit and Hamcrest, I briefly discussed Hamcrest “core” matchers being “baked in” with modern versions of JUnit. In that post, I focused particularly on use of JUnit’s assertThat(T, Matcher) static method coupled with the Hamcrest core is() matcher that is automatically included in later versions of JUnit. In this post, I look at ...

Read More »

NetBeans 7.2 Introduces TestNG

netbeans-logo

One of the advantages of code generation is the ability to see how a specific language feature or framework is used. As I discussed in the post NetBeans 7.2 beta: Faster and More Helpful, NetBeans 7.2 beta provides TestNG integration. I did not elaborate further in that post other than a single reference to that feature because I wanted to ...

Read More »

ScaTDD: Casting an eye over three major Test frameworks in Scala

specs2-logo

Testing has traditionally been the gateway process for Scala development at a number of Java shops looking to evolve their tech stack with minimal disruption or committment. This posts hopes to cover three of the main testing frameworks in the Scala landscape, ( Specs2, Scalatest and Scalacheck) with an example of the classic FizzBuzz test, for how they can be ...

Read More »

Spring Testing Support with TestNG

spring-interview-questions-answers

TestNG is a test framework which is designed to cover all categories of tests: unit, functional, end-to-end, integration, (etc). It includes a lot of features such as flexible test configuration, support for data-driven testing (with @DataProvider), powerful execution model (no more TestSuite) (etc). Spring testing support covers very useful and important features for unit and integration testing of spring based ...

Read More »

The pursuit of protection: How much testing is “enough”?

agile-logo

I’m definitely not a testing expert. I’m a manager who wants to know when the software that we are building is finished, safe and ready to ship. Large-scale enterprise systems – the kinds of systems that I work on – are essentially hard to test. They have lots of rules and exceptions and lots of interfaces and lots of customization ...

Read More »

Easy Unit and Integration Code Coverage

sonar-logo

This example shows how to generate coverage for unit and integration tests using Maven and Sonar. It uses very simple techniques and should only take 10-15 minutes to get running in any existing Maven build. It can be used across unit, integration, ATDD or any other kind of test suite. The coverage results are shown in Sonar. Whats Coming? My ...

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