1What is the primary objective of software testing?
A.To prove that the software is bug-free
B.To debug the software logic
C.To find defects or errors in the software
D.To complete the project documentation
Correct Answer: To find defects or errors in the software
Explanation:Testing is done to uncover defects, errors, or bugs in the software to ensure quality. It is impossible to prove software is 100% bug-free; testing only shows the presence of defects.
Incorrect! Try again.
2Which of the following equations represents Cyclomatic Complexity ?
A.
B.
C.
D.
Correct Answer:
Explanation:Cyclomatic complexity is calculated using the formula , where is the number of edges, is the number of nodes, and is the number of connected components.
Incorrect! Try again.
3Which testing technique requires knowledge of the internal code structure and logic?
A.Black Box Testing
B.White Box Testing
C.Gray Box Testing
D.Functional Testing
Correct Answer: White Box Testing
Explanation:White Box Testing (also known as structural testing) involves testing the internal structures or workings of an application, requiring knowledge of the code.
Incorrect! Try again.
4In Boundary Value Analysis (BVA), if an input field accepts values from 1 to 100, which set of values should be tested?
A.0, 1, 50, 99, 100
B.0, 1, 100, 101
C.1, 2, 99, 100
D.1, 50, 100
Correct Answer: 0, 1, 100, 101
Explanation:BVA focuses on the boundaries. For a range 1-100, the boundary values are the minimum (1), maximum (100), just below minimum (0), and just above maximum (101).
Incorrect! Try again.
5What is the difference between Verification and Validation?
A.Verification checks 'Are we building the right product?', Validation checks 'Are we building the product right?'
B.Verification checks 'Are we building the product right?', Validation checks 'Are we building the right product?'
C.Verification is done by users, Validation is done by developers
D.There is no difference
Correct Answer: Verification checks 'Are we building the product right?', Validation checks 'Are we building the right product?'
Explanation:Verification ensures the software meets specifications (process focus), while Validation ensures the software meets the user's needs (product focus).
Incorrect! Try again.
6Which level of testing is primarily responsible for verifying the interaction between different software modules?
A.Unit Testing
B.Integration Testing
C.System Testing
D.Acceptance Testing
Correct Answer: Integration Testing
Explanation:Integration testing focuses on verifying the data flow and interface communication between integrated modules.
Incorrect! Try again.
7Equivalence Partitioning is a technique where inputs are divided into:
A.Valid and invalid classes where data in each class is treated differently
B.Valid and invalid classes where all data in a class is expected to be processed in the same way
C.Smallest and largest values only
D.Randomly generated subsets
Correct Answer: Valid and invalid classes where all data in a class is expected to be processed in the same way
Explanation:Equivalence Partitioning assumes that the system handles all values within a specific partition (class) identically, reducing the number of test cases needed.
Incorrect! Try again.
8Which of the following is a type of Non-Functional Testing?
A.Unit Testing
B.Performance Testing
C.Regression Testing
D.Sanity Testing
Correct Answer: Performance Testing
Explanation:Performance testing checks the speed, responsiveness, and stability (non-functional attributes), whereas Unit, Regression, and Sanity are generally associated with functional correctness.
Incorrect! Try again.
9What is the main purpose of 'Stubs' and 'Drivers' in Integration Testing?
A.To automate the test execution
B.To act as temporary replacements for missing modules
C.To generate test data randomly
D.To record the test results
Correct Answer: To act as temporary replacements for missing modules
Explanation:Stubs and Drivers are dummy modules used in Top-down and Bottom-up integration testing to simulate the behavior of missing or not-yet-developed components.
Incorrect! Try again.
10Which testing phase involves the client or end-user verifying the system before deployment?
A.System Testing
B.Integration Testing
C.User Acceptance Testing (UAT)
D.Unit Testing
Correct Answer: User Acceptance Testing (UAT)
Explanation:UAT is the final phase of testing performed by the end-user or client to verify that the system satisfies the business requirements.
Incorrect! Try again.
11Selenium IDE is primarily known for which feature?
A.Performance testing capabilities
B.Record and Playback of tests
C.Database connection testing
D.API security scanning
Correct Answer: Record and Playback of tests
Explanation:Selenium IDE is a browser extension that allows users to record their interactions with a browser and play them back as automated test scripts.
Incorrect! Try again.
12In the context of API testing, what does a status code of 200 typically indicate?
A.Not Found
B.Internal Server Error
C.OK / Success
D.Unauthorized
Correct Answer: OK / Success
Explanation:In HTTP protocols used for APIs, the status code 200 represents a successful request.
Incorrect! Try again.
13Which of the following is NOT a characteristic of Selenium WebDriver?
A.It communicates directly with the browser
B.It supports multiple programming languages like Java, Python, and C#
C.It is a browser extension for record and playback only
D.It allows for complex automation scenarios
Correct Answer: It is a browser extension for record and playback only
Explanation:Selenium IDE is the extension for record/playback. WebDriver is a programming interface that allows code to send commands directly to a browser.
Incorrect! Try again.
14Regression testing is performed to:
A.Test the application for the first time
B.Ensure that new code changes have not adversely affected existing features
C.Check the user interface design
D.Test the system at peak load
Correct Answer: Ensure that new code changes have not adversely affected existing features
Explanation:Regression testing confirms that a recent program or code change has not adversely affected existing features.
Incorrect! Try again.
15Mobile testing that involves checking the application on real devices instead of emulators is crucial because:
A.Emulators are too expensive
B.Real devices provide accurate real-world conditions (battery, network, sensors)
C.Emulators cannot run Android apps
D.Real devices are faster than computers
Correct Answer: Real devices provide accurate real-world conditions (battery, network, sensors)
Explanation:While emulators are useful, they cannot perfectly mimic real-world hardware conditions like battery drain, network interruptions, and specific sensor behaviors.
Incorrect! Try again.
16Alpha Testing is usually performed by:
A.The end-users at their own site
B.The testers internal to the organization at the developer's site
C.Automated bots
D.The marketing team
Correct Answer: The testers internal to the organization at the developer's site
Explanation:Alpha testing is a type of acceptance testing performed effectively by an internal team at the developer's site, before Beta testing.
Incorrect! Try again.
17Which component of Selenium is used to locate elements on a web page?
Explanation:Locators are used in Selenium to identify and interact with HTML elements on a web page.
Incorrect! Try again.
18Load Testing aims to:
A.Determine the system behavior under expected specific load conditions
B.Break the system by overwhelming it with data
C.Check the security loopholes
D.Verify the graphical user interface
Correct Answer: Determine the system behavior under expected specific load conditions
Explanation:Load testing verifies that the system can handle the expected volume of users or transactions. Stress testing attempts to break it.
Incorrect! Try again.
19What is a 'Test Case'?
A.A document describing the software architecture
B.A set of inputs, execution preconditions, and expected outcomes
C.A tool used for automation
D.A diagram showing data flow
Correct Answer: A set of inputs, execution preconditions, and expected outcomes
Explanation:A test case is a specific set of conditions and variables under which a tester will determine whether the application satisfies requirements.
Incorrect! Try again.
20Black Box testing is also known as:
A.Glass Box Testing
B.Behavioral Testing
C.Structural Testing
D.Code-based Testing
Correct Answer: Behavioral Testing
Explanation:Black Box testing focuses on the external behavior of the system without considering internal implementation, hence 'Behavioral Testing'.
Incorrect! Try again.
21Which of the following is a security testing technique?
A.Boundary Value Analysis
B.Penetration Testing
C.Load Testing
D.Usability Testing
Correct Answer: Penetration Testing
Explanation:Penetration testing is a simulated cyberattack against your computer system to check for exploitable vulnerabilities.
Incorrect! Try again.
22In the context of Selenium, what is 'XPath'?
A.A database query language
B.A syntax for defining parts of an XML document, used to navigate DOM
C.A Java method for clicking buttons
D.A browser plugin
Correct Answer: A syntax for defining parts of an XML document, used to navigate DOM
Explanation:XPath (XML Path Language) is used in Selenium to navigate through elements and attributes in an XML document (or HTML DOM) to locate web elements.
Incorrect! Try again.
23Which testing level focuses on the smallest testable parts of an application?
A.System Testing
B.Unit Testing
C.Integration Testing
D.Beta Testing
Correct Answer: Unit Testing
Explanation:Unit testing involves testing individual components or functions of source code, usually performed by developers.
Incorrect! Try again.
24What is the primary benefit of AI-assisted testing tools?
A.They eliminate the need for all human testers
B.They can self-heal broken scripts and generate test data intelligently
C.They are cheaper than open-source tools
D.They only work for mobile applications
Correct Answer: They can self-heal broken scripts and generate test data intelligently
Explanation:AI tools can identify changes in the UI and automatically update test scripts (self-healing) and generate relevant test data patterns.
Incorrect! Try again.
25Sanity Testing is a subset of:
A.Regression Testing
B.Unit Testing
C.White Box Testing
D.Performance Testing
Correct Answer: Regression Testing
Explanation:Sanity testing is a narrow, deep subset of regression testing performed to ensure that a specific code change works as expected.
Incorrect! Try again.
26Stress Testing is distinct from Load Testing because:
A.It tests the system beyond its operational capacity limits
B.It tests the system with zero users
C.It only tests the login functionality
D.It is done manually
Correct Answer: It tests the system beyond its operational capacity limits
Explanation:Stress testing pushes the software beyond normal limits to see how it fails and recovers, whereas load testing checks behavior under anticipated loads.
Incorrect! Try again.
27Which tool is commonly used for API testing?
A.Selenium
B.Postman
C.Appium
D.JIRA
Correct Answer: Postman
Explanation:Postman is a popular tool specifically designed for developing, testing, and documenting APIs.
Incorrect! Try again.
28The 'Sandwich' approach in integration testing involves:
A.Testing the GUI only
B.Combining Top-down and Bottom-up approaches
C.Testing the database and API only
D.Testing without any drivers or stubs
Correct Answer: Combining Top-down and Bottom-up approaches
Explanation:Sandwich (or Hybrid) integration testing combines both Top-down and Bottom-up strategies to leverage the advantages of both.
Incorrect! Try again.
29SQL Injection testing is part of which testing category?
A.Usability Testing
B.Security Testing
C.Performance Testing
D.Compatibility Testing
Correct Answer: Security Testing
Explanation:SQL Injection is a vulnerability where an attacker interferes with database queries. Testing for it is part of Security Testing.
Incorrect! Try again.
30Which of the following describes a 'False Positive' in automated testing?
A.The test passed, and the feature works
B.The test failed, but the application is working correctly
C.The test passed, but there is a bug
D.The test failed, and there is a bug
Correct Answer: The test failed, but the application is working correctly
Explanation:A false positive in testing occurs when the test reports an error (fails), but the functionality is actually correct (often due to script issues).
Incorrect! Try again.
31Beta Testing is performed by:
A.Developers at the development site
B.Real users in a real environment outside the development organization
C.The Quality Assurance team
D.Project Managers only
Correct Answer: Real users in a real environment outside the development organization
Explanation:Beta testing is the second phase of software testing in which a sampling of the intended audience tries the product out.
Incorrect! Try again.
32Basis Path Testing is a technique associated with:
A.Black Box Testing
B.White Box Testing
C.Performance Testing
D.Usability Testing
Correct Answer: White Box Testing
Explanation:Basis Path Testing is a white-box technique that creates a set of linearly independent paths through the code.
Incorrect! Try again.
33Which framework allows Selenium to support 'Data-Driven Testing'?
A.HTML5
B.TestNG or JUnit
C.CSS
D.React
Correct Answer: TestNG or JUnit
Explanation:TestNG and JUnit are testing frameworks that integrate with Selenium to enable parameterization and data-driven testing strategies.
Incorrect! Try again.
34What is 'Cross-Browser Testing'?
A.Testing if the website works without an internet connection
B.Testing the application across different web browsers (Chrome, Firefox, Safari)
C.Testing the application on different operating systems only
D.Testing the security of the browser
Correct Answer: Testing the application across different web browsers (Chrome, Firefox, Safari)
Explanation:Cross-browser testing ensures the web application functions correctly and looks consistent across various web browsers.
Incorrect! Try again.
35In the -Model of software development, Acceptance Testing corresponds to which phase?
A.Unit Design
B.Requirements Analysis
C.Coding
D.System Design
Correct Answer: Requirements Analysis
Explanation:In the V-Model, the Acceptance Testing phase is directly linked to the Requirements Analysis phase, verifying the initial requirements.
Incorrect! Try again.
36Which represents a valid CSS Selector for an element with id="loginBtn"?
A..loginBtn
B.#loginBtn
C.//loginBtn
D.@id=loginBtn
Correct Answer: #loginBtn
Explanation:In CSS selectors, the hash symbol (#) is used to select elements by their ID.
Incorrect! Try again.
37Which is an example of a Non-Functional requirement?
A.The system must calculate tax correctly
B.The system should load the homepage within 2 seconds
C.The system must allow users to reset passwords
D.The system must send an email upon registration
Correct Answer: The system should load the homepage within 2 seconds
Explanation:This is a performance constraint (Non-Functional). The others are specific behaviors (Functional).
Incorrect! Try again.
38Installation of Selenium WebDriver requires:
A.Only a browser extension
B.Language bindings (jar/pip) and a Browser Driver (e.g., chromedriver)
C.A paid license key
D.Only the Java Development Kit (JDK)
Correct Answer: Language bindings (jar/pip) and a Browser Driver (e.g., chromedriver)
Explanation:WebDriver requires the client libraries for the chosen language and the specific executable driver for the browser being automated.
Incorrect! Try again.
39Exploratory Testing is best described as:
A.Simultaneous learning, test design, and test execution
B.Executing pre-written test scripts only
C.Testing done by machines
D.Testing focusing only on documentation
Correct Answer: Simultaneous learning, test design, and test execution
Explanation:Exploratory testing relies on the tester's creativity and intuition to explore the software and find bugs without rigid scripts.
Incorrect! Try again.
40Which of the following is NOT a valid Selenium Locator?
A.By.id
B.By.xpath
C.By.color
D.By.className
Correct Answer: By.color
Explanation:Selenium does not support locating elements directly by their color. It supports ID, Name, XPath, CSS, ClassName, etc.
Incorrect! Try again.
41Compatibility Testing checks:
A.If the software works with different OS, browsers, and network environments
B.If the software is compatible with the developer's mood
C.If the code follows style guides
D.If the unit tests pass
Correct Answer: If the software works with different OS, browsers, and network environments
Explanation:Compatibility testing ensures the application runs correctly across different computing environments.
Incorrect! Try again.
42In a decision table, if there are binary conditions, how many rules (columns) are possible?
A.
B.
C.
D.
Correct Answer:
Explanation:In a decision table, binary conditions (True/False) result in possible combinations of conditions.
Correct Answer: Mobile application testing (Native, Hybrid, Web)
Explanation:Appium is an open-source tool for automating native, mobile web, and hybrid applications on iOS and Android platforms.
Incorrect! Try again.
44What is the main limitation of Selenium IDE?
A.It cannot record tests
B.It is not suitable for complex test logic and data-driven testing
C.It costs money to use
D.It requires advanced Java knowledge
Correct Answer: It is not suitable for complex test logic and data-driven testing
Explanation:Selenium IDE is a prototyping tool. For complex logic, loops, error handling, and large-scale frameworks, WebDriver is required.
Incorrect! Try again.
45Test Harness is:
A.A collection of software and test data configured to test a program unit
B.A type of harness for safety
C.The final report of testing
D.The requirement document
Correct Answer: A collection of software and test data configured to test a program unit
Explanation:A test harness involves stubs, drivers, and other tools required to execute tests and monitor outputs.
Incorrect! Try again.
46Defect Density is calculated as:
A.Total Defects / Size of Software (e.g., KLOC)
B.Total Defects * Total Developers
C.Passed Tests / Total Tests
D.Time taken to fix bugs
Correct Answer: Total Defects / Size of Software (e.g., KLOC)
Explanation:Defect density is a metric measuring the number of defects confirmed in a software module during a specific period of operation or development, divided by the size of the software.
Incorrect! Try again.
47Testing performed to determine if the system protects data and maintains functionality as intended is:
A.Security Testing
B.Recovery Testing
C.Stress Testing
D.Volume Testing
Correct Answer: Security Testing
Explanation:Security testing ensures that the system protects data and maintains functionality as intended, preventing unauthorized access.
Incorrect! Try again.
48Which AI technique is often used to generate test cases automatically?
A.Natural Language Processing (NLP)
B.Hard coding
C.Manual typing
D.Waterfall model
Correct Answer: Natural Language Processing (NLP)
Explanation:NLP is used in AI testing tools to interpret requirements written in plain English and automatically generate corresponding test cases.
Incorrect! Try again.
49Responsive Web Design testing ensures:
A.The web server responds quickly
B.The UI adapts correctly to different screen sizes and viewports
C.The database responds to queries
D.The API sends JSON responses
Correct Answer: The UI adapts correctly to different screen sizes and viewports
Explanation:Responsive testing checks that the layout adjusts gracefully to mobile, tablet, and desktop screen widths.
Incorrect! Try again.
50When should testing start in the software development life cycle?
A.After the code is written
B.After the product is released
C.As early as possible (Requirements phase)
D.Only during the testing phase
Correct Answer: As early as possible (Requirements phase)
Explanation:Testing should start as early as possible (Shift Left) to catch defects in requirements and design, which is more cost-effective.