The Wordnik team is working on generating libraries for Ruby, ActionScript 3, Android, PHP and JavaScript, which will be open-sourced in the coming weeks
<li>- id: unique id of the test script, displayed in the test report
<li>- name: name of the test suite. Used in test report
<li>- test cases: List of test cases with in each suite. Each test case consists of following properties:
<li>- id: unique with in the test suite. Used for reporting and tracking output data
<li>- name: Name of the test case
<li>- resource id: references the resource id in the resources section
<li>- input: Input is a JSON object with each property in the object map to query, path or post parameters.
For POST data, the name of the property should be supplied as postData. The value for each property can refer
to input file or output from previous test cases or actual values.
<li>- assertions: list of assertions that needs to be evaluated after test case is executed.
Each assertion contains
<li>- actual output, specified with reference to output of the current test case using syntax similar to object graph navigation language
<li>- condition , support values are equal (==), not equal (!=), less than (<), lesser than or equal (<=), greater than (>), greater than or equal (>=)
<li>- expected output. Specified using actual values or values referring previous outputs or input data file
Test data file is documented using a Test Data Object which is generated as part of Java client library code-gen. This
class provides list getters and setters for each model object available in the resource description. It is called "TestData"
and it is available in model package of the java library code generation output.
Chaining results of test cases:
<li>- Reference to data in input file is done with prefix <pre>${input.</pre>, followed by object graph navigation syntax.
Example: to refer a first user object in test data file use the syntax <pre>${input.userList[0]}</pre>
<li>- To refer a individual property of user object use the syntax <pre>${input.userList[0].username}</pre>
<li>- Reference to output of test cases is done using combination test case path and OGNL. Reference to test cases output
is prefixed with <pre>${output.</pre>
<li>- To refer an output of test case 1 in test suite 2, the syntax will be <pre>${output(1.2)}</pre>. Individual attributes can
be accessed using OGNL syntax. Example: <pre>${output(1.1).username}</pre>
#### Reporting Test Results
A Summary will be reported with each test run. For instance:
<pre>
Sample: "Summary --> Total Test Cases: 9 Failed Test Cases: 0"
</pre>
In detail section each test case and its status (passed/failed) are reported. Failures include an exception trace. Test case path is
combination of test suite id and test case id separated by "."