Take a look at the JUnit in a specific project.

xiaoxiao2021-03-06  41

Author: EMU (Huang Xiwei)

Tomorrow's holiday home, today Test Case inside the system with a TESETSUITE to give such a screenshot: This month's unit test is still fruitful. Although some new members of the project group do not develop well in accordance with the specifications, all of the newly added modules have almost all written unit tests. Although there are many red forks inside, it is not afraid, everything is within control. Since I use Strutstestcase, I have a very headache Struts configuration problem now can now find it in a unit test, although two parameters are handled manually. This is my entire project total test kit, put two sub-test kits: import junit.framework. *; Public class oatestsuite extends testcase {public oatestsuite (String s) {super (s);}

Public static test suite () {testsuite suite = new testsuite (); suite.MessageTestSuite.suite ()); suite.addtest (System.testsystemsuite.suite ()); return suite;}} This is a child Test Suite, there is a test kit, and a unit test, pay attention to the difference between the two is different. JBuilder automatically generated the way is wrong when adding a test suite, to handle it: import junit.framework. *; public class testsystemsuite extends Testcase {public testsystemsuite (String s) {super (s);}

public static Test suite () {TestSuite suite = new TestSuite (); suite.addTest (system.dept.TestDeptSuite.suite ()); suite.addTest (system.oa_user.TestUserSuite.suite ()); suite.addTest (system .permission.TestPermissionSuite.suite ()); suite.addTest (system.Role.TestRoleSuite.suite ()); suite.addTest (system.Bulletin.TestBulletinSuite.suite ()); suite.addTestSuite (system.business.TestSystemBusiness. class); suite.addTestSuite (system.dept.TestDeptSuite.class); suite.addTestSuite (system.oa_user.TestUserSuite.class); suite.addTestSuite (system.permission.TestPermissionSuite.class); suite.addTestSuite (system.Role. Testrolesuite.class; Return Suite;}}

Author: EMU (Huang Xiwei)

转载请注明原文地址:https://www.9cbs.com/read-60790.html

New Post(0)