AWS DevOps Robot Programming & Configuration 3 — Questions and Answers
Question 1: In Robot Framework, which built-in library provides keywords for interacting with the operating system, such as running processes and managing files?
- OperatingSystem (Correct answer)
- SystemLibrary
- ProcessLibrary
- FileSystem
Correct answer: OperatingSystem
The OperatingSystem library provides keywords like 'Run', 'Create File', and 'Remove Directory' for OS-level interactions in Robot Framework.
Question 2: When integrating Robot Framework tests into an AWS CodePipeline, which stage type is MOST appropriate for executing the robot tests?
- Build stage using AWS CodeBuild (Correct answer)
- Deploy stage using AWS CodeDeploy
- Source stage using AWS CodeCommit
- Approval stage using manual approval
Correct answer: Build stage using AWS CodeBuild
A Build stage using AWS CodeBuild is ideal for running Robot Framework tests because CodeBuild can execute arbitrary shell commands and produce test reports.
Question 3: Which Robot Framework keyword would you use to assert that a web page title equals 'Dashboard' during acceptance testing in a CI/CD pipeline?
- Title Should Be (Correct answer)
- Assert Title Equals
- Check Page Title
- Verify Title Is
Correct answer: Title Should Be
'Title Should Be' is the standard SeleniumLibrary keyword that verifies the current browser page title matches the expected string.
Question 4: In a Robot Framework test suite, what is the purpose of the 'Suite Setup' keyword?
- Execute actions once before all tests in the suite run (Correct answer)
- Initialize each individual test before it runs
- Configure global variables for the entire test run
- Set up the Robot Framework environment on the CI server
Correct answer: Execute actions once before all tests in the suite run
Suite Setup runs exactly once before any test case in the suite executes, making it ideal for one-time setup like browser launch or database seeding.
Question 5: Which AWS service can store Robot Framework test result XML files (output.xml) as artifacts for later analysis?
- Amazon S3 (Correct answer)
- Amazon DynamoDB
- AWS Secrets Manager
- Amazon RDS
Correct answer: Amazon S3
Amazon S3 is the standard artifact store for CodeBuild outputs, including Robot Framework's output.xml, log.html, and report.html files.
Question 6: In Robot Framework, variables defined using the syntax `${MY_VAR}` are what type by default?
- Scalar variables holding a single value (Correct answer)
- List variables holding multiple values
- Dictionary variables holding key-value pairs
- Environment variables from the OS
Correct answer: Scalar variables holding a single value
The `${VAR}` syntax denotes scalar variables in Robot Framework, which hold a single value (string, number, or object).
Question 7: A DevOps team wants Robot Framework tests to run only when code is pushed to the 'release' branch in CodeCommit. Which CodePipeline feature enables this branch-based trigger?
- Pipeline triggers with branch filtering using Amazon EventBridge (Correct answer)
- CodeBuild environment variable BRANCH_NAME filter
- A Lambda function monitoring CodeCommit events
- CodeDeploy deployment group conditions
Correct answer: Pipeline triggers with branch filtering using Amazon EventBridge
CodePipeline V2 supports pipeline triggers with branch filters via Amazon EventBridge rules, allowing pipelines to activate only on specific branches.
In Robot Framework, which built-in library provides keywords for interacting with the operating system, such as running processes and managing files?