Files
cleveragents-core/robot/common.resource
T

35 lines
1.2 KiB
Plaintext

*** Settings ***
Documentation Common resources and keywords for Robot Framework tests
Library OperatingSystem
Library String
Library Collections
Library Process
*** Variables ***
${WORKSPACE} ${CURDIR}/..
${SRC_DIR} ${WORKSPACE}/src/cleveragents
# Use the Python interpreter that's running Robot (from nox venv)
# This ensures we use the same Python with all dependencies installed
${PYTHON} python
*** Keywords ***
Setup Test Environment
[Documentation] Setup common test environment
Log Setting up test environment
Cleanup Test Environment
[Documentation] Clean up after tests
Log Cleaning up test environment
File Should Contain Pattern
[Arguments] ${file_path} ${pattern}
[Documentation] Check if file contains a pattern
${content}= Get File ${file_path}
Should Contain ${content} ${pattern}
Count Files With Extension
[Arguments] ${directory} ${extension}
[Documentation] Count files with specific extension
@{files}= List Files In Directory ${directory} *.${extension} recursive=True
${count}= Get Length ${files}
RETURN ${count}