Skip to content

Commit

Permalink
Release 4.0.1 (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrykimbrough authored Jan 18, 2023
1 parent 39bc7ae commit c35f52e
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 23 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
# Tcases: A Model-Based Test Case Generator #

[![Maven](https://img.shields.io/badge/maven-4.0.0-green.svg)](https://search.maven.org/search?q=tcases-shell)
[![Javadoc](https://img.shields.io/badge/javadoc-4.0.0-green.svg)](https://javadoc.io/doc/org.cornutum.tcases/tcases-shell)
[![Maven](https://img.shields.io/badge/maven-4.0.1-green.svg)](https://search.maven.org/search?q=tcases-shell)
[![Javadoc](https://img.shields.io/badge/javadoc-4.0.1-green.svg)](https://javadoc.io/doc/org.cornutum.tcases/tcases-shell)

## What's New? ##
* The latest version ([Tcases 4.0.0](ReleaseNotes.md#400)) is now available at the Maven Central Repository.
* The latest version ([Tcases 4.0.1](ReleaseNotes.md#401)) is now available at the Maven Central Repository.
See [*How To Download Tcases*](HowToDownload.md) for download instructions.

* With Tcases 4.0.0, JSON becomes the preferred format for all Tcases documents. Also new in this release:
[schema-based value definitions](./Tcases-Guide.md#defining-value-schemas) and the
[`tcases-copy`](./Tcases-Guide.md#copying-a-tcases-project) command.
* Tcases 4.0.1 provides several improvements, including a new guide to [using the Tcases API](Using-Tcases-API.md).
See the [release notes](ReleaseNotes.md#401) for details.

* Having trouble with Tcases? Check out [these tips](./Troubleshooting-FAQs.md).

Expand Down Expand Up @@ -67,6 +66,7 @@ definition into a Java source code template for a JUnit or TestNG test class.
* **Helpful Guides**
* [How To Download Using Maven](HowToDownload.md)
* [How To Setup a Tcases Web Service](./Tcases-Web-Service.md)
* [Using The Tcases API](./Using-Tcases-API.md)
* [Troubleshooting FAQ](./Troubleshooting-FAQs.md#troubleshooting-faqs)
* [Release Notes](ReleaseNotes.md)

Expand Down
31 changes: 31 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
# Release Notes #

## 4.0.1 ##

This release provides the following improvements.

* **Using the Tcases API to generate tests**

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. For details, see [_Using The Tcases API_](./Using-Tcases-API.md).

Thanks to [grzegorzgrzegorz](https://github.com/grzegorzgrzegorz) for inspiring improvements to make this API easier to use.

* **`Tcases::getTests`: Resolve schemas by default**

The [`Tcases::getTests`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/Tcases.html#getTests-org.cornutum.tcases.SystemInputDef-org.cornutum.tcases.generator.IGeneratorSet-org.cornutum.tcases.resolve.TestCaseResolverFactory-org.cornutum.tcases.SystemTestDef-org.cornutum.tcases.generator.GeneratorOptions-)
method is the basic interface for generating test cases. It includes an optional
[`TestCaseResolverFactory`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/resolve/TestCaseResolverFactory.html)
parameter that defines how test case values are resolved. In this release, the default `TestCaseResolverFactory` uses the
schemas defined by variable definitions and value definitions to resolve test case values.

* **`Tcases::getEffectiveInputDef`: Normalize all schemas**

In this release, the `Tcases::getEffectiveInputDef` method ensures that all schema definitions in the resulting system input
definition have been "normalized". Schema normalization updates the original schema definition to resolve any
inconsistencies. For example, a schema that defined both `"minimum": 0` and `"exclusiveMinimum": 1` would be normalized to
define only `"minimum": 2`. Any change made during schema normalization is reported in a log message.

* **Upgraded dependencies**

Upgraded to swagger-parser 2.1.10.

## 4.0.0 ##

With this major release, JSON becomes the preferred format for all Tcases documents. From now on, unless otherwise stated, new
Expand Down
70 changes: 70 additions & 0 deletions Using-Tcases-API.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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](#builders), [generating test cases](#test-cases), and [reading or writing Tcases documents](#documents).

## Builders ##

The [`tcases-lib`](https://search.maven.org/search?q=g:org.cornutum.tcases%20AND%20a:tcases-lib) JAR contains all of the core
classes needed to create a [system input definition](Tcases-Guide.md#defining-system-functions). You can use methods from the
[`SystemInputs`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/SystemInputs.html) class for a fluent interface to
the various builder classes needed to construct a complete [`SystemInputDef`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/SystemInputDef.html).
For a complete example, see the [`SystemInputBuilderTest`](./tcases-io/src/test/java/org/cornutum/tcases/io/SystemInputBuilderTest.java).

## Test Cases ##

The [`tcases-lib`](https://search.maven.org/search?q=g:org.cornutum.tcases%20AND%20a:tcases-lib) JAR all contains all of the interfaces needed to
generate a [system test definition](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/SystemTestDef.html)
that contains all of the [test cases](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/TestCase.html) for a system input definition.

To generate test cases, use the [`Tcases`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/Tcases.html) class. `Tcases` defines
several variations on the
[`getTests`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/Tcases.html#getTests-org.cornutum.tcases.SystemInputDef-org.cornutum.tcases.generator.IGeneratorSet-org.cornutum.tcases.resolve.TestCaseResolverFactory-org.cornutum.tcases.SystemTestDef-org.cornutum.tcases.generator.GeneratorOptions-)
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`](./tcases-io/src/test/java/org/cornutum/tcases/io/SystemInputBuilderTest.java).

For example, `Tcases:getTests` accepts a [generator definition](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/generator/IGeneratorSet.html)
object to define the required [coverage](Tcases-Guide.md#defining-higher-coverage) for test cases.
You can use methods from the [`Generators`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/generator/Generators.html) class for a
fluent interface to the various builder classes needed to construct a generator definition.
For a complete example, see the [`GeneratorsTest`](./tcases-io/src/test/java/org/cornutum/tcases/generator/io/GeneratorsTest.java).

To run the [Tcases Reducer](Tcases-Guide.md#reducing-test-cases-a-random-walk),
use the [`Reducer`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/Reducer.html) class.
`Reducer` defines several variations on the
[`reduce`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/Reducer.html#reduce-org.cornutum.tcases.SystemInputDef-org.cornutum.tcases.generator.GeneratorSet-org.cornutum.tcases.SystemTestDef-org.cornutum.tcases.ReducerOptions-)
method to perform this task.

## Documents ##

The [`tcases-io`](https://search.maven.org/search?q=g:org.cornutum.tcases%20AND%20a:tcases-io) JAR contains classes needed to handle
the following types of Tcases documents.

* System input definition

* [`SystemInputJsonReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemInputJsonReader.html)
* [`SystemInputJsonWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemInputJsonWriter.html)
* [`SystemInputDocReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemInputDocReader.html)
* [`SystemInputDocWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemInputDocWriter.html)

* Generator definition

* [`GeneratorSetJsonReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/generator/io/GeneratorSetJsonReader.html)
* [`GeneratorSetJsonWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/generator/io/GeneratorSetJsonWriter.html)
* [`GeneratorSetDocReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/generator/io/GeneratorSetDocReader.html)
* [`GeneratorSetDocWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/generator/io/GeneratorSetDocWriter.html)

* System test definition

* [`SystemTestJsonReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemTestJsonReader.html)
* [`SystemTestJsonWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemTestJsonWriter.html)
* [`SystemTestDocReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemTestDocReader.html)
* [`SystemTestDocWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/SystemTestDocWriter.html)

* Project definition

* [`ProjectJsonReader`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/ProjectJsonReader.html)
* [`ProjectJsonWriter`](http://www.cornutum.org/tcases/docs/api/org/cornutum/tcases/io/ProjectJsonWriter.html)
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<packaging>pom</packaging>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>

<name>Tcases</name>
<description>Generates test cases from system input space models</description>
Expand Down
2 changes: 1 addition & 1 deletion tcases-ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-ant</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tcases-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-cli</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tcases-io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-io</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import javax.json.JsonReader;

/**
* An {@link IGeneratorSetSource} that reads from an JSON document.
* An {@link IGeneratorSetSource} that reads from a JSON document.
*
*/
public class GeneratorSetJsonReader implements IGeneratorSetSource, Closeable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import javax.json.JsonReader;

/**
* Reads a {@link Project} definition from an JSON document.
* Reads a {@link Project} definition from a JSON document.
*
*/
public class ProjectJsonReader implements Closeable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import javax.json.JsonReader;

/**
* An {@link ISystemInputSource} that reads from an JSON document.
* An {@link ISystemInputSource} that reads from a JSON document.
*/
public class SystemInputJsonReader extends ContextHandler<SystemInputContext> implements ISystemInputSource, Closeable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import javax.json.JsonReader;

/**
* An {@link ISystemTestSource} that reads from an JSON document.
* An {@link ISystemTestSource} that reads from a JSON document.
*
*/
public class SystemTestJsonReader implements ISystemTestSource, Closeable
Expand Down
2 changes: 1 addition & 1 deletion tcases-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-lib</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tcases-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-maven-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tcases-moco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-moco</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import javax.json.JsonReader;

/**
* Reads a {@link MocoTestConfig} object from an JSON document.
* Reads a {@link MocoTestConfig} object from a JSON document.
*
*/
public class MocoTestConfigReader implements Closeable
Expand Down
2 changes: 1 addition & 1 deletion tcases-openapi-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-openapi-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tcases-openapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-openapi</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import javax.json.JsonReader;

/**
* Reads a {@link RequestTestDef} object from an JSON document.
* Reads a {@link RequestTestDef} object from a JSON document.
*
*/
public class RequestTestDefReader implements Closeable
Expand Down
2 changes: 1 addition & 1 deletion tcases-rest-assured/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-rest-assured</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tcases-shell/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.cornutum.tcases</groupId>
<artifactId>tcases</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.0.1</version>
</parent>

<artifactId>tcases-shell</artifactId>
Expand Down

0 comments on commit c35f52e

Please sign in to comment.