xunit
NetKernel XML/Service Unit Testing Framework
Index > Books > Declarative Development Guide > Reference Library > Accessor Listing > xunit

Rate this page:
Really useful
Satisfactory
Not helpful
Confusing
Incorrect
Unsure
Extra comments:


Module

urn:org:ten60:netkernel:ext:xunit

Definition

Active URI Base

active:xunit

Format

<instr>
  <type>xunit</type>
  <param>
    <nvp>
      <uri>ffcpl:/path/mytestlist.xml</uri>
    </nvp>
  </param>
  <target>var:result</target>
</instr>

Syntax

ArgumentRulesDescription
typeMandatory xunit
paramMandatory a name value pair document with a uri element giving the URI of the unit tests to be run
targetMandatory the result of the tests

The xunit accessor runs a unit test list with the NetKernel Unit Test framework. The unit test engine will execute the tests specified by the URI target contained in an NVP param argument. It will then perform optional assertions on the results. The results of the tests can be returned in either XHTML or XML format using the @output attribute on the testlist.

Note the xunit accessor is designed to execute the interactive XUnit application and requires a Name-Value-Pair param argument with the URI to the test suite.

A guide to using the unit test framework is available here.

TestList Format

A test list has the following form...

<testlist output="html" title="XUnit Self Tests">
<!-- An optional XHTML description -->
  <desc />
<!-- One or more tests or further groups of tests -->
  <test>
    <uri>active:dpml+operand@ffcpl:/mytest.idoc</uri>
    <assert> ...Optional assertions on the results... </assert>
  </test> ...
  <group title="A Test Group">
    <uri>ffcpl:/mytestsuite.xml</uri>
  </group> ...
</testlist>
© 2003-2005, 1060 Research Limited. 1060 registered trademark, NetKernel trademark of 1060 Research Limited.