Creating a unit test involves these steps.
创建单元测试涉及到以下步骤。
Figure 1 shows the Unit Test feature architecture.
图1展示了Unit Test特性架构。
The developers drafted a unit test specification for each test.
开发人员为每一个测试起草一个单元测试说明。
Make the proper investment in a unit test, and it pays off later.
在单元测试上做适当的投入,随后将得到回报。
Listing 15: Simple Wicket unit test using JUnit and WicketTester.
清单15:使用JUnit和WicketTester的简单Wicket单元测试。
The listing shows a utility class that gets used by the unit test.
这个清单给出单元测试使用的实用程序类。
Using unit test methods to test every getter method is recommended.
推荐使用单元测试方法来测试每个getter方法。
It also provides a comprehensive way to unit test the pages developed.
它还提供了一种十分全面的方式来对所开发的页面进行单元测试。
Use cases would typically capture 10 to 20 days of development and unit test.
用例典型的获取10到20天的开发和单元测试。
It also generates a special class that can be used to unit test the objects created.
它还生成一个特殊的类,这个类可用于对创建的对象进行单元测试。
You ran your unit test -- many times, perhaps -- and it worked perfectly every time.
您运行单元测试 --也许很多次 --并且它每次都运行得很好。
Only a small portion of the actual use case serves as direct input to a unit test case.
只有一少部分地实际用例被直接输入道单元测试用例中。
In these cases, either the unit test or the code to be tested is most likely incorrect.
如果是这样,不是单元测试有问题,就是被测试的代码不正确。
If there is a new configuration option added, there should be a unit test for that option.
如果添加了新的配置选项,那么就应该添加针对该选项的单元测试。
The unit test scripts were configuration-managed so that changes to them could be tracked.
单元测试脚本是可配置管理的,以便对测试脚本的变更可以被跟踪。
In Part 2, you will see how to run these unit test cases in a continuous integration server.
在第2部分中,您将看到如何在持续集成服务器中运行这些单元测试用例。
If any type of exception is thrown in a unit test, the DOH declares the entire test as failed.
如果在一个单元测试中有任何类型的异常被抛出,DOH就会宣布整个测试失败。
Developers might use one or more of their own sandbox portals or portal unit test environments.
开发人员可能会使用自己的沙箱门户(也称门户单元测试环境)中的一个或多个。
To run this unit test, create a run configuration for the unit test class as a test: : unit type.
要运行这个单元测试,应该为单元测试类创建一个Test:Unit类型的Run配置。
NOTE: We strongly recommend that you create a unit test for your unit test component (see figure 1).
注意:在此强烈建议为您的单元测试组件(见图1)创建一个单元测试。
Nevertheless, test-driven portal application development requires broadening the unit test approach.
然而,测试驱动的门户应用程序开发需要拓展单元测试方法。
In an Agile CM environment, a broken unit test is treated with the same seriousness as a broken build.
在敏捷配置管理环境中,损坏的单元测试与损坏的构建严重程度是一样的。
Afterwards, you can also visually unit test and debug your entire application or individual parts of it.
此后,还可以进行可视化的单元测试以及调试整个应用程序或者其中的单个部分。
As a result, developers can focus on the business logic, and unit test their POJOs without the framework.
因此,开发者可以利用POJO开发业务逻辑和进行单元测试而不必考虑框架。
With this knowledge in mind we will start to put the pieces together to create our BDD Unit Test Template.
有了这些知识,我们可以把那些零散的东西放到一起,创建我们的BDD单元测试模板。
In other words, the entire unit test library I create for an application becomes part of my build process.
换句话说,我为应用程序创建的整个单元测试库都成为构建流程的一部分。
To enforce consistent detail in the unit test specifications, we included them in the peer review process.
为了在单元测试规范中强制一致的详细程度,我们将他们包含在同级评审过程中。
Listing 16 shows a unit test to test this service, which was essential to developing the example application.
清单16给出用于测试这个服务的单元测试,这对于开发示例应用程序是必需的。
As you change code, unit test, and perform UAT, you should identify bottlenecks and implement changes as needed.
当您改变代码、单元测试并执行UAT时,应该识别瓶颈并根据需要进行改进。
From a parameterized unit test, it automatically produces a traditional unit test suite with high code coverage.
它可以从一个参数化的单元测试中自动生成一个传统的单元测试集,而且有很好的代码覆盖率。
应用推荐