Files
cleveragents-core/robot/automation_profile_cli.robot
freemo 3bd02a7c6e feat(cli): add automation-profile commands
Add CLI command group `agents automation-profile` with add, remove,
list, and show subcommands for managing automation profiles that
control plan execution autonomy.

Changes:
- New `automation_profile.py` CLI module with YAML config input,
  schema_version guard, namespaced name validation, --update support,
  and all output formats (json/yaml/plain/table/rich)
- Register automation-profile in main CLI app
- Add deprecation warnings for --automation-level on plan use and
  set-automation-level commands
- Update CLI reference docs with command examples, built-in profiles
  list, and deprecation notes
- 26 Behave scenarios covering all commands and error paths
- 9 Robot Framework integration smoke tests
- ASV benchmarks for CLI parsing performance
- Mark A6.cli items complete in implementation_plan.md
2026-02-20 08:50:06 -05:00

64 lines
2.9 KiB
Plaintext

*** Settings ***
Documentation Smoke tests for automation-profile CLI commands
Resource ${CURDIR}/common.resource
Suite Setup Setup Test Environment
Suite Teardown Cleanup Test Environment
*** Variables ***
${HELPER_SCRIPT} robot/helper_automation_profile_cli.py
*** Test Cases ***
Add Automation Profile
[Documentation] Add a custom automation profile from YAML config
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} add cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} add-profile-ok
Show Automation Profile
[Documentation] Show a built-in automation profile
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} show cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} show-profile-ok
Show Automation Profile JSON
[Documentation] Show a profile in JSON format
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} show-json cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} show-json-ok
Show Automation Profile YAML
[Documentation] Show a profile in YAML format
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} show-yaml cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} show-yaml-ok
List Automation Profiles
[Documentation] List all automation profiles
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} list cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} list-profiles-ok
List Automation Profiles JSON
[Documentation] List profiles in JSON format
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} list-json cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} list-json-ok
Remove Automation Profile
[Documentation] Remove a custom automation profile
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} remove cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} remove-profile-ok
Remove Built-in Profile Fails
[Documentation] Verify built-in profiles cannot be removed
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} remove-builtin-fails cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} remove-builtin-fails-ok
All Automation Profile CLI Tests
[Documentation] Run all automation-profile CLI tests
${result}= Run Process ${PYTHON} ${HELPER_SCRIPT} all cwd=${WORKSPACE}
Should Be Equal As Integers ${result.rc} 0
Should Contain ${result.stdout} all-tests-ok