Test Hibernate's JUnit method with MyEclipse to test the reason for always repeating execution

Source: Internet
Author: User

Today, when testing Hibernate's additions and deletions, I encountered a problem: there are four test methods in a test class: Add (), search (),
Update () and delete (), but after clicking on a class such as the update () method, the other three methods will execute, initially suspecting that hibernate
Configuration problem, but found all over and did not find where there is a problem, finally understand, this is myeclipse not eclipse,eclipse click Test Class
method, and myeclipse whether or not the test method in the test class is the final result of all
Test methods are executed: There are two solutions: first, point to open the project, then open the test class, right-click a test method, and then [Run as]-[run Configurations]-[test method to select a test that needs to be tested.]
The second: [Window]-[show view]-[outline]-[on the right side of the window will appear the test class and test method, click on a test method]-[run As]-[junit test] is OK.

This article is from the "Programming Development" blog, be sure to keep this source http://w7984.blog.51cto.com/5147254/1852555

Test Hibernate's JUnit method with MyEclipse to test the reason for always repeating execution

Related Article

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.