Here is the generated test case class for our simple example.
下面是我们的简单示例所生成的测试用例类。
Now, let's run the test case class on IE, Firefox and Safari browser.
现在,我们将在IE、Firefox和Safari浏览器上运行测试用例类。
So, in other words, to use my strategy, simply write one test case class, and then always deploy to both the client and the server.
所以,换句话说,要使用我的策略,只需编写一个测试案例类,然后总是将其部署到客户机和服务器就可以了。
Note that if you wish, you can run the the test case class which contains a main and invokes the junit junit.swingui.TestRunner.main method.
请注意,如果您愿意,可以运行包含main并调用junit junit .swingui . TestRunner . main方法的测试案例类。
This approach makes testing protected methods much easier because the test case class can now extend the class that contains the protected methods.
这种方法使得测试受保护的方法非常容易,因为测试案例类现在可以扩展包含受保护方法的类了。
In my particular implementation, the EJBServletTestCase test case class has to be in two places -- on the client and server side -- as it is run from two places.
在我具体的实现中,EJBServletTestCase测试案例类必须存在于两个地方 ?在客户机和服务器端上 ?
Put each test case in the same package as the class it's testing to gain access to package and protected members.
将每个测试实例与它要测试的类放在同一个包内,以获得对包成员和保护成员的访问权。
Make an inner class in the parent class, which is a test case.
在父类中建立一个内部类,这个内部类是个测试用例。
The test case creates two class loaders, each with what appears to be the same classpath.
测试用例创建了两个类装入器,每个类装入器使用的类路径看起来相同。
With an acceptance team built of high-value power users, top guns or other subject matter experts, a user acceptance Test case will not require low-level user interface or class details.
有了由超级用户,顶级装备或者其它主要领域专家组成的验收团队,用户验收测试用例将不需要低水平用户界面或者类细节。
Every test case must extend from this class.
每个测试用例都必须是从这个类扩展而来。
In this case, take a look at the test results when searching by ID and when searching by CLASS (Figure 5).
在这个例子中,分别看看通过ID和CLASS进行搜索时的测试结果(图5)。
Listing 2 gives a simple JUnit test case for this class, and Figure 1 shows the results when I run this test in eclipse.
清单2给出了针对这个类的一个简单的JUnit测试用例,图1展示了我在Eclipse中运行这个测试时的结果。
The test case for the Bike class in Listing 3 demonstrates the use of the automatically generated accessor.
清单3中Bike类的测试用例展示了如何使用自动生成的访问器。
In line 14, a test case must have a single string parameter constructor that passes the argument to its parent class (TestCase) for the purpose of displaying the test case name in a log.
在第十四行中,为了在日志中显示这个测试用例的名称,一个测试用例必须有一个可以将自变量传递到它的父类(TestCase)的专门的串参数构造器。
The test case in Listings 2 through 4 produce a NoClassDefFoundError because an implicit load of class B will fail
清单2到清单4的测试用例产生了NoClassDefFoundError,因为类B 的隐式装入会失败
The test data directory hierarchy is rooted in the test class package directory, in our case: org.djna.mailservice.test.
测试数据目录层次结构根植于测试类包目录中,在我们的示例中,该目录为or g . djna . mailservice . test。
At the heart of every jwebunit test case is net.sourceforge.jwebunit.WebTestCase class, which represents a test case.
每个jwebunit测试的核心都是net . sourceforge . jwebunit . webtestcase类,它代表测试用例。
Putting this all together yields a flexible test class that verifies two scenarios: a sunny-day path and an edge case where no definition is provided, as shown in Listing 7.
结果产生一个灵活的文本类,它将检验两种场景:一种是良好的场景,而另一种是没有提供定义的边界用例,如清单7所示。
All you would have to do is to be sure to keep the bookpoolHelper class up to date as you add more test case scripts and cover more application functionality.
所有您必须做的就是,在您增加更多的测试脚本和覆盖更多的程序功能时,确保更新bookpoolhelper类。
For each test case. basically you need to extend your test class from TestCase.
对于每个案例来说,您都需要从TestCase扩展您的测试类。
Without a universal test case, developers tend to test only the class they have modified.
没有一个通用的测试环境的话,开发者将只能测试他们修改过的类。
TestCaller is templatized with this class and, as in the case of TestRunner, you make a call to the run method for test execution.
用这个类对TestCaller 进行模板化,与使用TestRunner 时一样,通过调用run方法执行测试。
On the basis of the above technique and method, a class state test model is presented. Case study and experimental results show that the model can achieve better class state tests.
基于上述技术和方法,提出一种类状态测试模型,实例分析和实验结果表明,该模型能较好地实现类状态测试。
On the basis of the above technique and method, a class state test model is presented. Case study and experimental results show that the model can achieve better class state tests.
基于上述技术和方法,提出一种类状态测试模型,实例分析和实验结果表明,该模型能较好地实现类状态测试。
应用推荐