Use tools such as JUnit to record unit test procedures

Source: Internet
Author: User

By making a network query, it takes 6 hours to finally test JUnit and write the code in GitHub. The former is a smooth operation, the latter a series of problems arose.

First talk about the process: 1. Download the egit and load eclipse, then create the Java project to be tested, and then right-click Properties->java build Path->libraries->add Library ... Check junit4-> OK

2. In Eclipse's Package Explorer, right-click on the pop-up menu and select "new-> junit test Case" to generate the JUnit testing framework.

3. In the Pop-up dialog box, make the choice you want.

4. Modify the code in the new class that is automatically generated by the system, right-click after the modification is completed, and selectRun as-> JUnit test for testing.

The above is a smooth operation, and registering to create GitHub is smooth, and time is spent primarily on importing code into GitHub. The main errors are: Author name in the choice to write is username or enter GitHub after the name is not clear, but because behind the unknown cause of the error in the re-examination several times after the temporary skip this error; The last error is: The following statement appears: "Cannot get Remote repository refs. Https://github.com/Y540570232/Junit_test.git:cannot Open Git-upload-pack ", and re-do a few times after the upload has not been successful, in the end Baidu to the solution:, Although I do not understand what the meaning, but according to what he said to solve the existing problems, upload succeeded.

Using tools such as JUnit to record unit test procedures

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.