User: Password:
   Keep me logged in.
Register  |  I forgot my password

Login  |  Register

Efficient Java Tools  - Listing Details
Statisticsw
  • Active Links: 58
  • Pending Links: 1
  • Todays Links: 0
  • Active Articles: 6
  • Pending Articles: 1
  • Todays Articles: 0
  • Total Categories: 33
  • Sub Categories: 20

ID:115
Title:JUnit
Pagerank:6
Short Description:
Listing Thumbnail

This site is dedicated to software developers and testers using the JUnit testing framework. In addition to the latest news and download links for JUnit, you can find answers to questions about automated testing, tools and extensions for JUnit, and articles on Test Driven Development and other testing topics. Our goal is to serve you. We've redesigned the site to better meet this goal.

Description:

Features are:

The Rule annotation allows you to annotate a public field in your test class, which is of type MethodRule. This binding will intercept test method calls like an AOP framework would do and redefine the execution, skip it, or do anything else.

In example, suppose you want to run some concurrency test: you may need to execute your test method on 15 threads each starting at the same time, and then wait for all threads to finish. For those knowing TestNG, this is equivalent to the attribute parallel of @Test.

One of the benefits of JUnit Theories is that they decouple test inputs (data points) from test implementation (Theories). However, this benefit comes at a price: since data points may be reused and modified across several Theories, the way in which one defines mutable data points can cause surprising unexpected behavior. Inline assertions are powerful technique for inspecting how your system is being tested. Beyond simple test coverage, they allow you quickly check different input values and states while never leaving your editor.

This article provides examples and Eclipse code templates to help you adopt this valuable practice.

Besides explaining basic usage, the 3.x Howto explains the tricky aspects of 3.x, such as organizing suites and making test classes testrunner-friendly. Besides explaining basic usage, the 4.x Howto covers good test design and the distinction between JUnit failures and errors. With the help of T2 utility we can do automated testing with JUnit (yes!). T2 itself is a powerful automated testing utility for Java. It's free (GPL). Using it is quite easy. It can be used as simply as a library from a JUnit test Everyone wants to reuse their test code. Reusing test code for functional tests is harder, as tests navigate through many pages in an application. The @Rule annotation allows you to annotate a public field in your test class, which is of type MethodRule. This binding will intercept test method calls like an AOP framework would do and redefine the execution, skip it, or do anything else. In example, suppose you want to run some concurrency test: you may need to execute your test method on 15 threads each starting at the same time, and then wait for all threads to finish. For those knowing TestNG, this is equivalent to the attribute parallel of @Test.

Mistletoe is a JUnit extension intended for integration testing. In technical terms, it is a JUnit test suite runner presenting the test results via HTTP as a Web page. 

Mistletoe, when incorporated within an application, will help diagnose integration issues. For example, an application that runs perfectly in the developer's environment may not run properly in the production environment due to configuration errors and connectivity issues. Instead of perusing log files, or looking at stack traces, mistletoe will run a user-specified series of tests and present the results in the form of a Web page served by the application itself. Since the tests are run within the context of the deployed application, given an appropriate test suite, you can home in on integration problems quickly and conveniently.

Category:Testing: Unit Testing
Link Owner:
Date Added:November 30, 2009 08:48:06 PM
Number Hits:14
URL:    http://www.junit.org/
Ratings
You must be logged in to leave a rating.
Average rating: (0 votes)
Reviews

No Reviews Yet.


You must be logged in to leave a Comment.
 
Bookmark Me
Latest articles
Java Licensing with Agilis
Agilis provides secure, flexible Java protection solutions to software vendors worldwide. Capabilities include Internet-based product activation on connected and disconnected systems, intranet or Internet-based floating licensing, node-locked licensing, named-user licensing, feature configuration, custom licensing, server licensing, trial licensing, subscription licensing, usage-based licensing, licensing via resellers or OEMs, revocable licensing, license reporting, user compliance management, backoffice integration and more.

FireStorm/DAO: What is DAO Design Pattern?
The Data Access Object (DAO) design pattern provides a technique for separating object persistence and data access logic from any particular persistence mechanism or API. There are clear benefits to this approach from an architectural perspective.

CA Plex: what is it?
Today’s business climate requires organizations to have business applications that help improve customer service, reduce costs, increase profits, get to market faster and respond more rapidly to competitive challenges. CA Plex provides a single, integrated environment that enables both traditional and SOA-based solutions for development. CA Plex uses building blocks known as patterns to help your development teams create and maintain large-scale business applications for multiple platforms — Windows/.NET, Java/J2EE or the IBM Power Systems/IBM i.

JCover Code Coverage: important to understand!
Why is coverage analysis important? Coverage analysis has the following benefits: * We can determine if our test suite is adequate. A test suite that achieves 65% statement coverage is hardly adequate. We cannot be confident of our product's quality with this much coverage. This figure prompts us to enhance the test suite. * We can identify redundant test cases that are not useful either in increasing code coverage or in finding new bugs. Fine tuning a test suite has immense benefits during regression testing. * We can find out if there are regions of code that cannot be exercised at all, and hence can be cleaned up. We sometimes find that an application has code to support a feature that was discontinued in an earlier release of the product! Although test cases are normally generated from the specification, coverage analysis helps us in identifying areas that require further test focus.

Codign CoView: JUnit Test Generation
Unit testing and coding go together like peanut butter and jelly. Each good by themself, but together? Now that's a good sandwich! Now you can benefit by easily creating the right JUnit test the first time. CoView provides a solution that makes sense, is unique and completely understandable. And it only takes 3 steps to have a complete set of JUnit tests for each of your classes.