Files
temp/tests/integration
..

CleverAgents Integration Tests

This directory contains Robot Framework integration tests for the CleverAgents CLI.

Test Files

  • version_test.robot - Tests for version and help commands
  • commands_test.robot - Tests for various CLI command help messages
  • generate_examples_test.robot - Tests for the generate-examples functionality

Running Tests

Manually with Robot Framework

# Run all integration tests
robot tests/integration/

# Run a specific test file
robot tests/integration/version_test.robot

# Run with custom output directory
robot --outputdir /tmp/robot-results tests/integration/

With Tox

# Run the integration tests only (no coverage)
tox -e integration

# Run all tests including integration tests
tox -e py313-nocov

# Run with coverage (integration tests won't affect coverage)
tox -e py313-cover

Test Structure

The integration tests use the Robot Framework's Process library to execute the CleverAgents CLI as a subprocess and verify:

  1. Exit codes
  2. Output content (stdout/stderr)
  3. File creation and modification
  4. Error handling

Adding New Tests

To add new integration tests:

  1. Create a new .robot file in this directory
  2. Use the existing test files as templates
  3. Follow the Robot Framework best practices:
    • Use descriptive test case names
    • Add documentation for test cases
    • Clean up any temporary files/directories created during tests

Dependencies

The integration tests require:

  • Python 3.10+
  • Robot Framework (installed via pip install robotframework)
  • CleverAgents package installed (handled by tox)