Create Test Command
Description
When the user runs `/create-test [path] [description] [test_type] [components] [tdd_phase]`, execute the following:
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for ruvnet/QuDAG, shared by 10 entries
in this directory. It describes the repository, not this entry specifically.
Create Test Command
When the user runs `/create-test [path] [description] [test_type] [components] [tdd_phase]`, execute the following:
Parameters
- path: Path to test file (e.g.,
tests/crypto/ml_kem_test.rs) - REQUIRED - description: Description of the feature to test - REQUIRED
- test_type: Type of test (unit, integration, security, performance, multi-component) - Optional, default: unit
- components: Components for integration tests (crypto, dag, network, protocol) - Optional
- tdd_phase: TDD phase (red, green, refactor) - Optional, default: red
Execution Steps
Step 1: Validate Parameters
- Verify the path is valid and follows project structure
- Check if file already exists and warn if it does
- Parse test type and validate against allowed values
- If integration or multi-component test, validate component list
Step 2: Generate Test Based on Type
For Unit Tests:
use super::*;
use proptest::prelude::*;
use test_case::test_case;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_${feature_name}() {
// TDD RED Phase: This test should fail initially
// TODO: Implement the actual functionality to make this pass
// Arrange
let input = setup_test_data();
// Act
let result = function_under_test(input);
// Assert
assert!(result.is_ok());
// TODO: Add more specific assertions based on requirements
}
// Property-based test example
proptest! {
#[test]
fn test_${feature_name}_properties(input: ValidInput) {
// Test invariants and properties
let result = function_under_test(input);
prop_assert!(result.is_ok());
}
}
// Helper function
fn setup_test_data() -> TestData {
// TODO: Create test data
unimplemented!("Create test data for ${description}")
}
}
For Integration Tests:
use qudag_protocol::*;
use qudag_crypto::*;
use qudag_dag::*;
use qudag_network::*;
use tokio::test;
use std::sync::Arc;
use wiremock::{Mock, ResponseTemplate};
#[tokio::test]
async fn test_${feature_name}_integration() {
// TDD RED Phase: Integration test should fail initially
// Testing: ${description}
// Setup multi-component test environment
let test_env = TestEnvironment::new().await;
// Initialize components
let crypto = Arc::new(CryptoComponent::new());
let network = Arc::new(NetworkComponent::new());
let dag = Arc::new(DagComponent::new());
let protocol = Protocol::new(crypto.clone(), network.clone(), dag.clone());
// Configure component interactions
test_env.configure_integration(&protocol).await;
// Execute multi-component test scenario
let result = protocol.execute_integrated_operation().await;
// Verify component state consistency
assert!(verify_component_states(&crypto, &network, &dag).await);
// Verify
Related Skills
Spec Kit
💫 Toolkit to help you get started with Spec-Driven Development
Testing Webapp Testing
Test local web applications using Playwright for UI verification and debugging
Testing #29
, [#52](https://github.com/affaan-m/everything-claude-code/issues/52), [#103](https://github.com/affaan-m/ever
Testing Fix Issue
by metabase - Addresses GitHub issues by taking issue number as parameter, analyzing context, implementing sol
Testing Pypict Test Design
Design comprehensive test cases using PICT (Pairwise Independent Combinatorial Testing) for optimized test sui
Testing gstack
| 15,000+ | Garry Tan's exact Claude Code setup: 6 opinionated tools that serve as CEO, Eng Manager, Release M
Testing