forked from HAL9000/cleveragents-core
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
*** Settings ***
|
|
Documentation Common resources and keywords for Robot Framework tests
|
|
Library OperatingSystem
|
|
Library String
|
|
Library Collections
|
|
|
|
*** Variables ***
|
|
${WORKSPACE} ${CURDIR}/..
|
|
${SRC_DIR} ${WORKSPACE}/src/cleveragents
|
|
|
|
*** 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} |