| Crates.io | miden-client-integration-tests |
| lib.rs | miden-client-integration-tests |
| version | 0.11.6 |
| created_at | 2025-09-01 07:26:18.170224+00 |
| updated_at | 2025-09-18 00:11:03.36092+00 |
| description | Integration Tests for the miden client library |
| homepage | |
| repository | https://github.com/0xMiden/miden-client |
| max_upload_size | |
| id | 1819237 |
| size | 271,192 |
This directory contains integration tests for the Miden client library. These tests verify the functionality of the client against a running Miden node.
To install the integration tests binary:
make install-tests
This will build and install the miden-client-integration-tests binary to your system.
The integration tests binary can be run with various command-line options:
miden-client-integration-tests [OPTIONS]
-n, --network <NETWORK> - The network to use. Options are devnet, testnet, localhost or a custom RPC endpoint (default: localhost)-t, --timeout <MILLISECONDS> - Timeout for RPC requests in milliseconds (default: 10000)-j, --jobs <NUMBER> - Number of tests to run in parallel (default: auto-detected CPU cores, set to 1 for sequential execution)-f, --filter <REGEX> - Filter tests by name using regex patterns--contains <STRING> - Only run tests whose names contain this substring--exclude <REGEX> - Exclude tests whose names match this regex pattern--list - List all available tests without running them-v, --verbose - Show verbose output including individual test timings and worker information-h, --help - Show help information-V, --version - Show version informationRun all tests with default settings (auto-detected CPU cores):
miden-client-integration-tests
Run tests sequentially (no parallelism):
miden-client-integration-tests --jobs 1
Run tests with custom parallelism:
miden-client-integration-tests --jobs 8
List all available tests without running them:
miden-client-integration-tests --list
Run only client-related tests:
miden-client-integration-tests --filter "client"
Run tests containing "fpi" in their name:
miden-client-integration-tests --contains "fpi"
Exclude swap-related tests:
miden-client-integration-tests --exclude "swap"
Run tests with verbose output showing worker information:
miden-client-integration-tests --verbose
Run tests against devnet:
miden-client-integration-tests --network devnet
Run tests against testnet:
miden-client-integration-tests --network testnet
Run tests against a custom RPC endpoint with timeout:
miden-client-integration-tests --network http://192.168.1.100:57291 --timeout 30000
Complex example: Run non-swap tests in parallel with verbose output:
miden-client-integration-tests --exclude "swap" --verbose
Show help:
miden-client-integration-tests --help
The integration tests cover several categories:
The integration tests use an automatic code generation system to create both cargo nextest compatible tests and a standalone binary. Test functions that start with test_ are automatically discovered during build time and used to generate:
#[tokio::test] wrappers - These allow the tests to be run using standard cargo test or cargo nextest run commandsVec<TestCase> that enables the standalone binary to enumerate and execute tests dynamically with custom parallelism and filteringThe discovery system:
.rs files in the src/ directory recursivelytest_* (supporting pub async fn test_*, async fn test_*, etc.)This dual approach allows the same test code to work seamlessly with both nextest (for development) and the standalone binary (for CI/CD and production testing scenarios), ensuring consistent behavior across different execution environments.
To add a new integration test:
test_ClientConfig parameterResult<()>.rs file under src/Example:
pub async fn test_my_feature(client_config: ClientConfig) -> Result<()> {
let (mut client, authenticator) = client_config.into_client().await?;
// test logic here
}
The build system will automatically discover this function and include it in both the test registry and generate tokio test wrappers.