SAFe® 5 DevOps Certification Agile Testing and Quality 2 — Questions and Answers
Question 1: In Test-Driven Development (TDD), what is the correct Red-Green-Refactor sequence?
- Write code → Write test → Refactor for quality
- Write failing test → Write minimal passing code → Refactor (Correct answer)
- Write code → Deploy → Write regression test
- Deploy → Run tests → Refactor based on results
Correct answer: Write failing test → Write minimal passing code → Refactor
TDD follows Red-Green-Refactor: write a failing test (red), write the minimal code to make it pass (green), then refactor for quality and clarity.
Question 2: What is the primary purpose of Behavior-Driven Development (BDD) in SAFe DevOps?
- To replace unit testing entirely with scenario-based tests
- To create shared understanding of requirements through executable, plain-language specifications (Correct answer)
- To automate performance and load testing
- To fully manage and orchestrate deployment pipelines
Correct answer: To create shared understanding of requirements through executable, plain-language specifications
BDD creates executable specifications in plain language that align developers, testers, and business stakeholders on expected system behavior from the start.
Question 3: In BDD, which syntax format is used to write test scenarios that both business and technical stakeholders can easily understand?
- JSON schema definitions with type annotations
- Given-When-Then scenario syntax (Correct answer)
- UML sequence diagram notation
- YAML configuration file format
Correct answer: Given-When-Then scenario syntax
Given-When-Then syntax describes behavior in plain language: Given a starting context, When an action occurs, Then an expected outcome should result.
Question 4: Which SAFe DevOps benefit does BDD most directly provide to the team?
- Significantly faster database query response times
- Lower cloud infrastructure and hosting costs
- Alignment between business requirements and automated tests from the very start (Correct answer)
- Elimination of sprint review ceremonies
Correct answer: Alignment between business requirements and automated tests from the very start
BDD ensures automated tests directly verify business requirements, eliminating the gap between what was specified and what was actually built.
Question 5: In SAFe, what does Acceptance Test-Driven Development (ATDD) add beyond standard TDD?
- It focuses development exclusively on unit-level tests
- It involves customers and stakeholders in defining acceptance criteria before development begins (Correct answer)
- It automates the deployment pipeline based on test results
- It replaces sprint retrospectives with test review sessions
Correct answer: It involves customers and stakeholders in defining acceptance criteria before development begins
ATDD extends TDD by having customers and stakeholders define acceptance criteria upfront, which then become the automated acceptance tests that verify completion.
Question 6: Which tool category is commonly used in SAFe teams to execute BDD scenarios as automated tests?
- Container orchestration platforms like Kubernetes
- BDD frameworks like Cucumber or SpecFlow (Correct answer)
- Infrastructure-as-code tools like Terraform
- Pipeline orchestration tools like Jenkins
Correct answer: BDD frameworks like Cucumber or SpecFlow
Cucumber and SpecFlow are popular BDD frameworks that parse Given-When-Then feature files and execute them as automated acceptance tests.
In Test-Driven Development (TDD), what is the correct Red-Green-Refactor sequence?