5
Compliance Test Language (CTL) Chuck Morris Northrop Grumman

Compliance Test Language (CTL) Chuck Morris Northrop Grumman

Embed Size (px)

Citation preview

Page 1: Compliance Test Language (CTL) Chuck Morris Northrop Grumman

Compliance Test Language (CTL)

Chuck Morris

Northrop Grumman

Page 2: 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

Page 3: Compliance Test Language (CTL) Chuck Morris Northrop Grumman

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

Page 4: Compliance Test Language (CTL) Chuck Morris Northrop Grumman

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

Page 5: Compliance Test Language (CTL) Chuck Morris Northrop Grumman

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