For example, the literal we use in the test method has wrapped onto two lines because the width of a printed page is narrow.
例如,我们在测试方法中使用的文字封装了两行,因为页面的宽度比较窄。
In the test method, using a combination of written and oral test methods, focusing on the ability of test candidates rather than rote knowledge.
在考试方法上,采用笔试与口试相结合的方法进行考查,着重考查考生的能力而不是知识的死记硬背。
In this example, for clarity, we left some of the validation inside the test method.
在本示例中,为了清晰起见,我们将验证的某些部分放在了测试方法内部。
Luckily, the method under test in this case only had a CC of 2.
幸运的是,这里的测试中的方法有一个值为2的CC。
In this article, we introduce a navigation path-based method to find the target test object.
在本文中,我们介绍了基于路径导航方法,来找到目标测试对象。
Here's the method: Test subjects (in this case, epilepsy patients) were outfitted with brain-computer interfaces, which were implanted in the regions of the brain controlling speech.
实施办法就是在测试对象(此例中为癫痫病人)的大脑里,在控制语言的区域中植入一个人机接口。
With the mechanics out of the way, note that I made a few design decisions in my test method.
有了这些原理之后,要注意,我在测试方法中制订了一些设计决策。
For example, in the test environment, the tester or administrator might enable method-level metrics to show response times within the components of an application (or set of applications) under test.
例如,在测试环境中,测试员或管理员可以启用方法级度量来显示被测试应用程序(或应用程序组)的组件响应时间。
In the specialization object, override the creation method to return a mock object that accommodates your test.
在特殊化对象中,覆盖创建方法以返回为测试提供的模仿对象。
If a method is 10 lines long and 8 lines of the method were exercised in a test run, then the method has a line coverage of 80%.
如果一个方法有10行代码,其中的8行在测试中被执行,那么这个方法的行覆盖率是80%。
Whether or not to accurately test the 18th conditional in a long method is a matter of judgment.
是否真的要测试长方法中的第18个条件,是个判断问题。
Be careful in using precise timings as a gauge for the execution time of a method; the setup and tear down time of a test is included in the overall execution time.
使用精确计时作为方法执行时间的标准时要小心;测试的建立和销毁时间包含在整个执行时间中。
Listing 4 is the method called by the test case in Listing 3.
清单3中测试用例所调用的方法如清单4所示。
In particular, be careful about using the equals method to test for numeric equality.
尤其在使用equals方法来检测数值之间是否相等时要小心。
This is true for mock objects defined in a common setUp() method or within the actual test method.
这对于在公共的setUp()方法中或在实际测试方法内定义的模拟对象来说是正确的。
The fixtures method automatically loads the fixture corresponding to the given model name at the start of each test method in the test case.
在测试用例中的每个测试方法的开头,fixtures方法自动地装载与模型名对应的fixture。
The Context method is akin to the Arrange in our original Unit Test, but here we are concentrating on it in isolation - ensuring that it is all we are going to do.
Context方法类似于原先测试中的Arrange,但这里我们单独考虑它——确保那是我们将要做的所有事情。
In addition, it is desirable to prefix the test method name with "test" so that the test runner will execute all methods automatically.
此外,合适的是测试方法名称都有一个“test ”前缀,这样测试运行人员就可以自动地执行所有的方法。
Once the expectation is set, the test calls the getTitle() method, which should trigger the aspect and result in the expected call to the mock.
设置了期望后,测试调用getTitle()方法,它应当触发方面并产生预期的对mock 的调用。
You must also implement the satisfy() method, which, in all cases, will accept the AST node under test.
您还必须执行 satisfy()方法,它将接收测试下面的AST节点。
I've included a main method in the TwitterSearchConnector class so you can test the class's functionality in stand-alone mode without needing to run Bonita. Listing 5 shows the main method.
我已将main方法包含在twittersearchconnector类中,因此在无需运行Bonita情况下您可以在单机模式中测试此类的功能。
To mock out the Grails validation in a unit test, add the mockForConstraintsTests method, as shown in Listing 6.
要在单元测试中模拟Grails验证,添加mockforconstraintstests方法,如清单6所示。
If there is no entry in log, the code skips the rest of the method because test case execution is clean and there is no information to capture.
如果日志中没有条目,那么代码就会跳过方法的其余部分,因为测试用例的执行是干脆的,并没有得到什么信息。
This test case uses two users to simulate concurrent access in the query table claim method.
这个测试案例使用两个用户来模拟查询表申明方法中的并发存取。
Verification of the system stress test is the reason for this final step in the method.
之所以要执行方法中的这最后一步,是为了对系统压力测试进行核实。
To accomplish this, you can wrap the three lines of code produced by the recorder into a separate method in your test script.
要完成这项操作,可以将记录器生成的三行代码封装到测试脚本的某个单独方法中。
The second method is traceability into test cases, shown in Figure 14.
第二个方法是测试用例中的追踪,如图14所示。
If you had selected additional methods from a larger class, you would see each method appear as a node in the test.
如果你已从更大的类中选择了其它方法,就可能在测试中看到像是节点的方法。
Now you can test it on the server using the same method as in the previous section.
现在,您可以使用上一小节中的方法在服务器上对其进行测试。
Now you can test it on the server using the same method as in the previous section.
现在,您可以使用上一小节中的方法在服务器上对其进行测试。
应用推荐