Listing Details| ID: | 115 |
| Title: | JUnit |
| Pagerank: | 6 |
| Short Description: | 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 |
| Link Owner: | |
| Date Added: | November 30, 2009 08:48:06 PM |
| Number Hits: | 6 |
| URL: | http://www.junit.org/ |