Upload
augustine-grant
View
216
Download
1
Embed Size (px)
Citation preview
Compliance Test Language (CTL)
Chuck Morris
Northrop Grumman
CTL – Test Structure
<test name="QName"><param name="string">Param description</param>*<context>Expected context description</context><assertion>Assertion statement</assertion><comments>string</comments>*<link href="url">Spec Title and section #</link>*<code>
<instruction>*<xsl:if test="XPath-expr">
<fail/></xsl:if>
</code></test>
Metadata
XSL/CTLInstructions
CTL – Instructions
XSL Instructions: Template-level XSL instructions are supported Includes instructions for decisions, looping, variables, etc.
CTL Instructions: Request: Submit a GET or POST HTTP request Form: Ask for user input using an XHTML form Fail: Used to indicate a test failure Call-test: Execute a sub-test Call-function: Execute a java or XSL function Message: Log a message to the user
CTL – Extensibility
Custom Parsers Convert web service response from binary to XML Written in Java Example: ImageParser
Custom Functions May be used in XPath expressions or called with a call-
function tag May be written in Java or XSL Many existing Java functions can be used Java functions can accept and return built-in Java types
and W3C standard DOM XML nodes
CTL – Test Suites
Just one starting test per suite<suite name="QName">
<title>string</title><description>string</description><starting-test>QName</starting-test>
</suite> Tests calls subtests, resulting in a test hierarchy The test hierarchy is dynamic
Tests that are not applicable to the implementation being tested are not executed
Tests may be called multiple times, from several parent tests, with different parameters
If a subtest fails, its parent test fails