Use GitHub for unit testing in eclipse

Source: Internet
Author: User

Time allocation is to find information 60%, hands-on practice 40%. Because before has not much study hard, led to see the use of Gunit for unit testing when it feels like to see a line of symbols as at a loss, fortunately, search engine is very powerful, find the middle of the information to find a ready-made fool-style tutorial, so it is not so difficult to do it. But after the finished still did not learn how many things, missing is too many.

The first step is to register your GitHub account on the GitHub website.

The second step, in eclipse with JUNIT4 unit test, first create a new project Junit-test, and then write a calculate class, this is a can implement subtraction calculator class, there are some bugs in the class.

Then bring the JUNIT4 Unit test package into this project, right-click on the item and tap Properties. In the pop-up Properties window, first select Javabuildpath on the left, then select the libraries tag on the right, then on the far right click on the add Library ... button and then select Junit4 in the new pop-up dialog box and click OK, just fine.

Then in Eclipse's Packageexclope, right-click on the Class pop-up menu, select "New,ajunit Test", make a selection in the popup dialog and click Next, then modify the test code, a bit time-consuming. Finally, test the code. Step three, upload the code to GitHub,

Use GitHub for unit testing in eclipse

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.