run-test-verbose.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. # Run a test with full conversation output
  3. # Usage: ./run-test-verbose.sh <agent> <pattern>
  4. # Example: ./run-test-verbose.sh opencoder "planning/*.yaml"
  5. AGENT=${1:-opencoder}
  6. PATTERN=${2:-"**/*.yaml"}
  7. echo "🚀 Running test with verbose output..."
  8. echo "Agent: $AGENT"
  9. echo "Pattern: $PATTERN"
  10. echo ""
  11. # Run test with debug mode and capture session ID
  12. OUTPUT=$(cd .. && npm run eval:sdk -- --agent=$AGENT --pattern="$PATTERN" --debug 2>&1)
  13. # Extract session ID from output
  14. SESSION_ID=$(echo "$OUTPUT" | grep -o "Session created: ses_[a-zA-Z0-9]*" | head -1 | cut -d' ' -f3)
  15. # Show test summary
  16. echo "$OUTPUT" | grep -A 20 "TEST RESULTS"
  17. if [ -n "$SESSION_ID" ]; then
  18. echo ""
  19. echo "========================================================================"
  20. echo "FULL CONVERSATION"
  21. echo "========================================================================"
  22. echo ""
  23. # Show full conversation
  24. ./debug/show-test-conversation.sh "$SESSION_ID"
  25. else
  26. echo ""
  27. echo "⚠️ No session ID found. Test may have failed to start."
  28. echo ""
  29. echo "Full output:"
  30. echo "$OUTPUT"
  31. fi