Software Testing MCQs for NSCT

By the NSCT Exam Editorial Team · Updated 2026-11-24 · Facts checked against official sources on 2026-11-24

Software testing is the process of evaluating software to find defects and to check that it meets its requirements, using techniques such as black-box and white-box testing at levels from components to acceptance. It is topic 10 of the Software Engineering area, which carries 10% of the NSCT according to HEC's Areas of Competencies. The area's 2026 average was 50.1% accuracy, per the HEC NSCT report and APP.

This page uses ISTQB Foundation Level (CTFL v4.0) terms, which match Sommerville and Pressman on the basics. Start with the vocabulary: a human error (mistake) leaves a defect (fault, bug) in the code, and running that defect can cause a failure, a visible wrong result.

Black box vs white box

Black-box (specification-based) testing designs tests from the requirements without looking at the code. White-box (structure-based) testing designs tests from the code's internal structure.

Black box White box
Test basis Specification, user stories Source code, control flow
Techniques Equivalence partitioning, boundary value analysis, decision tables, state transitions Statement testing, branch testing, basis path testing
Finds Missing or wrong features Untested code, dead paths

Equivalence partitioning (EP) splits inputs into groups the system should treat the same. A field taking 10 to 50 has three partitions: below 10, 10 to 50 and above 50. Boundary value analysis (BVA) tests the edges. 2-value BVA uses 9, 10, 50 and 51. 3-value BVA adds the inner neighbours too, giving 9, 10, 11, 49, 50 and 51.

A decision table with n independent true/false conditions starts with 2^n rules. State transition testing covers every valid transition in a state model.

Exam angle: if a question mentions the code, the technique is white box; if it mentions only inputs and rules, it is black box.

Test levels

CTFL v4.0 names five test levels:

  1. Component (unit) testing: a single function or class in isolation.
  2. Component integration testing: interfaces between components. In top-down integration, stubs stand in for called modules. In bottom-up integration, drivers call the module under test.
  3. System testing: the whole system against its specification, including non-functional qualities such as performance.
  4. System integration testing: interfaces with external systems, such as a payment gateway.
  5. Acceptance testing: whether users or customers accept it. This includes alpha testing at the developer's site and beta testing at users' sites.

Older textbooks list four levels (unit, integration, system, acceptance) and fold the two integration levels together. In the V-model, each level is planned against a matching phase: acceptance against user requirements, system tests against the system specification, integration against the architectural design and unit tests against the detailed design.

Two test types cut across levels. Confirmation testing re-runs the failed test after a fix. Regression testing re-runs other tests to catch side effects of the fix.

Exam angle: "stub or driver?" depends on the direction of integration, not the size of the module.

Coverage

Coverage measures how much of the code your tests exercised. Statement coverage = statements executed / executable statements. Branch coverage = decision outcomes exercised / all outcomes, where each if or loop has a True and a False outcome.

def pass_status(score, attempts):
    status = "fail"
    if score >= 50:
        status = "pass"
    if attempts > 3:
        status += " (late)"
    return status

The tests (60, 1) and (40, 5) execute all 6 statements and all 4 branch outcomes, which we checked with a Python line tracer. They still cover only 2 of the 4 paths: the combinations pass + late and fail + on time are never run. 100% branch coverage always gives 100% statement coverage, but neither gives full path coverage.

Cyclomatic complexity, V(G) = E - N + 2P or decisions + 1, is the size of a basis path set. For pass_status, V(G) = 2 + 1 = 3. It is an upper bound on the tests needed for branch coverage, not the exact minimum.

Exam angle: an if without an else is the classic case where statement coverage reaches 100% but branch coverage does not.

Common traps

Worked examples

1. Understanding. Which integration approach needs drivers? Answer: bottom-up integration. It tests the lowest modules first, so something must call them. A driver plays that role until the real higher-level modules are integrated.

2. Application. A quantity field accepts whole numbers from 10 to 50. Give the EP partitions and the 2-value BVA set. Answer: three partitions (below 10, 10 to 50, above 50); BVA values 9, 10, 50 and 51. The four BVA values also hit every partition, so one set of four tests satisfies both techniques.

3. Analysis. For pass_status above, the tests (60, 1) and (40, 5) reach 100% branch coverage. Is the function fully tested? Answer: no. Only 2 of the 4 paths ran. A defect that appears only when a passing score is also late would slip through. Adding (60, 5) and (40, 1) gives full path coverage for this small function.

Practise

The quiz below has 100 Software Testing questions, filterable by tier and difficulty.

Practise: 100 questions

Interactive quiz loading. The first 10 questions are shown below.

  1. In ISTQB terminology, a developer misreads the specification and therefore writes an incorrect condition. What is the developer's misreading called?

    1. A defect (fault)
    2. A failure
    3. A test incident
    4. An error (mistake)
    Show answer

    Answer: D. An error (mistake)

    ISTQB separates three ideas: a human action that produces a wrong result is an error (mistake); the wrong code it leaves behind is a defect (fault or bug); and a failure is the visible deviation when that defect is executed. The misreading is the human action, so it is the error.

  2. Black-box test cases are derived mainly from which source?

    1. The specification or requirements, without looking at the internal code
    2. The source code statements and branches
    3. The control-flow graph of each function
    4. The compiler's optimisation report
    Show answer

    Answer: A. The specification or requirements, without looking at the internal code

    Black-box (specification-based) techniques such as equivalence partitioning, boundary value analysis, decision tables and state transition testing treat the system as a box whose inside you cannot see. Tests come from the specification. Code, branches and control-flow graphs are the basis of white-box techniques.

  3. Which of these is a white-box (structure-based) test technique?

    1. Equivalence partitioning
    2. Branch testing
    3. Boundary value analysis
    4. State transition testing
    Show answer

    Answer: B. Branch testing

    Branch testing designs tests to exercise the outcomes of decisions in the code, so it needs knowledge of the internal structure. Equivalence partitioning, boundary value analysis and state transition testing are black-box techniques that work from the specification.

  4. Which statement matches the ISTQB principle 'testing shows the presence of defects, not their absence'?

    1. If all planned tests pass, the software is proven defect-free
    2. Testing can reveal defects but cannot prove that no defects remain
    3. Exhaustive testing is practical when tests are automated
    4. Testing should only start after coding is finished
    Show answer

    Answer: B. Testing can reveal defects but cannot prove that no defects remain

    Passing tests only show that the tested cases behave correctly. Untested inputs and paths can still hide defects, so testing lowers the probability of undiscovered defects but is never proof of correctness. The other options contradict this principle, 'exhaustive testing is impossible' and 'early testing'.

  5. In top-down integration testing, what replaces a lower-level module that has not been written yet?

    1. A driver
    2. A stub
    3. A test oracle
    4. A mutant
    Show answer

    Answer: B. A stub

    Top-down integration starts from the top module, so the modules it calls may not exist yet. A stub is a simple stand-in that the module under test calls and that returns canned values. A driver is the opposite: it calls the module under test, and it is needed in bottom-up integration.

  6. Beta testing is best described as:

    1. Testing by developers at their own site using debuggers
    2. Unit testing of beta versions of each class
    3. Load testing performed by an automated tool on the build server
    4. Acceptance testing by real users in their own environment before general release
    Show answer

    Answer: D. Acceptance testing by real users in their own environment before general release

    Alpha and beta testing are forms of acceptance testing for products released to many users. Alpha testing happens at the developer's site; beta testing is carried out by real users at their own locations, so it exposes the software to real environments and usage before the final release.

  7. A defect is fixed, and the tester re-runs the exact test that failed to check that the fix works. ISTQB calls this:

    1. Regression testing
    2. Smoke testing
    3. Confirmation testing
    4. Exploratory testing
    Show answer

    Answer: C. Confirmation testing

    Confirmation testing (re-testing) checks that the original defect has been fixed by re-running the failed test. Regression testing is a separate activity: it re-runs other tests to make sure the change has not broken something that worked before.

  8. Which activity is static testing?

    1. Running unit tests with pytest
    2. A load test with 1,000 virtual users
    3. A peer review of the source code before it is run
    4. Beta testing by customers
    Show answer

    Answer: C. A peer review of the source code before it is run

    Static testing examines work products without executing them: reviews, walkthroughs, inspections and static analysis by tools. A code review reads the code, so it is static. Unit tests, load tests and beta tests all execute the software, so they are dynamic testing.

  9. Which statement about statement and branch coverage is always true?

    1. 100% statement coverage guarantees 100% branch coverage
    2. Statement and branch coverage are always equal
    3. Branch coverage can never exceed statement coverage
    4. 100% branch coverage guarantees 100% statement coverage
    Show answer

    Answer: D. 100% branch coverage guarantees 100% statement coverage

    Every executable statement lies on some branch outcome, so exercising every branch outcome also executes every statement. The reverse fails: an if with no else can have all its statements run by the True outcome while the False outcome is never taken. Branch coverage subsumes statement coverage.

  10. A regression suite has run unchanged for two years and now rarely finds new defects. Which ISTQB principle explains this?

    1. Tests wear out (the pesticide paradox)
    2. Defects cluster together
    3. Testing is context dependent
    4. Absence-of-defects fallacy
    Show answer

    Answer: A. Tests wear out (the pesticide paradox)

    If the same tests are repeated, they eventually stop finding new defects, just as pests become resistant to the same pesticide. CTFL v4.0 calls this 'tests wear out'. The remedy is to review and update the tests and add new ones. Repeating them still has value as regression checks.

FAQs

Is software testing the same as debugging?

No. Testing finds failures by running the software, or reviewing it in static testing, and shows that defects exist. Debugging is a development activity: finding the defect behind a failure, fixing it and checking the fix. Testers report failures; developers usually debug them. Confirmation testing then checks that the fix works.

What is the difference between verification and validation in testing?

Verification asks "are we building the product right?" and checks the product against its specification, for example through reviews and system tests. Validation asks "are we building the right product?" and checks it against users' real needs, for example through acceptance testing. Both are covered in more depth under software quality assurance.

Does ISTQB still use the term decision coverage?

CTFL v4.0 uses branch coverage, where a branch is a transfer of control between nodes in the control-flow graph. Older syllabi and many textbooks use decision coverage, which counts the True and False outcomes of each decision. For if-statements and loops the two usually give the same answer, and most exam questions treat them as one idea.

How many test cases does cyclomatic complexity give?

V(G) gives the number of independent paths in a basis set, so basis path testing uses V(G) tests. That is an upper bound for branch coverage: a single test through a loop can cover several branch outcomes, so the true minimum is often lower. Metrics like V(G) are covered under software metrics.

Next step

Continue with Software Maintenance & Evolution MCQs, return to the Software Engineering MCQ hub, or test yourself in an NSCT mock test.