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