Files
cleveragents-core/robot/cloud_features.robot
T

63 lines
2.4 KiB
Plaintext

*** Settings ***
Documentation Integration tests for cloud features extraction
Resource discovery_common.resource
Library OperatingSystem
Library json_helper.py
Library Collections
Library String
*** Variables ***
${CLOUD_YAML} ${OUTPUT_DIR}/cloud/cloud_features.yaml
${CLOUD_JSON} ${OUTPUT_DIR}/cloud/cloud_features.json
${CLOUD_MD} ${OUTPUT_DIR}/cloud/cloud_features.md
*** Test Cases ***
Verify Cloud Features Extractor Runs Successfully
[Documentation] Test that the cloud features extractor completes without errors
[Tags] discovery
${result}= Run Discovery Tool cloud_features
Should Be Successful ${result}
Verify Cloud Features Files Generated
[Documentation] Test that all expected cloud features files are created
[Tags] discovery
File Should Exist ${CLOUD_YAML}
File Should Exist ${CLOUD_JSON}
File Should Exist ${CLOUD_MD}
Validate Cloud Features JSON Structure
[Documentation] Verify that cloud features JSON has expected structure
[Tags] discovery
${json_content}= Get File ${CLOUD_JSON}
${data}= parse_json ${json_content}
# Check main sections exist
Dictionary Should Contain Key ${data} cloud_features
Dictionary Should Contain Key ${data} statistics
Dictionary Should Contain Key ${data} replacements
Validate Cloud Features Documentation
[Documentation] Verify the markdown documentation is comprehensive
[Tags] discovery
${md_content}= Get File ${CLOUD_MD}
# Check for key sections
Should Contain ${md_content} Cloud-Only Features Analysis
Should Contain ${md_content} Summary
Should Contain ${md_content} Replacement Strategies
Validate Feature Statistics
[Documentation] Check that statistics are properly collected
[Tags] discovery
${json_content}= Get File ${CLOUD_JSON}
${data}= parse_json ${json_content}
Dictionary Should Contain Key ${data} statistics
${stats}= Set Variable ${data['statistics']}
Dictionary Should Contain Key ${stats} total_features
Dictionary Should Contain Key ${stats} by_category
Dictionary Should Contain Key ${stats} by_action
${total}= Set Variable ${stats['total_features']}
Should Be True ${total} > 0 msg=Should have identified at least one cloud feature