An Agile team is developing a microservices-based application. The team responsible for the 'Order' service needs to perform integration testing, but the 'Payment' service, which it depends on, is unstable and frequently unavailable in the shared development environment. This is causing significant delays and blocking the CI pipeline. Which approach provides the most effective and immediate solution to unblock the 'Order' service team and stabilize their CI pipeline?
Answer and explanation
Correct answer: B
Service virtualization is the ideal solution for this common microservices challenge. It allows the 'Order' service team to create a virtual service that mimics the behavior, data, and performance of the real 'Payment' service. This decouples the teams, unblocks the CI pipeline, and allows for predictable, repeatable integration testing without relying on the availability of the actual dependent service. Waiting causes delays, skipping tests introduces risk, and using simple stubs may not be sufficient for stateful integration scenarios.
Question 2
A mature Agile team follows Test-Driven Development (TDD) principles rigorously. A developer is tasked with implementing a new feature. According to the Red-Green-Refactor cycle of TDD, what is the very first action the developer must take?
Answer and explanation
Correct answer: C
The TDD cycle is strictly defined as Red-Green-Refactor. The 'Red' phase comes first, which involves writing a unit test for a piece of functionality that does not yet exist. This test must fail (turn red) when run, proving that the test works and the functionality is not yet implemented. Only after this failing test is created does the developer move to the 'Green' phase of writing the minimum amount of production code to make the test pass.
Question 3
Multiple answers
During a backlog refinement session for a financial application, the team is analyzing the following user story: "As a customer, I want to view my transaction history so that I can track my spending." Which TWO of the following are the most effective, testable acceptance criteria for this story? (Select TWO).
Answer and explanation
Correct answers: B, D
This is a specific, verifiable, and testable criterion that defines a key behavior of the feature.
This is a specific, verifiable, and testable criterion that defines the required data elements for the feature.
Question 4
True or False: In a Keyword-Driven Testing framework, keywords should primarily be implemented to represent low-level UI interactions like 'clickButton' or 'setTextField', as this provides the most granular control for test automation.
Answer and explanation
Correct answer: B
This is false. A major benefit of Keyword-Driven Testing is abstraction. Keywords should represent business-level actions (e.g., 'loginWithValidCredentials', 'addProductToCart') rather than low-level UI interactions. This makes tests more readable, maintainable, and resilient to minor UI changes. The low-level interactions are encapsulated within the implementation of the business-level keywords.
Question 5
Case Study
A retail company, 'GlobalMart', is transitioning to an Agile model for its e-commerce platform. The development team is organized into two-week sprints. They have a CI/CD pipeline that automatically builds and deploys the application to a staging environment after every commit to the main branch. The pipeline currently runs a suite of unit tests, which completes in under 5 minutes.
The QA team has built a separate, extensive suite of automated end-to-end UI tests using Selenium. This suite takes over 3 hours to run. The leadership team is pushing for faster feedback and wants to integrate these UI tests directly into the main CI pipeline to run on every commit. The technical testers on the team have raised concerns about this approach, arguing it will drastically slow down the feedback loop for developers.
Problem
The current setup provides slow feedback on system-level regressions, but integrating the full UI suite into the primary CI pipeline would violate the principle of fast feedback. The team needs a strategy that balances the need for comprehensive regression testing with the need for a rapid CI cycle for developers.
Question
Given the situation at GlobalMart, which strategy represents the most effective and balanced approach to integrating automated testing into their CI/CD process?
Answer and explanation
Correct answer: B
This strategy provides the best balance. The 'commit' pipeline maintains the fast feedback loop essential for developers, running quick checks like unit and API tests. The 'nightly' pipeline ensures that the comprehensive but slow UI regression suite is still run regularly, providing broader coverage without blocking the primary development workflow. This tiered approach is a standard best practice for managing tests with different execution times in a CI/CD context.
Question 6
A tester is participating in a code review for a new function. They notice the code has a high cyclomatic complexity and lacks comments, making it difficult to understand the logic. This is an example of the team incurring what?
Answer and explanation
Correct answer: C
Technical debt refers to the implied cost of rework caused by choosing an easy (limited) solution now instead of using a better approach that would take longer. Complex, hard-to-maintain code is a classic form of technical debt. While it might function correctly now, it will be more costly and difficult to modify or debug in the future.
Question 7
A team is adopting Behavior-Driven Development (BDD). They are writing scenarios in Gherkin format. Which part of the Gherkin Given-When-Then structure is used to describe the initial state or context before a user action takes place?
Answer and explanation
Correct answer: A
The Given step in a Gherkin scenario is used to establish the preconditions and initial context. It sets up the state of the system before the action described in the When step is performed. For example, 'Given I am logged in as a premium user'.
Question 8
An Agile team wants to use personas to improve their testing. They create a persona for "Sarah," a 35-year-old busy professional who primarily uses the mobile app during her commute. How does creating this persona most directly aid the technical tester?
Answer and explanation
Correct answer: B
Personas provide context about how, when, and where a user will interact with the system. For the persona 'Sarah', who uses the app during her commute, the tester can derive critical non-functional test scenarios. These include testing how the app behaves with intermittent or switching network connectivity (e.g., Wi-Fi to cellular), how it handles interruptions like phone calls, and its performance on a mobile device with other apps running. This context is invaluable for designing realistic and relevant tests.
Question 9
Multiple answers
A project is using a Data-Driven Testing approach for automating the testing of a loan application form. The test script is designed to read data from an external spreadsheet. What are the primary benefits of this approach? (Select TWO).
Answer and explanation
Correct answers: B, C
This is a key benefit. Once the framework is built, new test variations can be added by non-technical team members, increasing collaboration and test coverage.
This separation is the core concept of data-driven testing. It means a single script can execute hundreds of tests, and data changes don't require code changes.
Question 10
During an exploratory testing session on a new mobile banking feature, a tester discovers a critical security vulnerability. According to best practices for Agile testing, what is the most appropriate immediate action?
Answer and explanation
Correct answer: B
In Agile, rapid communication is key, especially for critical issues. The best practice is to immediately inform the key stakeholders (developer, PO) to ensure swift awareness and action. This verbal communication should be immediately followed by formal documentation in the defect tracking system to ensure the issue is officially recorded, prioritized, and not forgotten. Waiting for a scheduled meeting would introduce unnecessary delay and risk.