Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 5.3 KB

Using-Tcases-API.md

File metadata and controls

70 lines (51 loc) · 5.3 KB

Using The Tcases API

Tcases In Code

The Tcases command line interface is implemented using a Java API. You can use the same API to do all of the same things in your own Java program, including creating a system input definition, generating test cases, and reading or writing Tcases documents.

Builders

The tcases-lib JAR contains all of the core classes needed to create a system input definition. You can use methods from the SystemInputs class for a fluent interface to the various builder classes needed to construct a complete SystemInputDef. For a complete example, see the SystemInputBuilderTest.

Test Cases

The tcases-lib JAR all contains all of the interfaces needed to generate a system test definition that contains all of the test cases for a system input definition.

To generate test cases, use the Tcases class. Tcases defines several variations on the getTests method perform this task. The primary input parameter is the SystemInputDef but additional parameters define optional helper objects. For these, you can use a null value to apply a default value. For an example, see the SystemInputBuilderTest.

For example, Tcases:getTests accepts a generator definition object to define the required coverage for test cases. You can use methods from the Generators class for a fluent interface to the various builder classes needed to construct a generator definition. For a complete example, see the GeneratorsTest.

To run the Tcases Reducer, use the Reducer class. Reducer defines several variations on the reduce method to perform this task.

Documents

The tcases-io JAR contains classes needed to handle the following types of Tcases documents.