Listing 10. The viewport test code.
清单10.viewport测试代码。
What if there are tens or hundreds of locators in the test code?
万一这段测试代码里面有几十上百个定位器怎么办?
The test code at the bottom then sets the value and prints out the new value.
底部的测试代码设置值并打印出新值。
The test code at the bottom starts by deleting all the entries from the database.
底部的测试代码先删除数据库中的所有条目。
Listing 6 shows the main parts of the test code I'll use to check out the performance.
清单6显示用于检查性能的测试代码的主要部分。
Look at all of the scaffolding that was necessary to support two actual lines of test code!
看到了吗?这么多代码只是为了支持两行测试代码!
This is probably a bug, either with the build of Chrome used for this test or with the test code.
这可能是一个bug,问题或是出在用于此次测试的Chrome 的构建,或是出在检测代码。
The framework enforces the separation of UI modules from the test code, allowing easy refactoring.
框架实行UImodule和测试代码的分离,从而有利于重构。
Before looking at the test code, you need a better understanding of the Rails user interface layer.
在查看测试代码之前,需要对Rails的用户界面层有更好的理解。
The output of each section of match test code is sorted, then added to the overall suggestion link list.
首先,对匹配测试各部分的输出进行排序,然后将其添加到总建议链接列表。
The performance comparisons use the same test code as earlier articles, a seismic data retrieval service.
性能比较使用与之前文章相同的测试代码,即地震数据查询服务。
Testing the form validation can also be done in the unit test (Listing 19 shows the form validation test code).
表单验证的测试也可以在单元测试中完成(清单19展示了表单验证的测试代码)。
The sample you can download from the JiBX site includes an example based on the Part 2 test code (see Resources).
您可以从JiBX站点下载样本,它包含一个基于第2部分测试代码的示例(请参阅参考资料)。
Developed the test code according to the project specification using the Suggested steps and the JUnit framework.
根据工程规范,使用建议步骤和JUnit框架开发测试代码。
To test code that accesses hardware, you must write a piece of code that responds in a way similar to the hardware.
为了测试访问硬件的代码,必须编写一段按照与硬件相似的方式做出响应的代码。
At the same time, recording all test scenarios can create duplicate test code when you're testing similar scenarios.
同时,在测试与以前类似的场景时,记录所有测试场景会创建重复的测试代码。
The self-test code (the command-line usage) provides a straightforward template for any importing module to follow.
自测代码(命令行用法)为任一导入模块提供了一个可遵循的简单模板。
This can make test writing simpler and less error-prone, and also result in test code that is shorter and more readable.
这会简化测试的编写并减少错误,还会使测试更简短、可读性更好。
More than likely, the test code would have to be reviewed in its entirely to locate the lines that needed to be updated.
更有可能发生的是,这段代码需要逐行检查才能找出那几行需要更新的代码。
Creating the test code using the Selenium IDE may be easy to use initially, but it is difficult to generalize and refactor.
使用SeleniumIDE生成测试代码,这可能在一开始比较容易,但归纳和重构起来就很困难了。
Response time breakdown shows you how much time was spent in each part of the system under test code as the system was exercised.
当这个系统运行时,响应时间细分数据为您显示了被测试系统的每一部分所花费的时间。
But forcing the public API to accommodate factory objects or abstract factories, just because the test code wants it to, is the wrong design.
但强迫公用api适应工厂对象或抽象工厂(只因为测试代码要求它这样)是错误的设计。
It reduces redundant test code and can enforce a standardized mechanism to perform some tasks and keep track of values returned by the API methods.
它减少了冗余测试代码,能够强制使用标准的机制执行任务,并且可以跟踪api方法的返回值。
The performance test code first reads the documents to be used in the test into memory, then runs through a sequence of operations on the documents.
性能测试代码首先将测试中使用到的文档读入到内存中,然后对文档进行一系列的操作。
Because runtime compilation USES profiling data to guide its optimization, the JIT may well optimize the test code differently than it would real code.
因为运行时编译使用概要数据来指导优化,所以JIT对测试代码的优化可能不同于对实际代码的优化。
If you want to work through the examples yourself, you can download the application and the sample test code. Figure 1 shows HTMLDocumentEditor in action.
如果您想自己完成示例,可以下载应用程序和样例测试代码。
In VS2008 for example, we inserted comments into generated unit test code in order to help beginner users to understand the various components of a unit test.
例如在VS 2008中,我们在生成的单元测试代码里加入注释来帮助初学者理解一个单元测试的各个组成部分。
And while most programmers can examine code and test code for bugs, they do not know how to prove that their programs will perform the way they think they will.
尽管大部分程序员能够检查代码并测试代码的bug,但他们并不知道如何证明他们的程序将会按他们所设想的那样去执行。
The test code used to benchmark the speedup provided by the six SPEs available on the PS3 USES the Cell SDK to embed code and to pass data to the SPEs through the EIB.
测试代码对PS 3上的六个SPE提供的加速效果进行基准测试,它使用CellSDK嵌入代码并通过EIB将数据传递给SPE。
Typically, you will use the separation of concerns principle when you plan how you will divide and structure your test code for application-under-test features and behaviors.
通常,在您计划如何为被测试应用的特性和行为进行分离和组织测试代码时,您将会使用关注分离这个基本原理。
应用推荐