Unit 4 - Practice Quiz

CSE320 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is the primary goal of software testing?

Fundamentals of software testing Easy
A. To write the code for the software.
B. To prove that the software has no errors.
C. To find defects before the software is released to the customer.
D. To design the user interface.

2 In 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.

3 Verifying 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

4 Which 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.

5 Which 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

6 In 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.

7 What 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.

8 If 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

9 Which 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

10 What 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.

11 Testing 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

12 Who 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

13 API 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.

14 Testing 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

15 What 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.

16 How 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.

17 What 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.

18 What 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.

19 Which 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.

20 What 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.

21 A 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

22 During 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

23 A 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

24 A 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

25 A 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.

26 A 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

27 When 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.

28 A 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

29 The 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.

30 A 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)

31 Which 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.

32 The 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.

33 What 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.

34 What 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.

35 A 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

36 When 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

37 A 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

38 A 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

39 System 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.

40 In 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.

41 For 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

42 A 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".

43 A 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.

44 During 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.

45 A 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).

46 Why 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.

47 A 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.

48 When 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.

49 You 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.

50 In 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.

51 According 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.

52 You 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.

53 A 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).

54 A 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.

55 You 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?

Types of Software Testing: Web Testing Hard
A. button[type='submit']
B. div > button:first-of-type
C. button[id*='-login'][class*='primary']
D. button.primary.large

56 A 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.

57 What 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.

58 A 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
A. 99, 201, and one random valid value
B. 100, 150, 200
C. All integers from 100 to 200
D. 99, 100, 101, 110, 190, 199, 200, 201

59 A 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.

60 What 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.