测试断言结果由构件类型中的条目列出。
The test assertion results are listed by entry within an artifact type.
最后,不变条件测试断言永远不变的条件。
Finally, invariant tests assert conditions that never change.
下表包含了对这个测试断言中主要组件的描述。
The following table contains a description of the primary components of this test assertion.
对于本例,测试断言标识符是WSI2406。
下图包含某个测试断言的HTMLrendering。
The following figure contains an HTML rendering of a single test assertion.
分析器的输入包括测试断言文档的位置和对Web服务构件的引用。
The input for the analyzer includes the location of the test assertion document and references to the Web service artifacts.
这段代码运行的时间十分合理,但是几个测试断言都失败了。
This code runs in a respectable time, but a couple of the test assertions fail.
最适合将测试断言作为需求的项目是应用程序的最终用户自己掌握技术的项目。
Projects that are best suited for test assertions as requirements are those where the end users of the application are themselves technical.
例如,WSDL文档中绑定元素的测试断言(条目)将出现在描述构件类型中。
For example, the test assertions for a binding element in a WSDL document (the entry) would appear within the description artifact type.
例如,使用测试断言来巩固需求的理想情形是开发由另一个应用程序调用的组件。
For example, an ideal situation for using test assertions to solidify requirements is the development of a component that is called by another application.
已失败的测试断言结果由条目(例如WSDL绑定元素、消息日志条目id等等)列出。
The detailed test assertion results are listed by entry (for example, WSDL binding element, message log entry ID, etc.).
测试断言是基本概要(BasicProfile)中一个或多个要求的可测试表达式。
A test assertion is a testable expression of one or more requirements in the Basic Profile.
测试断言,网络客户端只被调用了一次,第一次使用之后网络stub就简单地抛出错误。
This test asserts that the network client is only used once by simply throwing an error from the network stub after the first use of it.
如果整个摘要结果失败,您就应该仔细分析失败的测试断言结果以判断哪一个测试断言失败。
If overall summary result is failed, then you should look through the detailed test assertion results to determine which test assertions failed.
每个测试断言都有一个惟一的标识符,并且包含需要用于理解分析器将如何处理该断言的所有信息。
Each test assertion has a unique identifier and contains all of the information that is needed to understand how the analyzer will process the assertion.
事实上,如果客户没有掌握技术,仅使用测试断言可能很快变成反模式,在这种情况下,可行的测试用例对最终用户几乎毫无意义。
In fact, if the customer is not technical, using test assertions alone can quickly turn into an anti-pattern where test case green lights have little meaning to the end user.
回顾测试断言描述和相关的概要要求将有助于您理解需要更改什么以使您的Web服务符合基本概要(BasicProfile)。
Reviewing the test assertion description and the associated profile requirements will help you understand what you need to change to make your Web service conform to the Basic Profile.
例如,一个较好的测试断言为JUnit测试,即当且仅当Web服务返回的SOAP信封与预定义的XML文档完全相同时,返回true。
For instance, a good test assertion is a JUnit test that returns true if and only if the SOAP envelope returned by a Web service is identical to a pre-defined XML document.
测试断言文档中列出了所有的测试断言(请参阅参考资料),测试断言文档是一个XML文档,其内容是按照构件类型(发现、描述和消息)划分的。
All of the test assertions are listed in a test assertion document (see Resources), which is an XML document whose contents are segmented by artifact type (discovery, description, and messages).
测试断言可以有五种可能的结果中的某一种:已传送(passed)、已失败(failed)、警告(warning)、notApplicable或missingInput。
A test assertion may have one of five possible results: passed, failed, warning, notApplicable, or missingInput.
断言在测试和调试期间非常有用。
我们可以在这个方法中附加一些断言来测试其他的属性。
We can add additional assertions to this method to test additional properties.
这个测试用例遇到断言的地方会失败,因为结果页面中不包含带有这个文本的链接。
This test case will fail at assertion because the results page contains no link with this text.
有时,发生在单元测试中的错误不是由断言抛出的。
Sometimes errors occur in unit tests that aren't thrown by assertions.
既然已经建立了主题模型检验,就可以使用断言实际测试上面的检验了。
Now that we have the subject model validation in place, we can actually test the above validation using an assertion.
这些本地变量使我们能够在测试的最后执行断言。
These local variables give us something to perform assertions on at the end of the test.
要进一步细化单元测试,您可以断言验证会因为特定字段上的特定约束而失败,如清单8所示。
To refine your unit test further, you can assert that the validation failed for a specific constraint on a specific field, as shown in Listing 8.
执行与测试用例相关的断言。
现在可以使用断言测试与SUBJECTS表相关联的模型。
We can now utilize assertions to test models associated with our SUBJECTS table.
集成测试还需要更复杂的设置和断言,这使它们比分别测试单独的方面更难编写。
Integration tests also require more complicated set up and assertions. This makes them harder to write than tests that isolate a single aspect.
应用推荐