Software Testing Foundation Course

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Rahmat1
R
Rahmat1
Community Contributor
Quizzes Created: 1 | Total Attempts: 571
Questions: 12 | Attempts: 571

SettingsSettingsSettings
Software Testing Quizzes & Trivia

Testing


Questions and Answers
  • 1. 

     Given the following code, which is true: IF A > B THEN C = A – B ELSE C = A + B ENDIF Read D IF C = D Then Print “Error” ENDIF

    • A.

      1 test for statement coverage, 3 for branch coverage

    • B.

      2 tests for statement coverage, 2 for branch coverage

    • C.

      2 tests for statement coverage. 3 for branch coverage

    • D.

      3 tests for statement coverage, 3 for branch coverage

    • E.

      3 tests for statement coverage, 2 for branch coverage

    Correct Answer
    B. 2 tests for statement coverage, 2 for branch coverage
    Explanation
    The given code contains two branches: one for the "IF" statement and one for the "ELSE" statement. To achieve branch coverage, we need to test both branches. Since there are only two branches, we need two tests for branch coverage. Additionally, the code contains four statements: the "IF" statement, the "ELSE" statement, the "Read D" statement, and the "Print 'Error'" statement. To achieve statement coverage, we need to test all four statements. Therefore, we need two tests for statement coverage and two tests for branch coverage.

    Rate this question:

  • 2. 

    You have designed test cases to provide 100% statement and 100% decision coverage for the following fragment of code. if width > length then biggest_dimension = width else biggest_dimension = length end_if The following has been added to the bottom of the code fragment above. print "Biggest dimension is " & biggest_dimension print "Width: " & width print "Length: " & length How many more test cases are required?

    • A.

      One more test case will be required for 100 % decision coverage.

    • B.

      Two more test cases will be required for 100 % statement coverage, one of which will be used to provide 100% decision coverage.

    • C.

      None, existing test cases can be used.

    • D.

      One more test case will be required for 100" statement coverage.

    Correct Answer
    C. None, existing test cases can be used.
    Explanation
    The existing test cases already provide 100% statement and 100% decision coverage for the given code fragment. Therefore, no additional test cases are required.

    Rate this question:

  • 3. 

    What is the MAIN benefit of designing tests early in the life cycle?

    • A.

      It is cheaper than designing tests during the test phases.

    • B.

      It helps prevent defects from being introduced into the code.

    • C.

      Tests designed early are more effective than tests designed later.

    • D.

      It saves time during the testing phases when testers are busy.

    Correct Answer
    B. It helps prevent defects from being introduced into the code.
    Explanation
    Designing tests early in the life cycle helps prevent defects from being introduced into the code. By identifying and addressing potential issues at an early stage, the development team can ensure that the code is more robust and reliable. This can save time and resources that would otherwise be spent on fixing and debugging later on. Additionally, early testing allows for better understanding of the requirements and specifications, leading to more effective test design and coverage.

    Rate this question:

  • 4. 

    What is the KEY difference between preventative and reactive approaches to testing?

    • A.

      Preventative tests and reactive tests are designed as early as possible.

    • B.

      Preventative tests are designed early; reactive tests are designed after the software has been produced.

    • C.

      Preventative testing is always analytical; reactive testing is always heuristic.

    • D.

      Preventative tests are designed after the software has been produced; reactive tests are designed early in response to review comments.

    Correct Answer
    B. Preventative tests are designed early; reactive tests are designed after the software has been produced.
    Explanation
    The key difference between preventative and reactive approaches to testing is the timing of when the tests are designed. Preventative tests are designed early, before the software has been produced, with the aim of preventing defects and issues from occurring. On the other hand, reactive tests are designed after the software has been produced, in response to identified defects or issues. This difference in timing allows preventative testing to be proactive and proactive, while reactive testing is more responsive and reactive to problems that have already occurred.

    Rate this question:

  • 5. 

    Given the following fragment of code, how many tests are required for 100% decision coverage? if width > length then biggest_dimension = width if height > width then biggest_dimension = height end_if else biggest_dimension = length if height > length then biggest_dimension = height end_if end_if

    • A.

      3

    • B.

      4

    • C.

      2

    • D.

      1

    Correct Answer
    B. 4
    Explanation
    The given code fragment contains two decision points: the first decision point is the condition "width > length" and the second decision point is the condition "height > width". To achieve 100% decision coverage, we need to test both possible outcomes of each decision point. Therefore, we need to test the following combinations:
    1. width > length and height > width
    2. width > length and height

    Rate this question:

  • 6. 

    A thermometer measures temperature in whole degrees only. If the temperature falls below 18 degrees, the heating is switched off. It is switched on again when the temperature reaches 21 degrees. What are the best values in degrees to cover all equivalence partitions?

    • A.

      15, 19 and 25.

    • B.

      17, 18 and19.

    • C.

      18, 20 and22.

    • D.

      16, 26 and 32.

    Correct Answer
    A. 15, 19 and 25.
    Explanation
    The best values in degrees to cover all equivalence partitions are 15, 19, and 25. This is because the thermometer measures temperature in whole degrees only, and the heating is switched off when the temperature falls below 18 degrees and switched on again when it reaches 21 degrees. Therefore, the values of 15 and 25 cover the range outside of the heating limits, and the value of 19 covers the range between the heating limits.

    Rate this question:

  • 7. 

    With which of the following categories is a test comparator tool USUALLY associated?

    • A.

      Tool support for performance and monitoring.

    • B.

      Tool support for static testing.

    • C.

      Tool support for test execution and logging.

    • D.

      Tool support for the management of testing and tests.

    Correct Answer
    C. Tool support for test execution and logging.
    Explanation
    A test comparator tool is usually associated with tool support for test execution and logging. This type of tool is used to compare the actual results of a test with the expected results and log any discrepancies. It helps in identifying and tracking issues during test execution and provides detailed logs for analysis and debugging.

    Rate this question:

  • 8. 

    Which of the following is a purpose of the review planning phase?

    • A.

      Log defects.

    • B.

      Explain the documents to the participants.

    • C.

      Gather metrics.

    • D.

      Allocate the individual roles.

    Correct Answer
    D. Allocate the individual roles.
    Explanation
    The purpose of the review planning phase is to allocate individual roles. This means that during this phase, the team members are assigned specific responsibilities and tasks for the review process. This helps to ensure that each person knows their role and what is expected of them, leading to a more organized and efficient review.

    Rate this question:

  • 9. 

    Which is the best definition of complete testing:

    • A.

      You have discovered every bug in the program.

    • B.

      You have tested every statement, branch, and combination of branches in the program.

    • C.

      You have completed every test in the test plan.

    • D.

      You have reached the scheduled ship date.

    Correct Answer
    A. You have discovered every bug in the program.
    Explanation
    Complete testing refers to the process of thoroughly examining a program to identify and address all possible bugs or defects. It involves the systematic execution of test cases and scenarios to ensure that all aspects of the program have been evaluated. By discovering every bug in the program, it implies that all potential issues have been identified and resolved, making it the most comprehensive definition of complete testing.

    Rate this question:

  • 10. 

    Complete statement and branch coverage means:

    • A.

      A. That you have tested every statement in the program.

    • B.

      B. That you have tested every statement and every branch in the program.

    • C.

      C. That you have tested every IF statement in the program.

    • D.

      D. That you have tested every combination of values of IF statements in the program

    Correct Answer
    B. B. That you have tested every statement and every branch in the program.
    Explanation
    Complete statement and branch coverage means that you have tested every statement and every branch in the program. This includes testing each individual statement to ensure they execute correctly, as well as testing every possible branch or decision point in the program to verify that all possible paths are covered. This approach helps to ensure that the program is thoroughly tested and that all potential scenarios and outcomes are considered.

    Rate this question:

  • 11. 

    Reviews, static analysis and dynamic testing have the same objective

    • A.

      Identifying defects.

    • B.

      Fixing defects.

    • C.

      A and B

    • D.

      None of the above

    Correct Answer
    A. Identifying defects.
    Explanation
    Reviews, static analysis, and dynamic testing all aim to identify defects in a system or software. Reviews involve examining the code or documentation to find any potential issues. Static analysis involves analyzing the code without executing it to identify defects. Dynamic testing involves executing the code to uncover defects during runtime. Therefore, all three approaches have the common objective of identifying defects.

    Rate this question:

  • 12. 

    Contract and regulation testing is a part of

    • A.

      System testing

    • B.

      Acceptance testing

    • C.

      Integration testing

    • D.

      Smoke testing

    Correct Answer
    B. Acceptance testing
    Explanation
    Contract and regulation testing is a part of acceptance testing. Acceptance testing is performed to determine whether a system meets the requirements and expectations of the end-users or stakeholders. Contract and regulation testing specifically focuses on ensuring that the system complies with any contractual agreements, legal regulations, or industry standards that may be applicable. This type of testing helps to verify that the system is in compliance with all the necessary rules and regulations, ensuring its suitability for acceptance by the end-users or stakeholders.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 22, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jan 16, 2012
    Quiz Created by
    Rahmat1

Related Topics

Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.