-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a new page in our book to describe the tests that we have on a high-level view. Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
- Loading branch information
Showing
3 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# List of existing tests | ||
|
||
## Integration tests on providers | ||
|
||
| Name | Description | | ||
|-----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| [TPM integration tests](https://github.com/parallaxsecond/parsec/tree/master/tests/providers) | These tests initialize a provider structure and perform operation using the `Provide` trait. A software crypto library, like `ring`, can be used to verify the behaviour. [Example with the TPM provider](https://github.com/parallaxsecond/parsec/blob/master/tests/providers/tpm.rs). | | ||
|
||
## End-to-end testing | ||
|
||
These tests are meant to be executed on a running Parsec service and using a Parsec client to | ||
communicate to it. The | ||
[`parsec/e2e_tests`](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests) crate contains | ||
a test client based on the Rust client that is used inside the tests written in | ||
[`parsec/e2e_tests/tests`](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests). | ||
|
||
The end-to-end tests contain tests to be executed: * with a Parsec service containing a single | ||
provider: | ||
[`per_provider`](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/per_provider) | ||
tests * with a Parsec service containing all providers: | ||
[`all_providers`](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/all_providers) | ||
and [`config`](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/config) tests | ||
|
||
The | ||
[`parsec/e2e_tests/provider_cfg`](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/provider_cfg) | ||
folder contain the `Dockerfile` and Parsec configuration needed to run Parsec for the corresponding | ||
tests. | ||
|
||
| Name | Description | | ||
|------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------| | ||
| [All providers e2e tests](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/all_providers) | End-to-end tests on a service with all providers. Mostly to test core operations. | | ||
| [Configuration e2e tests](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/config) | These check if the behaviour of the service is correct before and after reloading with a different configuration. | | ||
| [Per provider normal tests](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/per_provider/normal_tests) | E2E tests checking most cryptographic operations on a single provider. | | ||
| [Per provider persistence tests](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/per_provider/persistent_before.rs) | E2E tests checking correct behaviour of the service around persistence of keys in the Key Info Manager. | | ||
| [Per provider stress tests](https://github.com/parallaxsecond/parsec/tree/master/e2e_tests/tests/per_provider/stress_test.rs) | Stress tests executing a large number of canonical operations at high frequency on a single provider. | | ||
|
||
## Fuzz testing | ||
|
||
| Name | Description | | ||
|---------------------------------------------------------------------------|-------------------------------------------------------------------------------| | ||
| [Fuzz testing](https://github.com/parallaxsecond/parsec/tree/master/fuzz) | Tests sending random requests to the service and waiting it to crash/timeout. | | ||
|
||
## Unit testing | ||
|
||
| Name | Description | | ||
|-------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| | ||
| [Direct authenticator tests](https://github.com/parallaxsecond/parsec/blob/master/src/authenticators/direct_authenticator/mod.rs) | Testing the `Authenticate` trait with this authenticator. | | ||
| [On-disk key info manager tests](https://github.com/parallaxsecond/parsec/blob/master/src/key_info_managers/on_disk_manager/mod.rs) | Testing the `ManageKeyInfo` trait with various strings for application and key names. The persistence is tested in the end-to-end tests. | | ||
|
||
## In dependencies | ||
|
||
The dependencies that we maintain in the `parallaxsecond` organisation also contain their own set of | ||
integration and unit tests: `parsec-interface-rs`, `rust-psa-crypto` and `rust-tss-esapi`. | ||
|
||
*Copyright 2020 Contributors to the Parsec project.* |