You now have your test class available for execution.
您现在已经拥有了可用于执行的测试类。
Optionally the test class name can be changed.
这个测试类的名称可以更改。
Listing 3 shows the dictionary application's beginning test class.
清单3显示了字典应用程序的开始测试类。
Add the code shown in Listing 6 to the test class.
添加如列表6所示的代码到这个测试类中。
The first option is to move this test class into the integration directory.
第一个选择是将此测试类转移到集成目录中。
Optionally the name of the test class can be changed.
测试类的名称也可以修改。
The lifecycle of a test class is further illustrated in Figure 2.
图2进一步描述了测试类的生命周期。
Now that I have my test class defined I can start developing (and testing) the application.
定义了测试类后,就可以开始开发(并测试)这个应用程序了。
To execute the test class, go to the J2EE perspective, Project Explorer view.
要执行测试类,请转到J2EE透视图中的ProjectExplorer视图。
Finally, the two lines at the bottom allow you to run the tests within this test class by simply running this module.
最后的两行负责在这个测试类内部运行测试,方法是直接运行该模块即可。
The above listing is a test class which performs basic tests on the feedparser module.
上述清单是实现feedparser模块基本测试功能的测试类。
When nose looks inside of a test class, it runs methods matching that same regular expression.
当nose 检查测试类的内部时,它运行与同一正则表达式匹配的方法。
JsfTestCase: This is the base test class for unit tests for Servlet and JSF components in a web application.
AbstractJsfTestCase:这是对web应用的Servlet和JSF组件进行单元测试的基础测试类。
The runner is smart enough to figure out which test class depends on which version of JUnit and invoke it appropriately.
运行程序足够智能,可以分辨出哪个测试类依赖于哪个版本的JUnit,并适当地调用它。
With JSFUnit API, the test class methods can submit data on a form and verify that managed beans are properly updated.
有了JSFUnitAPI,测试类方法可以提交表单数据,并且验证管理的bean是否被正确更新。
Eclipse's JUnit integration can generate the test class automatically, so I can minimize my work by letting the tools do it for me.
集成在Eclipse上的JUnit可以自动生成测试类,因此我让工具为我生成,从而减小我的工作量。
If the test class doesn't run, spend your time getting XPath support working before spending hours on writing code that might not work when it counts.
如果测试类不能运行,那么请在编写代码之前花点时间获得XPath支持,否则编写的代码可能不会正常运行。
Here is the generated test case class for our simple example.
下面是我们的简单示例所生成的测试用例类。
You wouldn't want to test every class for this new behavior.
我们不想对每一个类测试这个新行为。
Now imagine trying to unit test a class that makes an expensive SOAP call.
现在,想像一下对发出开销较高的SOAP调用的类进行单元测试。
Add these lines of code to the test behavior class.
将这些代码添加进测试行为类。
You can test this class by adding a main method.
可以添加一个main方法测试这个类。
Within the UML model create a test package and class.
在uml模型中,创建一个测试包和类。
Now, let's run the test case class on IE, Firefox and Safari browser.
现在,我们将在IE、Firefox和Safari浏览器上运行测试用例类。
Rather than building the history stack directly into the photo gallery, we generated a simple page to test our class.
我们没有直接在相册应用程序中建立历史堆栈,而是用一个简单的页面测试这个类。
This doesn't necessarily mean that you need to test each individual class.
这并不意味着你需要测试每一个类。
Writing a unit test for a Stack class is straightforward.
可以很直观地写出对堆栈类的单元测试。
You also use this class to run test packages.
您也可以用这个类来运行测试包。
Within the UML model, create a test package and class, and include a few attributes or operations.
在uml模型中,创建测试包和类,并且包含一些属性或操作。
Write the unit test before writing code for class it tests.
首先编写单元测试,然后再编写要测试的类代码。
应用推荐