Files
crowd-funder-for-time-pwa/scripts/test-stability-runner.sh
Matthew Raymer b9b583a14e refactor: eliminate shell script duplication with common base
- Extract shared functionality into test-stability-common.sh
- Refactor test-stability-runner.sh from 421 to 40 lines
- Refactor test-stability-runner-simple.sh from 423 to 117 lines
- Refactor test-stability-runner.zsh from 607 to 93 lines
- Net reduction: 1,336 deletions, 485 additions (-851 lines)
- Maintain all existing functionality while eliminating code duplication
- Improve maintainability with single source of truth for common functions
2025-08-18 09:56:32 +00:00

41 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Test Stability Runner for TimeSafari
# Executes the full test suite 10 times and analyzes failure patterns
# Author: Matthew Raymer
# Source common functions
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/test-stability-common.sh"
# Main execution function
main() {
log_info "Starting test stability analysis with $TOTAL_RUNS runs"
log_info "Results will be saved to: $RESULTS_DIR"
echo
# Run all test executions
for run_number in $(seq 1 $TOTAL_RUNS); do
track_test_progress "$run_number" "test suite"
if run_single_test "$run_number"; then
log_success "Run $run_number completed successfully"
else
log_warning "Run $run_number failed, continuing with remaining runs"
fi
# Small delay between runs to avoid overwhelming the system
if [ "$run_number" -lt $TOTAL_RUNS ]; then
sleep 2
fi
done
# Generate and display results
generate_summary_report
display_final_results
log_success "Test stability analysis complete!"
}
# Run main function
main "$@"