Rerunning the test fails again, but this time because of the exception being thrown.
重新运行这些测试仍然失败,但是这一次是因为抛出了异常。
One of the cornerstones of XP is that each project should have a comprehensive set of automated tests that test everything that could possibly go wrong (with the possible exception of ACTS of nature).
XP的基本要求之一是每个项目应该有一套综合的自动测试,测试可能出错(带有自然反应的可能异常)的任何东西。
If any type of exception is thrown in a unit test, the DOH declares the entire test as failed.
如果在一个单元测试中有任何类型的异常被抛出,DOH就会宣布整个测试失败。
With the exception of scientific computing and the occasional timing test or benchmark, it just doesn't come up.
除了科学计算和偶尔的计时测试或基准测试程序,其它情况下几乎都用不着它。
This means that you will pass the test only if that particular type of exception is raised in the designated line.
这意味着只有在指定行中抛出特定类型的异常的时候,您才会通过测试。
An unhandled exception on any thread will crash the entire test run, and as mentioned before, integration tests require multi-threading.
任何线程的未处理异常都会破坏整个测试的运行,而前面提到的集成测试却需要使用多线程。
If no exception is thrown, the test passes.
若未抛出任何异常,测试即通过。
Throwing an exception not only unwinds the test but also signals an error.
抛出异常不仅要展开测试,还将报告错误。
Every test framework needs to supply you with a method to check the outcome of a unit test and the DOH is no exception.
每个测试框架都要为开发人员提供检查单元测试结果的方法,DOH也不例外。
This is important to know if you are expecting your test to throw an exception.
在预料到测试会抛出异常时,这一点很重要。
The old test tried printing the object without the setup, caught the exception if it occurred, then printed with the setup if needed (and gave a message about what happened).
老的测试会试图不借助设置去打印对象,如果发生异常则捕获之,然后如果需要的话借助设置再去打印(并给出一个关于所发生事情的消息)。
Figure 3: Exception path for the Systems Integration test.
图3:系统集成测试的例外路径。
For example, they can help you test your custom Exception class, verify that your datatype's Equals & GetHashCode are consistent, and check IList invariants.
例如,它可以帮你测试自定义的异常类,验证自定义类型的Equals和GetHashCode方法是否一致,以及检查IList的不变性。
All seems well until I try running the test, whereupon I get the exception in Listing 2.
似乎一切正常,但在运行测试时出现了如清单2所示的异常。
The exception is thrown by the explicit cast because the test case is trying to convert something of type String to an Integer.
这个异常是由显式类型转换抛出的,因为测试用例试图把类型为String 的东西转换成Integer。
A test then throws whatever exception the particular TestContext defines.
然后测试抛出TestContext定义的所有异常。
While the TOEFL can be taken online or with a pencil and paper, the IELTS exam can only be completed on paper, with the exception of a small number of computer-based test centers.
托福可以机考和笔考,雅思只能笔考,只有例外的少数几个机考中心。
As written, so long as no exception is generated by the code and the ActionForm successfully validates, Struts assumes things worked just fine, and so will the test case.
正如所写的那样,只要代码没有生成异常,ActionForm成功验证,Struts就假定事情工作良好,测试用例也是一样。
If the exception isn't thrown (or a different exception is thrown), the test will fail.
如果该异常没有抛出(或者抛出了一个不同的异常),那么测试就将失败。
In this case, rather than an exception being thrown, the "test" value isn't being found; null is being popped.
在这种情况下,不是抛出一个异常,而是没有发现“test ”值;实际弹出的是null。
At least after I installed that, I got past an import exception in Twisted's test_ssl.py (but only so far as what appears to be an error in the test script).
我将其安装完之后,看到了在Twisted的test_ssl . py中定义的一个导入异常(不过看起来是测试脚本中的错误)。
Here, this implementation is trivial, since any user id and password will be accepted (with the single exception of the password "invalid", provided for test purposes).
在此,这个实现是不重要的,因为任何用户标识和密码都将被接受(仅有的一个例外是“invalid”密码,这是为测试目的提供的)。
The limitation with the log file is that at the end of test suite you are not able to determine which exception belongs to which test case.
日志文件的缺陷在于,在测试套件的结尾您无法去决定什么例外与什么测试用例相对应。
We'll add some simple logic to make it easier to test the exception behavior.
我们将会添加一些简单的逻辑来简化异常的测试。
Of course, there are deviations to this path that can be caused, for example, by the test finding a defect and executing an exception path.
当然,对于此途径存在着由,例如,寻找缺陷并执行异常路径的测试引起的偏差。
As discussed earlier in the testing of referenced attachments, check the port number of your runtime for each test case if you receive an exception stating that the endpoint URL is incorrect.
根据之前讨论的引用附件测试,如果收到表示终端url不正确的异常,检查每个测试用例运行时的端口号。
Contrary to a lot of other testing frameworks, Google's test framework has built-in assertions that are deployable in software where exception handling is disabled (typically for performance reasons).
与其他许多测试框架相反,可以把Google测试框架内置的断言部署在禁用了异常处理(通常由于性能原因)的软件中。
By way of exception the test of the control-unit, the volume regulator can be adjusted.
例外的是控制元件测试。在此过程中仍可以操作音量调节器。
Everyone passed the math test, with the exception of Tom.
除了汤姆之外,所有人都通过了数学考试。
Everyone passed the math test, with the exception of Tom.
除了汤姆之外,所有人都通过了数学考试。
应用推荐