JUnit 4 tutorials (JUnit 4 tutorial)

Source: Internet
Author: User

This is a comprehensive and new JUnit 4 practical tutorial, translated from: http://www.javatutorials.co.in/junit-4/, hope to help everyone!

The following is the content settings of this tutorial. You can click the following title to read the content:

  • JUnit testing framework

JUnit testing framework is the most popular Java unit testing framework. JUnit is used to develop unit tests for Java classes.

  • JUnit eclipse tutorial

This section describes the features and usage of JUnit in Eclipse IDE. Sample Code for writing and running unit test in Eclipse IDE.

  • JUnit 4 Annotation

The junit4 annotation provides basic functions for writing unit tests. This chapter describes @ beforeclass, @ afterclass, @ before, @ After and @ test annotations.

  • JUnit 4 assert Methods)

The assertion method checks the actual values and expected values obtained from the test.

  • JUnit 4 parametric test

Parameterization testing allows you to test methods in Java classes using parameters of different ranges.

  • JUnit 4 Test Suite)

Use the test suite class to run various test classes at the same time.

  • JUnit 4 ignore test (ignore Test)

Ignore tests are used to disable some or all of the test methods in the unit test class.

  • JUnit 4 timeout test (timeout Test)

The timeout test is used to detect the execution time of some or all methods in the unit test class.




Certificate ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The source of this article is http://blog.csdn.net/luanlouis. For more information, see. Thank you!


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.