fermyon / conformance-tests

A suite of conformance tests for Spin compliant runtimes
Apache License 2.0
1 stars 2 forks source link

Conformance Testing

What is conformance testing?

Conformance testing is a way of specifying the set of behavior that Spin compliant runtimes must implement. While we refrain from any formal specification (as such an activity at this point would likely be much more work than is worthwhile), conformance testing is the start of the journey in the ultimate goal of clearly defining what a Spin compliant runtime is.

What are we testing, and what are we not testing?

Conformance tests would include assertions on all behaviors that a Spin compliant runtime must exhibit from the perspective of the guest application. Conformance tests do not aim to verify the all around correctness of a runtime, nor do they seek to make assertions about all runtime semantics, but rather they seek to test behaviors that all runtimes must guarantee to a Spin application.

In other words, conformance tests answer the question: what behavior which is visible to a guest Spin application must a runtime provide?

At a high-level, this is a non-exhaustive list of the category of items a conformance test will want to test:

At a high-level, this is a non-exhaustive list of the category of items a conformance test will not test:

What do conformance tests include:

Conformance tests seek to answer the question of what the guest application can rely on. In order to answer this question, a spin.toml must be provided as guest visible capabilities are defined in the spin.toml manifest.

Therefore conformance tests will be composed of the following:

For more information on the conformance test manifest, see the docs here.

Running Tests

The conformance test suite does not provide a way to run the tests by default. Each Spin compliant runtime is different enough in structure that providing a test suite runner that can handle all of them is likely not possible. At the very least, this is out of scope for the near term.

This means each runtime will have to provide their own test runner.

Helper Crates

The crates found in the crates directory provide functionality related to conformance testing: