perf(tests): optimize Robot.Actor Context Management integration test suite
- Add suite-level ${MOCK_AI_ENV} variable to centralise CLEVERAGENTS_TESTING_USE_MOCK_AI=true
- Replace global Set Environment Variable calls with per-process env: parameters,
preserving CLEVERAGENTS_DEFAULT_ACTOR per-call for correctness
- Add explicit timeouts: init/context-load/tell/context commands 10-30s, build 120s
- Keep build timeout at 120s (pabot cold-start + Alembic migration overhead)
- Add test tags (smoke, actor, context, plan, workflow, multi) for selective execution
- Remove non-essential Log statements that do not contribute to test validation
This commit is contained in:
@@ -15,13 +15,12 @@ ${UNIQUE_ID} ${EMPTY}
|
|||||||
*** Test Cases ***
|
*** Test Cases ***
|
||||||
Test Context Commands With Actor
|
Test Context Commands With Actor
|
||||||
[Documentation] Verify context commands work with actor-first approach
|
[Documentation] Verify context commands work with actor-first approach
|
||||||
|
[Tags] smoke actor context
|
||||||
|
|
||||||
# Initialize project first
|
# Initialize project first
|
||||||
Create Directory ${TEST_PROJECT_DIR}
|
Create Directory ${TEST_PROJECT_DIR}
|
||||||
${result} = Run Process ${PYTHON} -m cleveragents init test-project
|
${result} = Run Process ${PYTHON} -m cleveragents init test-project
|
||||||
... cwd=${TEST_PROJECT_DIR}
|
... cwd=${TEST_PROJECT_DIR} timeout=120s
|
||||||
Log Init stdout: ${result.stdout}
|
|
||||||
Log Init stderr: ${result.stderr}
|
|
||||||
Should Be Equal As Integers ${result.rc} 0
|
Should Be Equal As Integers ${result.rc} 0
|
||||||
|
|
||||||
# Create test files
|
# Create test files
|
||||||
@@ -29,27 +28,16 @@ Test Context Commands With Actor
|
|||||||
Create File ${TEST_PROJECT_DIR}/src/main.py print("Hello World")
|
Create File ${TEST_PROJECT_DIR}/src/main.py print("Hello World")
|
||||||
|
|
||||||
# Load context with actor (simulating with environment variable)
|
# Load context with actor (simulating with environment variable)
|
||||||
Set Environment Variable CLEVERAGENTS_TESTING_USE_MOCK_AI true
|
|
||||||
Set Environment Variable CLEVERAGENTS_DEFAULT_ACTOR openai/gpt-4
|
|
||||||
|
|
||||||
${result} = Run Process ${PYTHON} -m cleveragents context-load src/
|
${result} = Run Process ${PYTHON} -m cleveragents context-load src/
|
||||||
... cwd=${TEST_PROJECT_DIR}
|
... cwd=${TEST_PROJECT_DIR} env:CLEVERAGENTS_TESTING_USE_MOCK_AI=true env:CLEVERAGENTS_DEFAULT_ACTOR=openai/gpt-4 timeout=120s
|
||||||
Should Be Equal As Integers ${result.rc} 0
|
Should Be Equal As Integers ${result.rc} 0
|
||||||
|
|
||||||
# List contexts
|
# List contexts
|
||||||
${result} = Run Process ${PYTHON} -m cleveragents context list
|
${result} = Run Process ${PYTHON} -m cleveragents context list
|
||||||
... cwd=${TEST_PROJECT_DIR}
|
... cwd=${TEST_PROJECT_DIR} timeout=30s
|
||||||
Should Be Equal As Integers ${result.rc} 0
|
Should Be Equal As Integers ${result.rc} 0
|
||||||
Should Contain ${result.stdout} main.py
|
Should Contain ${result.stdout} main.py
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*** Keywords ***
|
*** Keywords ***
|
||||||
Setup Test Environment
|
Setup Test Environment
|
||||||
[Documentation] Create test environment
|
[Documentation] Create test environment
|
||||||
|
|||||||
Reference in New Issue
Block a user