Skip to content

Latest commit

 

History

History
114 lines (88 loc) · 2.66 KB

File metadata and controls

114 lines (88 loc) · 2.66 KB

Testing Scripts

This directory contains all test scripts for the Resume Processing Pipeline.

Scripts Overview

run-tests.sh - Main Test Runner

  • Executes all test scripts in sequence
  • Provides colored output and error handling
  • Sets up paths and environment

Usage:

./scripts/testing/run-tests.sh

test-mcp.sh - MCP Server Tests

  • Tests the Model Context Protocol server functionality
  • Validates initialization, health checks, and resume analysis
  • Tests both stdio and HTTP modes

Usage:

./scripts/testing/test-mcp.sh

What it tests:

  • MCP server initialization
  • Health endpoint functionality
  • Resume analysis tool
  • JSON-RPC communication

test-act.sh - ACT Pipeline Tests

  • Tests GitHub Actions workflows locally using ACT
  • Validates workflow syntax and execution
  • Checks Docker container builds

Usage:

./scripts/testing/test-act.sh           # Basic tests
./scripts/testing/test-act.sh --full    # Full tests with Docker builds

What it tests:

  • ACT installation and Docker availability
  • Required files presence
  • Shell script syntax validation
  • Python script compilation
  • LinkedIn template generator functionality
  • GitHub Actions workflow execution (dry run)
  • Optional: Full Docker build tests

Prerequisites

For MCP Tests

  • Go binary: resume-processor-mcp built in project root
  • Python 3 with json.tool module

For ACT Tests

  • ACT installed
  • Docker running
  • Required project files:
    • Dockerfile
    • scripts/process_resume.sh
    • scripts/linkedin_template_generator.py
    • scripts/requirements.txt
    • .github/workflows/resume-pipeline.yml
    • .actrc
    • .secrets

Path Resolution

All scripts automatically:

  1. Detect their own location
  2. Calculate the project root (two levels up)
  3. Change to project root for execution
  4. Use relative paths from project root

This ensures tests work regardless of where they're called from.

Error Handling

  • All scripts use set -e for fail-fast behavior
  • Colored output for easy identification of issues
  • Cleanup on exit
  • Error messages with context

Integration

These scripts are designed to be:

  • Run manually during development
  • Integrated into CI/CD pipelines
  • Called from project root or any subdirectory
  • Used for debugging components

Examples

# Run all tests
./scripts/testing/run-tests.sh

# Test only MCP functionality
./scripts/testing/test-mcp.sh

# Test ACT workflows (basic)
./scripts/testing/test-act.sh

# Test ACT workflows with full Docker builds
./scripts/testing/test-act.sh --full

# From any directory
cd local/
../scripts/testing/run-tests.sh  # Still works!