This section contains carefully selected MCQs and Previous Year Questions with explanations to help students understand concepts and prepare effectively for examinations, interviews, and competitive tests.
Q: 1The testing method, which is generally used as an acceptance test for a software system is
Option C
In the software testing process, System Testing is generally used as an acceptance test because it evaluates the complete and integrated software system as a whole.
At this stage, the system is tested against the specified requirements to ensure that it behaves correctly in a real-world environment before being delivered to the user.
System testing verifies all functional and non-functional requirements and is usually the last level of testing before acceptance by the client.
Q: 2Choose the correct statement
Option A
In Integration Testing, modules are tested by combining them step by step. Sometimes, required modules are not yet developed, so we use Stubs and Test Drivers to simulate missing parts.
Q: 3Which testing ensures that each function works correctly?
Option A
The Unit Testing verifies the functionality of individual components or functions in isolation.
Q: 4In the context of basis path testing, let the flow graph G (V, E) is drawn using the procedural design or source code. If graph G have 17 edges and 13 nodes, what is cyclomatic complexity of G?
Option C
Cyclomatic complexity tells us how many independent paths exist in a program. Here, graph has 17 edges and 13 nodes, there are 6 independent paths that must be tested to cover all possible branches in the logic.
Cyclomatic Complexity (V(G)) :
V(G)=E−N+2
Where:
E is number of edges given as 17.
N is number of nodes given as 13.
So,
V(G) = 17−13+2
V(G) = 6
Q: 5
Match the following List – 1 with the List – 2:
| List – 1 | List – 2 |
|---|---|
| (i) Unit Testing | (a) It is concerned with scheduling and resourcing all of the activities in the testing process. It involves defining the testing process, taking into account the people and the time available. |
| (ii) Test Planning | (b) This testing should focus on testing component interactions. Where some or all of the components in a system are integrated and the system is tested as a whole. |
| (iii) Component Testing | (c) This type of testing should focus on testing the functionality of objects or methods. |
| (iv) System Testing | (d) This type of testing should focus on testing component interfaces. |
Option B
| LIST – I | (LIST – II) | EXPLANATION |
|---|---|---|
| Unit Testing | Testing the functionality of objects or methods. | Tests individual program units or functions. |
| Test Planning | Scheduling and resourcing the testing process. | Defines the testing strategy, schedule, and resources. |
| Component Testing | Testing component interfaces. | Verifies interactions between connected modules. |
| System Testing | Testing component interactions in a complete system. | Checks overall system behavior and performance. |
Q: 6Which of the following testing techniques does not come under control structure testing?
Option D
Control structure testing is a type of White-Box testing that focuses on the logical control structures of a program, such as decisions, loops, and conditions, to ensure that all possible execution paths are tested. It includes techniques like, condition testing, data flow testing, Loop testing etc.
The Graph-Based Testing does not belong to control structure testing. It falls under Black-Box testing techniques, where the focus is on relationships between inputs, outputs, and modules rather than internal control flow.
Q: 7Which of these is fault base testing technique?
Option D
Fault-Based Testing techniques are designed to evaluate how well a software system can handle errors or faults. The idea is to intentionally introduce faults and check whether the testing process can detect them.
Mutation Testing is a well-known fault-based testing technique. It involves making small modifications (called mutants) to the program’s source code intentionally, to check if the existing test cases can detect these faults.
Q: 8Integration testing focuses on:
Option C
The Integration Testing ensures that modules or components work together correctly after individual unit testing.
Q: 9If software is developed as a product to be used by many customers, most software product builders use a process called __________ to uncover errors that only the end user seems able to find.
Option A
When software is developed as a product for many users, developers use Alpha and Beta Testing to find errors that only real users can detect. These tests are performed after internal testing to ensure the software works well in real-world conditions.
Q: 10The overhead code required to be written for unit testing is called
I. driver
II. stub
III. scaffolding
Option C
In unit testing, the extra supporting code written to test modules is collectively called scaffolding. It is a general term that includes all the auxiliary code required for testing. Scaffolding includes:
Note:
Scaffolding is the standard software engineering term for all unit test support code. Covers drivers, stubs, test harnesses, mocks.
Q: 11The software modules M1 and M2 have the McCabe’s cyclomatic complexity numbers N1 and N2 respectively. When they are integrated sequentially, the net cyclomatic complex number is
Option D
Cyclomatic Complexity (McCabe’s Complexity) measures the number of independent paths in a program. It is used to determine testing effort.
When two modules are independent, their complexities simply add. However, when modules are integrated sequentially, they are connected by a control flow, which removes one independent path. Since execution flows from one module to another.
So, for Sequential Integration: Combined Complexity = N1+N2-1
Q: 12Testing carried out by users at their own locations is called?
Option A
Beta Testing is the type of testing performed by end users at their own locations in a real working environment. It is carried out after alpha testing and helps identify real-world issues, usability problems, and hidden bugs before the final release of the software.
Q: 13Let M be a node that represents a if-then-else node in a program graph. Let the number of paths from its ‘if’ part to the end node be ‘y’ and from the ‘else’ part to the end node be ‘z’. If the number of path from the start node to the node M is ‘x’, then the total number of paths through M is
Option B
In a Program Graph, each node represents a statement or a decision, and an edge represents possible control flow. When we reach a node, the number of paths to that node is the sum over all its incoming edges of the number of paths along each edge.
For a control‑flow construct like if‑then‑else, any path that reaches the decision node branches into the then part or the else part. Each of these branches can then lead to multiple paths to the end node.
From the start node to M, there are x different paths. After reaching M, each of these paths can go through either the if part (y paths) or the else part (z paths). Therefore, the total number of paths after node M becomes (y+z).
Since each of the x incoming paths can combine with all possible paths after M, we multiply them. Hence, the total number of paths through node M is: x*(y+z).
Q: 14____________ tests are performed on a program unit to verify the response time, the execution time, the throughput, primary and secondary memory utilization and traffic rates on data channels and communication links.
Option A
Performance Testing is a software testing method used to check how efficiently a program or system works under a given workload. It focuses on basic aspects like how quickly the system responds, how much time it takes to execute functions, how many users or operations it can handle at once (throughput), and how much primary or secondary memory it consumes during execution.
Q: 15Which software testing is used to check the defects in software without executing the actual code?
Option A
Static Testing is a type of software testing that does not require executing the code. It focuses on reviewing and analyzing the code, documentation, or design to find defects. Examples include:
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.