ISE · Introduction to Software Engineering

Chapter 09 · Software Testing and Quality Assurance

សំណួរ 10

ទំព័រនេះមិនបង្ហាញចម្លើយទេ។ ប្រើសំណួរទាំងនេះដើម្បីរំលឹកមេរៀន រួចពិនិត្យខ្លួនឯងជាមួយក្វីសសាកល្បងនៅចុងស្លាយ។
  1. សំណួរទី 1

    A developer writes <code>if (now > start)</code> instead of <code>if (now > start - 24h)</code>. What is that wrong line?

    • An error
    • A fault
    • A failure
    • A validation issue
  2. សំណួរទី 2

    The team demonstrates the CLI to the club leader to check that it really solves the club's problem. This activity is…

    • Verification
    • Static analysis
    • Validation
    • Regression testing
  3. សំណួរទី 3

    A test runs <code>RegistrationService</code> together with <code>CsvRegistrationRepository</code> writing a real temporary file. Which level is it?

    • Unit
    • Integration
    • System
    • Acceptance
  4. សំណួរទី 4

    Capacity is 30 and k is the number of seats already taken. Which set gives one representative for each valid partition, "seat free" and "full"?

    • k = 5 and k = 40
    • k = 5 and k = 10
    • k = 28 and k = 29
    • k = 40 and k = 50
  5. សំណួរទី 5

    Cancellation is allowed up to and including 24 h before the start S. Which values does 2-value boundary value analysis test for this rule (1-minute resolution)?

    • S − 48 h and S
    • S − 24 h and S − 24 h + 1 min
    • S − 25 h and S − 23 h
    • Only S − 24 h
  6. សំណួរទី 6

    For <code>admit(taken, capacity, waitlistOn)</code> with two <code>if</code> decisions, the tests (10, 30, false) and (30, 30, true) are run. What is the branch coverage?

    • 25 %
    • 50 %
    • 75 %
    • 100 %
  7. សំណួរទី 7

    Why does the test call <code>ASSERT_TRUE(reg.has_value())</code> before <code>EXPECT_EQ(reg->status, …)</code>?

    • ASSERT is faster than EXPECT
    • To stop the test before dereferencing an empty optional
    • EXPECT_EQ cannot compare enums
    • ASSERT_TRUE also checks the status
  8. សំណួរទី 8

    Why does <code>RegistrationService</code> receive a <code>Clock</code> instead of calling <code>system_clock::now()</code>?

    • It makes the program run faster
    • Tests can set the time exactly, so time rules are deterministic
    • GoogleTest cannot link against <chrono>
    • The C++ standard forbids calling now() in a class
  9. សំណួរទី 9

    A bug is in state Fixed. The tester re-runs the test and it still fails. Which state comes next?

    • Closed
    • Rejected
    • Verified
    • Reopened
  10. សំណួរទី 10

    The team found 12 defects before release and the client found 3 afterwards. What share of defects escaped?

    • 3 %
    • 20 %
    • 25 %
    • 80 %