C.To find defects before the software is released to the customer.
D.To design the user interface.
Correct Answer: To find defects before the software is released to the customer.
Explanation:
Software testing is a process of executing a program or application with the intent of finding software bugs. While it can't prove the complete absence of errors, its main goal is to identify and report them so they can be fixed before release.
Incorrect! Try again.
2In the context of software testing, what is a 'test case'?
Fundamentals of software testing
Easy
A.A bug found during testing.
B.A piece of code that is being tested.
C.A report summarizing the testing process.
D.A set of conditions or variables to determine if a system satisfies requirements.
Correct Answer: A set of conditions or variables to determine if a system satisfies requirements.
Explanation:
A test case specifies the inputs, execution conditions, testing procedure, and expected results to verify a specific feature or functionality of a software application.
Incorrect! Try again.
3Verifying that a user can successfully log in with a valid username and password is an example of what type of testing?
Functional and Non-Functional Software Testing
Easy
A.Usability Testing
B.Performance Testing
C.Non-Functional Testing
D.Functional Testing
Correct Answer: Functional Testing
Explanation:
Functional testing validates the software system against the functional requirements. It checks what the system does, such as user login, data entry, and other core functionalities.
Incorrect! Try again.
4Which of the following is an example of Non-Functional Testing?
Functional and Non-Functional Software Testing
Easy
A.Checking how fast a webpage loads.
B.Checking if the 'Submit' button works on a form.
C.Ensuring a user can add an item to a shopping cart.
D.Verifying that a search feature returns correct results.
Correct Answer: Checking how fast a webpage loads.
Explanation:
Non-Functional testing checks how the system performs. Aspects like performance (speed), usability, reliability, and security are non-functional attributes.
Incorrect! Try again.
5Which testing technique is also known as 'glass-box' or 'structural' testing because it requires knowledge of the internal code?
Testing Techniques: Black box, White box
Easy
A.White box testing
B.Black box testing
C.Grey box testing
D.Ad-hoc testing
Correct Answer: White box testing
Explanation:
White box testing is called 'glass-box' or 'structural' testing because the tester has full visibility into the internal code structure and logic of the application to design test cases.
Incorrect! Try again.
6In black box testing, the tester has knowledge of the...?
Testing Techniques: Black box, White box
Easy
A.Software requirements and functionality only.
B.Both the source code and the requirements.
C.The database structure only.
D.Internal source code and logic.
Correct Answer: Software requirements and functionality only.
Explanation:
Black box testing focuses on the external behavior of the software without any knowledge of the internal implementation. It's based purely on what the system is supposed to do.
Incorrect! Try again.
7What is the primary purpose of the Equivalence Partitioning technique?
Testing Techniques: Equivalence partitioning
Easy
A.To test every possible input value.
B.To test the internal logic of the code.
C.To test the user interface design.
D.To reduce the total number of test cases to a manageable set.
Correct Answer: To reduce the total number of test cases to a manageable set.
Explanation:
Equivalence Partitioning divides input data into partitions of equivalent data. The theory is that testing one value from each partition is sufficient to cover all values within that partition, thus reducing redundancy.
Incorrect! Try again.
8If an input field accepts integers from 10 to 50, which set of values represents the best use of Boundary Value Analysis?
Testing Techniques: Boundary value
Easy
A.15, 25, 45
B.9, 10, 50, 51
C.10, 20, 30, 40, 50
D.Any single number like 30
Correct Answer: 9, 10, 50, 51
Explanation:
Boundary Value Analysis (BVA) focuses on testing the values at the boundaries of an input domain. For a range of 10-50, this includes the minimum (10), maximum (50), just below minimum (9), and just above maximum (51).
Incorrect! Try again.
9Which level of testing is typically performed first by developers to check individual code modules?
Levels of testing: Unit, Integration, System, UAT
Easy
A.Unit Testing
B.Integration Testing
C.User Acceptance Testing
D.System Testing
Correct Answer: Unit Testing
Explanation:
Unit Testing is the first level of testing where individual components or modules of the software are tested in isolation, usually by the developer who wrote the code.
Incorrect! Try again.
10What is the main goal of Integration Testing?
Levels of testing: Unit, Integration, System, UAT
Easy
A.To test the interface and interaction between two or more integrated modules.
B.To test individual functions in isolation.
C.To get final approval from the end-user.
D.To test the entire system as a whole against requirements.
Correct Answer: To test the interface and interaction between two or more integrated modules.
Explanation:
Integration Testing is performed after Unit Testing. Its purpose is to expose defects in the interfaces and interactions when different software modules are combined and tested as a group.
Incorrect! Try again.
11Testing the fully integrated application to evaluate its compliance with specified end-to-end requirements is known as...?
Levels of testing: Unit, Integration, System, UAT
Easy
A.Component Testing
B.Unit Testing
C.System Testing
D.Module Testing
Correct Answer: System Testing
Explanation:
System Testing is a level of testing that validates the complete and fully integrated software product. It evaluates the system's compliance with its specified requirements.
Incorrect! Try again.
12Who is primarily responsible for conducting User Acceptance Testing (UAT)?
Levels of testing: Unit, Integration, System, UAT
Easy
A.The developers
B.The system architects
C.The database administrators
D.The client or end-users
Correct Answer: The client or end-users
Explanation:
User Acceptance Testing (UAT) is the final phase of testing, performed by the end-users or clients, to verify that the software meets their business requirements and is acceptable for deployment.
Incorrect! Try again.
13API testing is a type of testing that focuses on the...?
Types of Software Testing: API Testing
Easy
A.Database performance and queries.
B.User interface and visual elements.
C.Business logic and data exchange layers.
D.Network connectivity and bandwidth.
Correct Answer: Business logic and data exchange layers.
Explanation:
API (Application Programming Interface) testing validates the functionality of the business logic layer without involving the user interface. It checks if the APIs meet expectations for functionality, reliability, performance, and security.
Incorrect! Try again.
14Testing an application on different browsers like Chrome, Firefox, and Safari is known as...?
Types of Software Testing: Web Testing
Easy
A.Unit Testing
B.Cross-Browser Testing
C.Load Testing
D.Usability Testing
Correct Answer: Cross-Browser Testing
Explanation:
Cross-Browser Testing is a specific type of Web Testing that ensures the web application works as expected across different web browsers, maintaining its functionality and appearance.
Incorrect! Try again.
15What is the primary feature of Selenium IDE?
Automation Testing: Selenium IDE: Installation, record & playback tests
Easy
A.Record and Playback of user interactions with a browser.
B.Performing security vulnerability scans.
C.Testing mobile applications on physical devices.
D.Writing complex test scripts in Java or Python.
Correct Answer: Record and Playback of user interactions with a browser.
Explanation:
Selenium IDE is a simple tool, primarily a browser extension, that allows users to record their actions in a web browser and then play them back as an automated test. It's ideal for beginners and creating quick regression tests.
Incorrect! Try again.
16How is Selenium IDE typically installed?
Automation Testing: Selenium IDE: Installation, record & playback tests
Easy
A.As a command-line tool.
B.As a standalone desktop application.
C.As a browser extension for Chrome or Firefox.
D.As a library within a programming project.
Correct Answer: As a browser extension for Chrome or Firefox.
Explanation:
Selenium IDE is implemented as a browser add-on or extension, which makes it very easy to install and access directly from the browser's toolbar for recording and playing back tests.
Incorrect! Try again.
17What is a key difference between Selenium IDE and Selenium WebDriver?
Introduction to Selenium WebDriver (conceptual)
Easy
A.IDE is more powerful and complex than WebDriver.
B.IDE is for mobile testing, while WebDriver is for web testing.
C.WebDriver is a physical device, while IDE is software.
D.WebDriver allows test automation using programming languages, while IDE is primarily record-and-playback.
Correct Answer: WebDriver allows test automation using programming languages, while IDE is primarily record-and-playback.
Explanation:
Selenium WebDriver provides a programming interface (API) for creating and executing test scripts using languages like Java, C#, Python, etc. This offers more flexibility and power than the simpler, codeless record-and-playback model of Selenium IDE.
Incorrect! Try again.
18What is the primary goal of Performance Testing?
Performance Testing basics
Easy
A.To find functional bugs in the user interface.
B.To check for spelling mistakes in the application text.
C.To determine the speed, responsiveness, and stability of a system.
D.To ensure the code is written according to standards.
Correct Answer: To determine the speed, responsiveness, and stability of a system.
Explanation:
Performance Testing is a non-functional testing type that measures how a system performs in terms of key metrics like response time, throughput, and resource utilization, especially under heavy load.
Incorrect! Try again.
19Which of the following is a primary objective of Security Testing?
Security Testing basics
Easy
A.To test the application on different browsers.
B.To check the loading speed of the application.
C.To verify that all buttons on the screen work.
D.To identify threats and vulnerabilities in the software.
Correct Answer: To identify threats and vulnerabilities in the software.
Explanation:
Security Testing is a process intended to uncover flaws in the security mechanisms of an information system that protect data and maintain functionality as intended. Its main goal is to find vulnerabilities before malicious attackers do.
Incorrect! Try again.
20What is a key benefit of using AI in software testing?
Introduction to AI-assisted testing tools (overview)
Easy
A.Writing the user documentation.
B.Designing the software's database schema.
C.Deploying the software to production servers.
D.Automating the creation and maintenance of test cases.
Correct Answer: Automating the creation and maintenance of test cases.
Explanation:
AI-assisted testing tools leverage machine learning to analyze an application, automatically generate relevant test cases, identify redundant tests, and even 'self-heal' broken test scripts when the UI changes, significantly speeding up the testing process.
Incorrect! Try again.
21A system has an input field that accepts a percentage value from 0 to 100, inclusive. Using the three-point Boundary Value Analysis technique, which set of test values would be most appropriate?
Testing Techniques: Boundary value
Medium
A.-1, 0, 1, 99, 100, 101
B.1, 50, 99
C.0, 1, 99, 100
D.0, 50, 100
Correct Answer: -1, 0, 1, 99, 100, 101
Explanation:
Three-point Boundary Value Analysis involves testing values at the boundary, just inside the boundary, and just outside the boundary. For the range [0, 100], the lower boundary is 0 (test values: -1, 0, 1) and the upper boundary is 100 (test values: 99, 100, 101).
Incorrect! Try again.
22During testing, a defect is found where data is incorrectly passed between the 'User Authentication' module and the 'Order Processing' module, causing incorrect user details to be associated with an order. At which level of testing would this defect most likely be discovered?
Levels of testing: Unit, Integration, System, UAT
Medium
A.Unit Testing
B.Acceptance Testing
C.Integration Testing
D.System Testing
Correct Answer: Integration Testing
Explanation:
Integration Testing specifically focuses on verifying the interfaces and interactions between different software modules or components. A defect in data passing between two modules is a classic example of an integration issue.
Incorrect! Try again.
23A software requirements specification states, "The system's search results page must load in under 2 seconds with up to 1,000 concurrent users." Testing this requirement falls under which category?
Functional and Non-Functional Software Testing
Medium
A.Non-Functional Testing
B.Regression Testing
C.Unit Testing
D.Functional Testing
Correct Answer: Non-Functional Testing
Explanation:
This requirement describes how well the system performs a function (its performance characteristics like speed and capacity), not what the system does. This is the definition of Non-Functional Testing, specifically Performance Testing.
Incorrect! Try again.
24A tester is given the source code of a function and is tasked with creating test cases to ensure that every possible if-else condition branch has been executed at least once. Which testing technique is being applied?
Testing Techniques: Black box, White box
Medium
A.White-box Testing
B.Boundary Value Analysis
C.Equivalence Partitioning
D.Black-box Testing
Correct Answer: White-box Testing
Explanation:
White-box testing involves analyzing the internal structure and logic of the code. Ensuring that all decision branches are executed is a specific white-box technique known as Branch Coverage or Decision Coverage.
Incorrect! Try again.
25A quality assurance team needs to automate a complex test suite that requires conditional logic (e.g., if-else statements), reading data from a database, and running tests in parallel across Chrome, Firefox, and Safari. Why is Selenium WebDriver more suitable than Selenium IDE for this task?
Introduction to Selenium WebDriver (conceptual)
Medium
A.Because Selenium IDE is more expensive to use than WebDriver.
B.Because Selenium IDE cannot record user actions in a browser.
C.Because WebDriver can only run tests on a single browser at a time.
D.Because WebDriver supports programming languages, allowing for complex logic and integrations.
Correct Answer: Because WebDriver supports programming languages, allowing for complex logic and integrations.
Explanation:
Selenium WebDriver uses language bindings (Java, Python, C#, etc.) that allow testers to write sophisticated, robust test scripts with programming constructs, external library integrations (like databases), and advanced test execution frameworks. Selenium IDE is primarily a record-and-playback tool with limited logic capabilities.
Incorrect! Try again.
26A registration form has a field for 'Age' that accepts integer values from 18 to 99. Using Equivalence Partitioning, which set of values represents the most logical selection of test cases?
Testing Techniques: Equivalence partitioning
Medium
A.18, 50, 99
B.15, 45, 105
C.17, 18, 99, 100
D.17, 19, 98, 100
Correct Answer: 15, 45, 105
Explanation:
Equivalence Partitioning divides input data into classes from which test cases can be derived. For the age range 18-99, there are three main partitions: one invalid partition below the range (age < 18), one valid partition (18 ≤ age ≤ 99), and one invalid partition above the range (age > 99). The set {15, 45, 105} picks a single representative value from each of these three partitions.
Incorrect! Try again.
27When testing a RESTful API endpoint DELETE /api/products/123, what is the most important aspect for a tester to verify to confirm a successful operation?
Types of Software Testing: API Testing
Medium
A.The API server returns a 200 OK or 204 No Content status code, and a subsequent GET request for product 123 returns a 404 Not Found.
B.The web UI no longer displays product 123.
C.The response body contains a JSON object with the message {"status": "pending"}.
D.The API server returns a 500 Internal Server Error status code.
Correct Answer: The API server returns a 200 OK or 204 No Content status code, and a subsequent GET request for product 123 returns a 404 Not Found.
Explanation:
Effective API testing validates the contract. For a DELETE operation, this means checking for a success status code (like 200 or 204) and, crucially, verifying the state change by confirming the resource is actually gone (e.g., via a follow-up GET request that should now fail).
Incorrect! Try again.
28A team wants to determine the maximum number of users their application can handle before it crashes or its performance degrades to an unacceptable level. Which type of performance testing should they conduct?
Performance Testing basics
Medium
A.Stress Testing
B.Load Testing
C.Soak Testing
D.Spike Testing
Correct Answer: Stress Testing
Explanation:
Stress Testing is designed to determine the system's robustness and breaking point by subjecting it to extreme loads, often well beyond its expected operational capacity. Load Testing, in contrast, evaluates performance under expected or normal peak loads.
Incorrect! Try again.
29The primary goal of User Acceptance Testing (UAT) is to:
Levels of testing: Unit, Integration, System, UAT
Medium
A.Verify that the integrated software components work together without errors.
B.Confirm that the software meets the business requirements and is fit for use by the end-users.
C.Ensure that all individual functions work correctly in isolation.
D.Find as many bugs as possible before the release.
Correct Answer: Confirm that the software meets the business requirements and is fit for use by the end-users.
Explanation:
UAT is the final phase of testing, performed by clients or end-users, to validate that the system works for them in a real-world context and fulfills the agreed-upon business needs. It is less about finding low-level bugs and more about validating overall business fitness.
Incorrect! Try again.
30A security tester submits the string <script>alert('XSS')</script> into a comment field on a web page. After submission, a browser alert pops up. What vulnerability is the tester trying to identify?
Security Testing basics
Medium
A.SQL Injection
B.Insecure Deserialization
C.Cross-Site Request Forgery (CSRF)
D.Cross-Site Scripting (XSS)
Correct Answer: Cross-Site Scripting (XSS)
Explanation:
Cross-Site Scripting (XSS) is a vulnerability where an attacker injects malicious scripts into content from otherwise trusted websites. When the script is executed in a victim's browser, it can lead to session hijacking or data theft. The use of <script> tags is a classic method for testing for XSS.
Incorrect! Try again.
31Which of the following is a test scenario primarily unique to mobile application testing compared to traditional desktop web testing?
Types of Software Testing: Mobile Testing
Medium
A.Ensuring the application is compatible with the latest version of the Google Chrome browser.
B.Verifying that hyperlinks navigate to the correct pages.
C.Checking that form submissions are correctly validated on the server.
D.Testing the application's behavior during a network switch from Wi-Fi to a 4G/5G cellular network.
Correct Answer: Testing the application's behavior during a network switch from Wi-Fi to a 4G/5G cellular network.
Explanation:
Mobile devices constantly change network conditions (Wi-Fi, cellular, offline). Testing for interruptions, network handovers, and varying latency is a critical and unique aspect of mobile testing that is not a primary concern for stationary desktop applications.
Incorrect! Try again.
32The testing principle of "Defect clustering" suggests that:
Fundamentals of software testing
Medium
A.Exhaustive testing (testing all combinations of inputs and preconditions) is not feasible.
B.Testing can only show the presence of defects, not their absence.
C.A small number of modules or components will usually contain the majority of the defects.
D.Tests should be run by an independent team for better results.
Correct Answer: A small number of modules or components will usually contain the majority of the defects.
Explanation:
Defect clustering, which is an application of the Pareto Principle (80/20 rule) to software testing, observes that a large percentage of defects are often concentrated in a small, complex part of the system. This helps teams focus their testing efforts where they are most likely to be effective.
Incorrect! Try again.
33What is a primary limitation of using Selenium IDE's record and playback feature for long-term, maintainable test automation?
Automation Testing: Selenium IDE: Installation, record & playback tests
Medium
A.It requires advanced knowledge of JavaScript to operate.
B.It is incapable of testing web applications, only desktop applications.
C.Tests created by it can be brittle and may break easily with minor UI changes.
D.It cannot be installed on Firefox or Chrome browsers.
Correct Answer: Tests created by it can be brittle and may break easily with minor UI changes.
Explanation:
Record and playback tools often rely on specific locators (like absolute XPath) that are prone to breaking when developers change the UI layout or element attributes. This makes the recorded test scripts "brittle" and hard to maintain over the life of a project.
Incorrect! Try again.
34What is a key benefit of using AI-assisted tools for test creation and maintenance?
Introduction to AI-assisted testing tools (overview)
Medium
A.They can automatically heal test scripts by identifying and updating locators when the UI changes.
B.They completely eliminate the need for human QA engineers.
C.They function exclusively by recording a user's manual actions.
D.They guarantee the software will be 100% bug-free upon release.
Correct Answer: They can automatically heal test scripts by identifying and updating locators when the UI changes.
Explanation:
One of the most powerful features of modern AI-assisted testing tools is "self-healing." When a UI element's locator changes (e.g., its ID is modified), the AI can analyze the page, find the intended element based on other attributes, and automatically update the test script, significantly reducing maintenance effort.
Incorrect! Try again.
35A development team uses a bottom-up approach for integration testing. What essential components must they create to test the integrated modules when the higher-level, controlling modules do not yet exist?
Levels of testing: Unit, Integration, System, UAT
Medium
A.Drivers
B.Test plans
C.Stubs
D.User profiles
Correct Answer: Drivers
Explanation:
In a bottom-up integration strategy, lower-level modules are integrated first. To test this cluster, a 'driver' is created. A driver is a test program that calls the functions of the lower-level module and simulates the behavior of a yet-to-be-developed higher-level module. Stubs are used in top-down integration.
Incorrect! Try again.
36When performing cross-browser testing for a modern web application, a tester finds that a CSS Grid layout works perfectly in Chrome and Firefox but appears broken in Internet Explorer 11. This type of defect is primarily a failure of:
Types of Software Testing: Web Testing
Medium
A.Security
B.Performance
C.Functionality
D.Compatibility
Correct Answer: Compatibility
Explanation:
Compatibility testing verifies that the software works as expected across different environments. In web testing, this prominently includes different browsers, operating systems, and screen resolutions. An issue that appears in one browser but not others is a classic compatibility defect.
Incorrect! Try again.
37A developer writes a set of unit tests that successfully executes every single line of executable code within a specific function. What level of code coverage has been achieved?
Testing Techniques: White box
Medium
A.Path Coverage
B.Condition Coverage
C.Branch Coverage
D.Statement Coverage
Correct Answer: Statement Coverage
Explanation:
Statement Coverage is a white-box testing metric that measures the percentage of executable statements in the source code that have been exercised by the test suite. Achieving 100% statement coverage means every line of code has been run at least once.
Incorrect! Try again.
38A team conducts tests to ensure that after a bug fix, no new defects have been introduced into previously working parts of the software. What type of testing is this?
Functional and Non-Functional Software Testing
Medium
A.Smoke Testing
B.Regression Testing
C.Usability Testing
D.Alpha Testing
Correct Answer: Regression Testing
Explanation:
Regression Testing is a type of functional testing performed to ensure that a change, such as a bug fix or a new feature, has not adversely affected existing functionalities. It involves re-running a subset of existing tests to check for unintended side effects.
Incorrect! Try again.
39System Testing is primarily concerned with which two aspects of the software?
Levels of testing: Unit, Integration, System, UAT
Medium
A.Code-level logic and individual algorithms.
B.Interaction between pairs of integrated modules.
C.Verifying the system against the functional requirements and assessing its non-functional characteristics.
D.The user interface look-and-feel and business workflow acceptance.
Correct Answer: Verifying the system against the functional requirements and assessing its non-functional characteristics.
Explanation:
System Testing is a black-box testing level that evaluates the complete and fully integrated software product. Its main purpose is to verify that the system meets the specified functional requirements (what it does) and non-functional requirements (how well it does it, e.g., performance, security) as a whole.
Incorrect! Try again.
40In the context of performance testing, what does the metric 'latency' or 'response time' measure?
Performance Testing basics
Medium
A.The percentage of requests that result in an error.
B.The time elapsed between a user sending a request and the application providing a complete response.
C.The total number of requests the server can handle per second.
D.The amount of memory used by the application under load.
Correct Answer: The time elapsed between a user sending a request and the application providing a complete response.
Explanation:
Latency, often used interchangeably with response time, is a critical performance metric. It measures the total time it takes for a single request to be processed, from the moment it is sent by the client until the client receives the full response from the server.
Incorrect! Try again.
41For the following code snippet, what is the minimum number of test cases required to achieve 100% Modified Condition/Decision Coverage (MC/DC)?
java
if ((userIsAdmin || userIsEditor) && (document.isPublished() && !document.isLocked())) {
// grant access
}
Testing Techniques: White box
Hard
A.3
B.8
C.5
D.4
Correct Answer: 5
Explanation:
Let the conditions be A (userIsAdmin), B (userIsEditor), C (document.isPublished()), and D (!document.isLocked()). The expression is (A || B) && (C && D). MC/DC requires that every condition is shown to independently affect the outcome. To satisfy this, we need a baseline case and a variation for each condition:
D affects outcome: A=T, B=F, C=T, D=F -> (T || F) && (T && F) -> False
This set of 5 test cases ensures each of the four conditions (A, B, C, D) independently affects the decision's outcome, fulfilling the MC/DC criteria.
Incorrect! Try again.
42A shipping cost calculator has two interdependent input fields: weight (0.1kg to 50.0kg) and country (a dropdown). If country is "USA", a state field appears, which is required. A special handling fee is applied if weight > 25.0kg. Which test case design strategy is most efficient and effective for testing the interaction between the weight-based fee and the country-specific UI logic?
Testing Techniques: Boundary value, Equivalence partitioning
Hard
A.Use pairwise testing to generate combinations for all possible countries with a small set of representative weights.
B.Test one valid weight (e.g., 10.0kg) for every country in the list, and separately test all weight boundaries for one country (e.g., "Canada").
C.Test the weight boundaries (0.0, 0.1, 25.0, 25.1, 50.0, 50.1) for "USA" and one other country, ensuring the state field's appearance/disappearance is checked in each case.
D.Focus on testing the state field logic with a fixed weight (e.g., 5.0kg) and then separately test the weight boundaries with a fixed country that is not "USA".
Correct Answer: Test the weight boundaries (0.0, 0.1, 25.0, 25.1, 50.0, 50.1) for "USA" and one other country, ensuring the state field's appearance/disappearance is checked in each case.
Explanation:
This problem involves both data and control flow interdependencies. The most critical interactions occur at the boundaries. The most effective strategy is to combine Boundary Value Analysis for the continuous variable (weight) with Equivalence Partitioning for the discrete variable (country). The two most important partitions for country are "USA" (which triggers a UI change) and any other country (which does not). By testing all weight boundaries against these two partitions, you cover the data-driven logic (fee calculation) and the UI logic (state field visibility) simultaneously and efficiently, uncovering potential interaction bugs.
Incorrect! Try again.
43A system consists of a UserService microservice and an OrderService microservice. UserService exposes an endpoint that returns user details. OrderService calls this endpoint to validate a user before creating an order. A bug is introduced in UserService where the JSON field for user ID changes from userId to user_id. Unit tests for both services pass, as the OrderService unit tests use a mock of UserService that hasn't been updated. At which level of testing would this defect MOST LIKELY be found first?
Levels of testing: Unit, Integration, System, UAT
Hard
A.System Testing, when a full end-to-end order creation flow is executed.
B.Component Integration Testing, specifically between OrderService and a live instance of UserService.
C.Unit Testing, if the OrderService's mock was generated from an up-to-date API specification.
D.User Acceptance Testing (UAT), when a business user attempts to place an order.
Correct Answer: Component Integration Testing, specifically between OrderService and a live instance of UserService.
Explanation:
This is a classic integration defect. The 'contract' between the two services has been broken. Unit tests passed because they test the components in isolation (with mocks). While System and UAT would eventually find the bug, the most precise and earliest level to detect this kind of inter-service communication failure is during Component Integration Testing, where the primary goal is to verify the interfaces and interactions between collaborating components.
Incorrect! Try again.
44During a performance test, a system's throughput increases linearly with the user load up to 500 concurrent users, at which point the throughput plateaus. However, the average CPU utilization on the application server never exceeds 40%, and memory usage is stable. Which of the following is the most likely bottleneck constraining the system's performance?
Performance Testing basics
Hard
A.The application is single-threaded and cannot utilize more than one CPU core effectively.
B.A memory leak that is slowly consuming resources, which hasn't become critical yet.
C.Network saturation between the load generator and the application server.
D.A downstream dependency, such as a database connection pool or a third-party API, has reached its maximum capacity.
Correct Answer: A downstream dependency, such as a database connection pool or a third-party API, has reached its maximum capacity.
Explanation:
The key evidence is that throughput has hit a ceiling, but the primary application server's resources (CPU, memory) are underutilized. This strongly suggests the bottleneck is external to the application server itself. A saturated database connection pool or a rate-limited third-party API are common examples of downstream dependencies that would limit the overall system throughput without maxing out the local application's CPU.
Incorrect! Try again.
45A web application allows users to upload a profile picture. A security tester bypasses the client-side validation and successfully uploads a file named profile.php.jpeg containing PHP code. The server is configured to execute any file with a .php extension but determines the file type to execute based on the final extension in the filename. Later, when another user views the profile, the uploaded PHP code executes on the server. This describes a successful exploitation of which vulnerability?
Security Testing basics
Hard
A.Path Traversal, by manipulating the filename to access other directories.
B.SQL Injection, by embedding SQL commands within the file's metadata.
C.Cross-Site Scripting (XSS), via a malicious image file.
D.Unrestricted File Upload, leading to Remote Code Execution (RCE).
Correct Answer: Unrestricted File Upload, leading to Remote Code Execution (RCE).
Explanation:
This is a classic Unrestricted File Upload vulnerability. The application failed to properly validate the file on the server-side (e.g., by checking MIME type or enforcing a strict, safe filename). The use of a double extension (.php.jpeg) is a common trick to bypass simple extension checks. Because the malicious file containing server-side code (PHP) was uploaded and later executed by the server, this constitutes Remote Code Execution (RCE), which is one of the most critical security vulnerabilities.
Incorrect! Try again.
46Why is the Selenium WebDriver's architectural separation of the test script (e.g., in Java/Python) from the browser-specific driver (e.g., chromedriver, geckodriver) crucial for creating robust and maintainable tests, especially when compared to tools that inject JavaScript into the browser?
Introduction to Selenium WebDriver (conceptual)
Hard
A.It enables direct manipulation of the browser's internal C++ objects, offering more powerful automation capabilities than JavaScript-based tools.
B.It allows the test script to run on a separate machine from the browser, which improves performance through parallel execution.
C.It decouples the test logic from the browser's implementation, allowing the same test script to run against different browsers by simply swapping the driver, and it avoids being sandboxed by the web application's JavaScript environment.
D.It ensures all browser interactions are compiled into native machine code, which eliminates test flakiness caused by timing issues.
Correct Answer: It decouples the test logic from the browser's implementation, allowing the same test script to run against different browsers by simply swapping the driver, and it avoids being sandboxed by the web application's JavaScript environment.
Explanation:
The core architectural principle of WebDriver is the client-server model mediated by the driver. This separation is key. First, it enables cross-browser testing: your Java code doesn't change whether you're targeting Chrome or Firefox. Second, tools that inject JavaScript (like Selenium RC) run within the same security sandbox as the application under test. This can lead to conflicts and security restrictions. WebDriver's approach, using browser automation APIs provided by the vendor (via the driver), operates at a privileged level, mimicking a real user more closely and avoiding these sandbox issues.
Incorrect! Try again.
47A high-frequency trading platform requires that 99.9% of all transactions be completed in under 10ms (a performance requirement). The system also has a functional requirement for data integrity, ensuring no financial data is ever lost. During stress testing, the system correctly processes all transactions with no data loss, but the response time for 2% of transactions exceeds 10ms. How should this result be interpreted?
Functional and Non-Functional Software Testing
Hard
A.The functional requirements have passed, so the system can be approved for release while the performance team works on optimizations.
B.A non-functional (performance) requirement has failed, which in this specific domain should also be treated as a critical functional failure because the timeliness of the transaction is part of its core correctness.
C.The system has a reliability issue, as it does not perform consistently under stress.
D.Only a non-functional requirement has failed. The system is functionally correct since no data was lost.
Correct Answer: A non-functional (performance) requirement has failed, which in this specific domain should also be treated as a critical functional failure because the timeliness of the transaction is part of its core correctness.
Explanation:
This question explores the often-blurry line between functional and non-functional testing in specific domains. For a high-frequency trading platform, a transaction that is 'correct' but 'late' is effectively a failure. The performance attribute (speed) is so integral to the function's purpose that its failure constitutes a functional defect. The requirement being stated as a quantifiable metric (99.9% in 10ms) makes it a testable, contractual part of the system's function.
Incorrect! Try again.
48When performing contract testing on a REST API using a consumer-driven approach (e.g., Pact), what is the fundamental limitation of this technique?
Types of Software Testing: API Testing
Hard
A.It validates the structure (the 'contract') of the API response, but not the correctness of the data values within that structure.
B.It is only effective for testing GET requests and cannot handle state-changing POST or PUT requests.
C.It requires both the consumer and provider to use the same programming language.
D.It cannot be used to test non-functional requirements like API response time or security.
Correct Answer: It validates the structure (the 'contract') of the API response, but not the correctness of the data values within that structure.
Explanation:
Consumer-Driven Contract Testing is excellent for preventing integration issues caused by structural changes (e.g., a field is renamed or a data type changes). However, it does not, by itself, verify the business logic. For example, a contract test can verify that a response contains an integer field named totalPrice, but it cannot verify if the totalPrice was calculated correctly. That level of validation requires functional or integration tests that check the business logic.
Incorrect! Try again.
49You are testing a native mobile application that relies heavily on gesture controls (e.g., swipe, pinch-to-zoom, long press). Which of the following represents the most significant challenge for creating reliable, automated tests for these features?
Types of Software Testing: Mobile Testing
Hard
A.It is impossible to automate multi-touch gestures (like pinch-to-zoom) using standard frameworks like Appium.
B.Screen readers and other accessibility tools often interfere with gesture recognition during automated tests.
C.The precision, timing, and velocity of simulated gestures can vary significantly across different devices, OS versions, and automation frameworks, leading to flaky tests.
D.Automated test scripts for gestures consume significantly more battery power than other types of interaction, limiting test run duration.
Correct Answer: The precision, timing, and velocity of simulated gestures can vary significantly across different devices, OS versions, and automation frameworks, leading to flaky tests.
Explanation:
Unlike a simple 'click', a gesture is a complex interaction defined by a path, duration, and speed. Emulating these consistently in an automated script is very difficult. Minor differences in screen resolution, pixel density, or the OS's event processing loop can cause a simulated gesture that works on one device to fail on another. This inconsistency is a primary source of test flakiness for gesture-based automation, making it a much harder problem than simple element tapping.
Incorrect! Try again.
50In the context of a large, complex application with thousands of automated tests running in a CI/CD pipeline, what is the most advanced application of AI-assisted testing to optimize the feedback loop for developers?
Introduction to AI-assisted testing tools (overview)
Hard
A.Predictive Test Selection: Analyzing the source code changes in a commit to predict and run only the minimal subset of tests that are impacted, drastically reducing test execution time.
B.AI-driven Test Data Generation: Creating realistic and varied test data that is more likely to uncover edge cases than manually created or simple random data.
C.Autonomous Test Creation: Having an AI agent explore the application and automatically generate new test scripts for previously untested user flows.
D.Visual Regression Testing: Using AI to detect unintended UI changes by comparing screenshots and ignoring acceptable dynamic content differences.
Correct Answer: Predictive Test Selection: Analyzing the source code changes in a commit to predict and run only the minimal subset of tests that are impacted, drastically reducing test execution time.
Explanation:
While all options are valid AI applications, Predictive Test Selection (also called Test Impact Analysis) offers the most significant optimization for the developer feedback loop in a mature CI/CD context. In large systems, running the entire test suite can take hours. By intelligently selecting only the relevant tests (e.g., the 5% of tests that cover the 2% of code that just changed), AI can provide developers with feedback in minutes instead of hours, dramatically accelerating the development and deployment cycle.
Incorrect! Try again.
51According to the ISTQB testing principles, "Exhaustive testing is impossible." In which of the following scenarios does this principle pose the most significant practical challenge for a test manager?
Fundamentals of software testing
Hard
A.A flight control software module where the input is a combination of 15 different boolean sensor readings.
B.A REST API endpoint with two mandatory query parameters, each being an enumeration of 5 string values.
C.A web form with a single text field that accepts a 10-digit account number.
D.A function that calculates the factorial of a positive integer up to 20.
Correct Answer: A flight control software module where the input is a combination of 15 different boolean sensor readings.
Explanation:
This scenario presents a problem of combinatorial explosion. With 15 boolean inputs, the total number of possible input combinations is , which equals 32,768. Testing every single combination is impractical and time-consuming, yet for safety-critical software like a flight control system, the risk associated with missing a specific combination of inputs is extremely high. This forces the test manager to rely heavily on risk-based testing strategies (like Cause-Effect Graphing or Pairwise Testing) to select a manageable subset of tests, directly confronting the challenge that exhaustive testing is impossible.
Incorrect! Try again.
52You are performing Data Flow Testing on a piece of code. You identify a path where a variable x is defined (def), then defined again before it is ever used in a computation or predicate (c-use or p-use). What type of anomaly does this represent, and what is its implication?
Testing Techniques: White box
Hard
A.An all-uses coverage gap. It indicates a path has been missed by the test suite.
B.A def-def anomaly. It indicates redundant or dead code; the value from the first definition is immediately lost without ever being used.
C.A use-def anomaly. It indicates a variable was used before it was properly defined, leading to unpredictable behavior.
D.A def-clear anomaly. It indicates the variable was cleared from memory before it could be used, leading to a potential null pointer exception.
Correct Answer: A def-def anomaly. It indicates redundant or dead code; the value from the first definition is immediately lost without ever being used.
Explanation:
Data Flow Testing focuses on the lifecycle of variables. A def-def (or DD) path is one where a variable is defined, and then redefined without any intervening use. This is an anomaly because the first assignment had no purpose. While not always a bug, it often points to a logical error, a copy-paste mistake, or dead code that can be removed, making the code cleaner and less prone to future errors.
Incorrect! Try again.
53A team is adopting a 'Sandwich' (or Hybrid) integration testing strategy for a three-layer application (UI, Business Logic, Data Access). What is the most accurate description of how this strategy is executed?
Levels of testing: Unit, Integration, System, UAT
Hard
A.The Business Logic Layer is tested first as the target integration point. Top-down integration is used for the UI layer (using drivers for the BLL), and Bottom-up integration is used for the Data Access layer (using stubs for the BLL), with both efforts proceeding in parallel.
B.The UI layer is tested first, integrated with stubs for the other two layers (Top-down).
C.The Data Access Layer is tested first, integrated with drivers that simulate calls from the other two layers (Bottom-up).
D.All three layers are integrated and tested simultaneously in one go (Big Bang).
Correct Answer: The Business Logic Layer is tested first as the target integration point. Top-down integration is used for the UI layer (using drivers for the BLL), and Bottom-up integration is used for the Data Access layer (using stubs for the BLL), with both efforts proceeding in parallel.
Explanation:
Sandwich integration is a hybrid strategy that aims to get the benefits of both top-down and bottom-up approaches. It focuses on a middle layer (in this case, the Business Logic Layer) as the primary point of integration. Testing proceeds upwards from this layer (integrating the UI) and downwards (integrating the Data Access Layer) simultaneously. This allows the most critical business logic to be tested early, and the parallel nature of the testing can save time, although it can be more complex to manage.
Incorrect! Try again.
54A Selenium IDE test fails intermittently when run. The test navigates to a page, clicks a button that triggers a background data fetch, and then asserts that a results div contains the text 'Data Loaded'. The page shows a 'Loading...' spinner while the fetch is in progress. The recorded test has no wait commands. What is the most likely reason for the intermittent failure, and which is the most robust fix?
Automation Testing: Selenium IDE: Installation, record & playback tests
Hard
A.Reason: The network speed is variable. Fix: Add a generic pause command for 10 seconds to ensure the data has enough time to load.
B.Reason: The button's ID is dynamically generated. Fix: Use the storeAttribute command to capture the ID and use it in the click command.
C.Reason: A race condition exists between the test script and the asynchronous data fetch. Fix: Add a waitForElementNotVisible command for the 'Loading...' spinner before the assertText command.
D.Reason: The browser cache is not being cleared. Fix: Add a command at the start of the test to delete all cookies.
Correct Answer: Reason: A race condition exists between the test script and the asynchronous data fetch. Fix: Add a waitForElementNotVisible command for the 'Loading...' spinner before the assertText command.
Explanation:
This is a classic timing issue with modern web apps. The test script proceeds at a fixed speed, while the AJAX call's duration varies. The intermittent failure is a tell-tale sign of a race condition. Using a fixed pause is brittle and inefficient. The most robust solution is to use an explicit wait that is tied to an observable application state. Waiting for the loading spinner to disappear is a perfect synchronization point, as it directly indicates that the asynchronous operation has completed. The test will then proceed immediately, making it both reliable and fast.
Incorrect! Try again.
55You need to write a CSS selector for an automation script that uniquely identifies the 'Login' button on a page. The button's HTML is <button id="btn-9a3c-login" class="btn primary large" type="submit">Login</button>. The ID is dynamically generated and changes on every page load. Which of the following CSS selectors is the most robust and least likely to break if other buttons are added to the page?
This is a problem of finding a stable locator amidst dynamic attributes. button[type='submit'] is not specific enough; there could be other submit buttons. button.primary.large is better but could break if the class names are changed for styling purposes. div > button:first-of-type is very brittle as it depends on the DOM structure. The selector button[id*='-login'][class*='primary'] is the most robust because it combines two pieces of information: a stable partial ID (-login is likely constant) and a key class name. This combination makes it highly specific and resilient to changes in the exact ID, other class names, or the element's position in the DOM.
Incorrect! Try again.
56A system implements a complex algorithm for calculating insurance premiums. The algorithm is proprietary and delivered as a compiled black-box library. The documentation specifies hundreds of rules based on user inputs (age, location, history, etc.). Your team has no access to the source code. In this situation, what is the most appropriate primary testing strategy?
Testing Techniques: Black box, White box
Hard
A.Non-functional testing, focusing primarily on the performance and security of the black-box library.
B.Black-box techniques such as Equivalence Partitioning, Boundary Value Analysis, and Decision Table Testing to systematically verify the documented rules and boundaries.
C.White-box techniques such as Statement and Branch Coverage by decompiling the library to analyze the source code.
D.Integration testing, focusing only on the data passed to and received from the library without validating the calculation logic itself.
Correct Answer: Black-box techniques such as Equivalence Partitioning, Boundary Value Analysis, and Decision Table Testing to systematically verify the documented rules and boundaries.
Explanation:
The defining constraint of the problem is the lack of access to the source code, which immediately rules out any white-box techniques. Decompiling the library (Option B) is often illegal and technically difficult. While performance/security (Option C) and integration (Option D) are important, the primary task is to verify the core functional correctness of the complex calculations. Given the detailed documentation of rules, systematic black-box techniques are the perfect fit. Decision Table Testing is particularly well-suited for scenarios with many complex business rules.
Incorrect! Try again.
57What is the primary difference in objective between 'Load Testing' and 'Stress Testing'?
Performance Testing basics
Hard
A.Load testing is always performed in a production-like environment, while stress testing can be done in a lower-spec development environment.
B.Load testing is focused on measuring response time, while stress testing is focused on measuring server resource utilization (CPU, memory).
C.Load testing aims to find the system's behavior under expected peak load to verify performance SLAs, while stress testing aims to find the system's upper limits and failure points by pushing it beyond expected peak load.
D.Load testing uses a gradually increasing number of users, while stress testing uses a sudden, massive spike of users.
Correct Answer: Load testing aims to find the system's behavior under expected peak load to verify performance SLAs, while stress testing aims to find the system's upper limits and failure points by pushing it beyond expected peak load.
Explanation:
This is a key conceptual distinction. Load testing is about verification against requirements ('Does the system meet its performance goals at the expected Black Friday peak load?'). Stress testing is about discovery and robustness ('At what point does the system break, and how does it break? Does it recover gracefully?'). Spike testing (Option B) is a specific type of stress test. While both test types measure response time and resource utilization, their fundamental goals are different: verification vs. breaking point analysis.
Incorrect! Try again.
58A function takes an integer x where the valid range is [100, 200]. The function has special logic to handle values that are exact multiples of 10. Using a combination of Boundary Value Analysis (BVA) and Equivalence Partitioning (EP), which set of test cases is the most efficient for verifying both the range and the special logic?
Testing Techniques: Boundary value, Equivalence partitioning
Hard
This problem requires combining two different testing heuristics. First, standard 3-value BVA for the range [100, 200] gives us {99, 100, 101} and {199, 200, 201}. Second, the rule about 'multiples of 10' creates an important equivalence partition within the valid range. We must test a value from this partition. However, since 100 and 200 are already boundaries that are also multiples of 10, a truly thorough test should also check boundaries of this special logic inside the main range. Therefore, testing 110 (a multiple of 10) and 190 (another multiple of 10 near a boundary) provides strong coverage. The selected option combines the outer boundaries and inner partition boundaries efficiently.
Incorrect! Try again.
59A cloud-based video processing application has a Service Level Agreement (SLA) that guarantees 99.95% uptime. This is a non-functional requirement related to reliability. Which of the following testing activities is MOST crucial for validating this specific requirement?
Functional and Non-Functional Software Testing
Hard
A.Performing stress tests to determine the maximum number of concurrent video encodings the system can handle before performance degrades.
B.Performing usability testing with a group of end-users to see how they perceive the system's availability and responsiveness.
C.Running a large suite of automated functional tests to ensure all features of the video processing pipeline work correctly.
D.Conducting long-duration soak tests on a production-like environment with failover mechanisms (e.g., redundant servers, load balancers) enabled, and deliberately terminating server instances to measure the system's recovery time and success rate.
Correct Answer: Conducting long-duration soak tests on a production-like environment with failover mechanisms (e.g., redundant servers, load balancers) enabled, and deliberately terminating server instances to measure the system's recovery time and success rate.
Explanation:
High uptime SLAs are validated by testing a system's reliability and recoverability. The most direct way to do this is through a combination of endurance (soak) testing to find issues that emerge over time, and 'chaos engineering' principles like deliberately causing failures. Terminating instances and measuring if the system recovers automatically without user-facing downtime directly tests the mechanisms (failover, redundancy) that are put in place to achieve a high uptime guarantee. The other options test performance, functionality, and usability, which are important but do not directly validate the 99.95% uptime claim.
Incorrect! Try again.
60What is the primary conceptual difference between Alpha Testing and Beta Testing in the context of User Acceptance Testing (UAT)?
Levels of testing: Unit, Integration, System, UAT
Hard
A.Alpha testing is conducted by internal employees (e.g., QA, product managers) in a controlled lab/staging environment, while beta testing is conducted by a limited number of external, real users in their own environment.
B.Alpha testing is performed before the system is feature-complete, while beta testing is performed only after all features have been fully developed and passed system testing.
C.Alpha testing is focused on finding as many bugs as possible, while beta testing is focused on collecting feedback about product features and usability.
D.Alpha testing is a white-box testing technique, while beta testing is a black-box testing technique.
Correct Answer: Alpha testing is conducted by internal employees (e.g., QA, product managers) in a controlled lab/staging environment, while beta testing is conducted by a limited number of external, real users in their own environment.
Explanation:
The core distinction between Alpha and Beta testing lies in the 'who' and 'where'. Alpha testing is the 'internal' UAT phase. It's a dress rehearsal before showing the product to the outside world. Beta testing is the first time the product is exposed to real, external users who are not part of the development organization. This exposure to diverse, real-world environments, data, and usage patterns is the main value of beta testing. While bug finding and feedback collection happen in both, the environment and the participants are the defining factors.