Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

JUnit + Jtest = Automated Test Case Design and Static Analysis

Jtest, an automated unit testing and static analysis tool, extends JUnit to provide automatic test case generation and static analysis functionality.


advertisement
f you currently use JUnit for Java unit testing, you can extend it to automate test case design and coding standard enforcement with Parasoft Jtest. Jtest is an automated unit testing and static analysis tool that includes and extends JUnit to provide automatic test case generation and automatic checking of over 300 Java coding standards.

Test Case Generation Benefits
By extending JUnit with Jtest, you can automatically generate JUnit-compatible test cases that verify code construction, stability, and—if the class uses Eiffel Software's Design by Contract—functionality. This allows you to generate a foundational test suite you can extend with JUnit test classes.

Jtest's automatic test case generation helps you prevent errors in two main ways:

  1. It enables you to quickly produce all the required test cases for thorough construction testing, which is impractical to achieve manually. Jtest tries to create test cases that execute every possible branch of each method it tests. For example, if the method contains a conditional statement (such as an if block), Jtest will generate test cases that test the true and false outcomes of the if statement.
  2. It enables you to instantly generate and execute test cases as soon as you are done writing or modifying a class. This prompts you to find and fix problems before you (or a team member) unwittingly introduce additional errors by adding code that builds upon or interacts with the problematic code.



Static Analysis Benefits
Jtest's static analysis feature provides additional error-prevention safeguards. During testing, Jtest will statically analyze each class by parsing its Java source code and checking whether it follows a set of over 300 coding guidelines or "rules" designed to identify error-prone code. You can also design and enforce custom coding guidelines as needed. Each time you find an error, you can determine why the error occurred, develop a custom rule that prohibits the cause of this problem, then automatically enforce this rule to ensure that Jtest immediately identifies any repeat offenses.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date