Computer Knowledge
Software Testing and Quality Control
2,292 Questions
Software testing and quality control questions cover testing methodologies, unit testing, and defect management. These concepts are crucial for the computer knowledge sections of competitive exams. Practice these questions to understand verification and validation processes thoroughly.
Quality control typesUnit testing purposeSoftware vulnerability testingTest planning tasksLoop testing criteriaTest harness functions
Software Testing and Quality Control Questions
-
Functional testing
-
Structural testing
-
Performance testing
-
Requirements testing
A
Correct answer
Explanation
Black box testing focuses on inputs and outputs without knowledge of internal implementation - this is the definition of functional testing. Structural testing (glass box) requires code knowledge, performance testing measures speed/scalability, and requirements testing validates against specifications (though all functional tests ultimately trace to requirements).
-
The one who finds the most bugs.
-
The one who embarrasses the most programmers.
-
The one who gets the most bugs fixed.
-
a & c
C
Correct answer
Explanation
The best tester is measured by bugs FIXED, not found. A tester who finds 100 bugs that get ignored is less valuable than one who finds 10 critical bugs that all get fixed. The goal is improving software quality, which only happens when bugs are actually resolved. Option D (a & c) would be correct if both A and C were right, but finding the most bugs alone doesn't make someone the best.
-
Black box testing
-
Structural testing
-
Path testing
-
None of the above
D
Correct answer
Explanation
Static testing involves evaluating software artifacts without executing code. Options A, B, and C (black box, structural, path testing) are all dynamic testing techniques that require running the program. Therefore D (None of the above) is correct - none of the listed options are static testing methods.
-
Business process-based testing.
-
Performance, load and stress testing.
-
Usability testing.
-
Top-down integration testing.
D
Correct answer
Explanation
System testing validates the entire integrated system against requirements. Options A, B, and C (business process testing, performance/load/stress testing, usability testing) are all system-level activities. Top-down integration testing is an integration testing strategy, not system testing - it's about combining modules, not testing the complete system.
-
Appraisal
-
Walkthrough
-
Assessment
-
Gap Analysis
B
Correct answer
Explanation
Walkthrough is a form of static testing where peers review documents or code informally to find defects. Appraisal, Assessment, and Gap Analysis are not standard static testing techniques. Walkthroughs, inspections, and technical reviews are the primary static testing methods.
-
The system shall be user friendly.
-
The safety-critical parts of the system shall contain 0 faults.
-
The response time shall be less than one second for the specified design load.
-
The system shall be built to be portable.
C
Correct answer
Explanation
A testable requirement must be objective, quantifiable, and measurable. Specifying a response time of 'less than one second for the specified design load' provides a clear, measurable threshold, unlike subjective terms like 'user friendly' or 'portable'.
-
involves testers look for various types of bugs in the entire system, fully integrated.
-
involves testers looking for bugs in the relationships and interfaces between pairs and components of groups of components in the system under test.
-
Occurs often in a staged fashion.
-
B & C.
D
Correct answer
Explanation
Integration testing focuses on relationships and interfaces between components. Option B correctly describes this - testing bugs in relationships and interfaces between pairs and groups of components. Option C is also correct because integration testing often happens in stages (incremental integration). Therefore D (B & C) is the correct answer.
-
Glass box testing.
-
Proper selection of program or subprogram paths.
-
Feeding the component input and examining the output.
-
Exercised during the battery of tests.
C
Correct answer
Explanation
Structural testing (also called glass box or white box testing) involves examining internal code structure and selecting specific paths through the program. Option C describes black box testing - feeding inputs and examining outputs without knowledge of internal structure. Since structural testing DOES involve internal knowledge, C is what it is NOT.
-
Metrics from previous similar projects.
-
Discussions with the development team
-
Time allocated for regression testing.
-
a&b.
D
Correct answer
Explanation
Estimating re-testing effort should be based on historical data from similar projects (metrics) AND discussions with the development team about expected changes and code quality. Time allocated for regression testing is a result of the estimate, not an input to it. Therefore D (a & b) correctly combines the two estimation approaches.
-
a.)Open Source Framework
-
b.)Regression-Testing Framework
-
c.)Java Application Development Framework
-
d.)Web Application Framework
A,B
Correct answer
Explanation
JUnit is an open-source framework (Option A) designed specifically for regression testing (Option B) in Java applications. It is NOT a general Java application development framework (Option C) - that would be something like Spring or Java EE. It is also NOT a web application framework (Option D) - that would be frameworks like JSF or Spring MVC.
-
a.) Test a single unit of code
-
b.)Test a one module of the application
-
c.)Test a whole application
-
d.)Test the data, stored in database.
A
Correct answer
Explanation
Unit testing specifically focuses on testing the smallest testable part of an application - a single unit of code such as a method, function, or class (Option A). It does NOT test entire modules (Option B), whole applications (Option C), or database data directly (Option D) - those are integration or system testing levels.
A
Correct answer
Explanation
JUnit does support both static (using test suites and test runners) and dynamic (using JUnit 4's @Test annotation and JUnit 5's @TestFactory) approaches to run single unit tests. The static approach involves explicit test suite creation, while the dynamic approach uses runtime test discovery and execution through annotations.
-
The JUnit JAR file.
-
b.) Location of your JUnit test classes.
-
c.) Location of classes to be tested.
-
d.) JAR files of class libraries that are required by classes to be tested
-
e.) All of the above
E
Correct answer
Explanation
To run JUnit tests, the CLASSPATH must include: the JUnit JAR file itself (Option A), the location of JUnit test classes (Option B), the location of classes being tested (Option C), and any dependent library JARs (Option D). All four components (Option E) are essential for the test runner to find and execute tests properly.
-
a.) Container class, which used to group multiple test cases into a collection and run them together.
-
b.) defines test fixture, which contains all the test methods.
-
c.) interface, which contains the declaration of all the methods, needs to be implemented by Testcases.
-
d.) None of the above
A
Correct answer
Explanation
A JUnit TestSuite is a container class (Option A) used to group multiple test cases into a collection and run them together. It does NOT define test fixtures (Option B) - that's the purpose of @Before/@BeforeAll methods. It is NOT an interface (Option C) - TestSuite is a concrete class. Option D is incorrect because Option A accurately describes TestSuite functionality.
A
Correct answer
Explanation
Yes, you can run JUnit tests in debug mode within modern IDEs (like Eclipse or IntelliJ), allowing you to use breakpoints and step through unit tests just like any other Java application.