A testing framework for Atlas CLI that enables automated testing of AI provenance workflows, integrity verification, and manifest management.
The Atlas Test Framework provides:
- Automated execution of Atlas CLI commands
- End-to-end testing of ML provenance workflows
- Integrity verification testing
- Command recording and reproduction
- Support for multiple storage backends (local-fs, database, rekor)
- Modular test examples with shared resources
- Rust 1.70 or higher
- Cargo (comes with Rust)
- Atlas CLI installed and accessible in PATH
- OpenSSL (for key generation)
git clone https://github.com/IntelLabs/atlas-cli
cd atlas-cli/examples# Build release version
cargo build --release
# The binary will be at ./target/release/atlas-testatlas-cli --version# From atlas-cli/examples directory
./target/release/atlas-test workflows/simple_demo/config.yaml
# Run with verbose output
./target/release/atlas-test workflows/simple_demo/config.yaml --verbose
# Run in dry-run mode
./target/release/atlas-test workflows/simple_demo/config.yaml --dry-runatlas-cli/examples/
├── Cargo.toml # Rust dependencies and project config
├── README.md # This file
├── .gitignore # Git ignore rules
│
├── src/ # Framework source code
│ ├── main.rs # CLI entry point
│ ├── lib.rs # Library exports
│ ├── framework.rs # Main framework implementation
│ ├── command.rs # Command builder
│ ├── recorder.rs # Command recording
│ ├── config.rs # Configuration parsing
│ ├── error.rs # Error types
│ ├── utils.rs # Utility functions
│ └── subcommands/ # Action handlers
│ ├── mod.rs
│ ├── dataset.rs # Dataset operations
│ ├── model.rs # Model operations
│ ├── software.rs # Software operations
│ ├── evaluation.rs # Evaluation operations
│ ├── manifest.rs # Manifest operations
│ └── utility.rs # Utility operations
│
├── workflows/ # Test workflow configurations
│ ├── simple_demo/ # Basic functionality test
│ │ ├── config.yaml
│ │ ├── data/
│ │ └── keys/
│ │
│ ├── mnist/ # Complete ML pipeline example
│ │ ├── mnist_complete_pipeline.yaml
│ │ ├── pyproject.toml # Python dependencies for training
│ │ ├── train.py
│ │ ├── eval.py
│ │ └── download.py
│ │
│ └── oss25_demo/ # OSS 2025 demo
│ └── oss25_demo_pipeline.yaml
│
└── shared/ # Shared resources
├── data/ # Common datasets
├── scripts/ # Reusable scripts
├── models/ # Pre-trained models
└── keys/ # Shared signing keys
Note: The term "workflow" in this framework refers to a test scenario configuration that defines a sequence of Atlas CLI commands for testing ML provenance pipelines. This is not related to GitHub Actions or other CI/CD workflow systems.
name: "Test Name"
description: "Test description"
environment:
storage_type: local-fs # Storage backend: local-fs, database, rekor
storage_url: ./test_storage # Storage location
signing_key: ./keys/test.pem # Private key for signing
verifying_key: ./keys/test_pub.pem # Public key
generate_keys: true # Auto-generate keys if missing
output_dir: ./test_output # Output directory
hash_alg: sha384 # Hash algorithm
steps:
- name: "Step Name"
action: dataset:create # Action to perform
parameters: # Action-specific parameters
paths:
- ./data/file.csv
name: "Dataset Name"
store_as: DATASET_ID # Store result for later usedataset:create- Create a dataset manifestdataset:verify- Verify dataset integritydataset:list- List all datasets
model:create- Create a model manifestmodel:verify- Verify model integritymodel:list- List all models
software:create- Create a software manifestsoftware:verify- Verify software integrity
evaluation:create- Create an evaluation manifestevaluation:verify- Verify evaluation integrity
manifest:validate- Validate cross-references between manifestsmanifest:link- Link two manifestsmanifest:show- Display manifest detailsmanifest:export- Export provenance graphmanifest:list- List all manifests
shell:command- Execute custom shell commandfile:tamper- Tamper with a file (for testing)file:copy- Copy a filefile:delete- Delete a filefile:create- Create a file with content
steps:
- name: "Create Dataset"
action: dataset:create
parameters:
paths:
- ./data/training.csv
- ./data/validation.csv
name: "Training Dataset"
description: "MNIST training data"
author_org: "AI Lab"
author_name: "John Doe"
store_as: DATASET_IDsteps:
- name: "Create Model"
action: model:create
parameters:
paths:
- ./models/model.pkl
name: "Classification Model"
linked_manifests:
- "${DATASET_ID}" # Reference previous step
store_as: MODEL_IDsteps:
- name: "Create Dataset"
action: dataset:create
parameters:
paths: ["./data/original.csv"]
name: "Original Data"
store_as: DATASET_ID
- name: "Verify Original"
action: dataset:verify
parameters:
manifest_id: "${DATASET_ID}"
expect: success
- name: "Tamper File"
action: file:tamper
parameters:
file: ./data/original.csv
- name: "Verify Tampered"
action: dataset:verify
parameters:
manifest_id: "${DATASET_ID}"
expect: failure # Should fail after tampering# From atlas-cli/examples directory
./target/release/atlas-test <config-file>
# Run examples
./target/release/atlas-test workflows/simple_demo/config.yaml
./target/release/atlas-test workflows/mnist/mnist_complete_pipeline.yaml
./target/release/atlas-test workflows/oss25_demo/oss25_demo_pipeline.yaml
# Run with options
./target/release/atlas-test workflows/simple_demo/config.yaml \
--dry-run \ # Preview commands without execution
--verbose \ # Show detailed output
--interactive \ # Pause between steps# Navigate to specific workflow
cd workflows/oss25_demo
# Run from within the directory
../../target/release/atlas-test oss25_demo_pipeline.yaml
# Or for MNIST
cd workflows/mnist
../../target/release/atlas-test mnist_complete_pipeline.yaml# Show help
./target/release/atlas-test --help
# Version information
./target/release/atlas-test --version
# Dry run (preview without execution)
./target/release/atlas-test config.yaml --dry-run
# Interactive mode (pause between steps)
./target/release/atlas-test config.yaml --interactive
# Verbose logging
./target/release/atlas-test config.yaml --verboseAll executed commands are recorded in:
commands.log- Detailed execution log with timestampsreproduce.sh- Executable bash script to reproduce the test
# From atlas-cli/examples directory
# Debug build (faster compilation, slower execution)
cargo build
# Release build (optimized)
cargo build --release
# Run directly with cargo
cargo run -- workflows/simple_demo/config.yaml
# Run with options
cargo run --release -- workflows/simple_demo/config.yaml --verbose
# Check code without building
cargo check
# Format code
cargo fmt
# Run linter
cargo clippy# Run all unit tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test
cargo test test_command_builder
# Run tests with coverage (requires tarpaulin)
cargo install cargo-tarpaulin
cargo tarpaulin --out Html# From atlas-cli/examples directory
mkdir -p workflows/my_workflow/{data,scripts,models,output,keys}# workflows/my_workflow/config.yaml
name: "My Workflow"
description: "Description of my workflow"
environment:
storage_type: local-fs
storage_url: ./output/storage
generate_keys: true
output_dir: ./output
steps:
- name: "First Step"
action: dataset:create
parameters:
paths: ["./data/mydata.csv"]
name: "My Dataset"# Add your test files
cp your_data.csv workflows/my_workflow/data/
cp your_model.pkl workflows/my_workflow/models/./target/release/atlas-test workflows/my_workflow/config.yaml# Check if atlas-cli is in PATH
which atlas-cli
# If building from source, add to PATH
cd ../ # to atlas-cli root
cargo build --release
export PATH=$PATH:$(pwd)/target/release# Update Rust toolchain
rustup update
# Clean and rebuild
cargo clean
cargo build --release
# Check for dependency issues
cargo updateFor local-fs storage:
# Ensure storage directory is writable
chmod 755 ./test_storageFor database storage:
# Verify database is running
curl http://localhost:8080/health# Ensure OpenSSL is installed
openssl version
# Generate keys manually
openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:4096
openssl rsa -pubout -in private.pem -out public.pemAfter running tests, check the output directory for:
commands.log- Complete command execution logreproduce.sh- Executable script to reproduce all commands*.json- Exported manifestsprovenance_*.json- Provenance graphs
The MNIST pipeline example demonstrates a complete ML workflow with provenance tracking:
# Navigate to mnist directory
cd workflows/mnist
# Install Python dependencies (for training)
poetry install
# Run the complete pipeline
../../target/release/atlas-test mnist_complete_pipeline.yamlThis example:
- Downloads MNIST dataset
- Trains a CNN model
- Evaluates the model
- Creates provenance manifests for all artifacts
- Links manifests to show complete lineage
- Exports the full provenance graph
MIT OR Apache-2.0
Contributions are welcome! Please see the main Atlas CLI repository for contribution guidelines.