SE401 · Annotated SlidesTest Cases — Test Cases
Test Cases · Annotated slides

Test Cases

Test selection, what a test case is and what makes a good one, the triangle example, why we write test cases, when testing is complete, test scaffolding (drivers, stubs, harnesses), test oracles, defect tracking and smoke tests.

Slide text Study notes Highlight: key words Tips, tricks & traps Seen again elsewhere How it can come up
Slide 1: Slide 1
Exam weight Low
    Slide 2: • Testing • Test selection
    Exam weight Low
      Slide 3: • There is a massive misunderstanding about testing: that it improves software. It doesn't!
      Exam weight Low

        Test selection

        4
        Exam weight Low
          Slide 5: • A
          Exam weight Low
            Slide 6: • A test case is a description of a specific interaction that a tester will have in order to test a single behavior of the software.
            Exam weight Low
            1. Test case: inputs, preconditions, expected results and postconditions for one test objective. Must be repeatable.
            Slide 7: • Test cases must be repeatable. • Good test cases are data-specific, and describe each interaction
            Exam weight Low
              Slide 8: • First you must understand the language fundamentals
              Exam weight Low
                Slide 9: • Test Cases need to be simple and transparent • Create Test Case with end user in mind
                Exam weight Low
                1. Good test cases: simple, one thing at a time, traceable to requirements, with a clear expected result.
                Slide 10: • Boundary Value Analysis (BVA)
                Exam weight Low
                  Slide 11: While drafting a test case do include the following information • The description of what requirement is being tested
                  Exam weight Low
                    Slide 12: • Cover all possible valid input
                    Exam weight Low
                      Slide 13: • Beware of problems with comparisons
                      Exam weight Low
                        Slide 14: Let’s consider the triangle example • Cover all possible valid input
                        Exam weight High
                        1. Triangle problem: classify three sides as equilateral, isosceles, scalene, or not a triangle: include invalid inputs (0, negatives, a + b ≤ c).
                        🎯 How this can come up · 1 question
                        Written

                        Give three test cases for a program that classifies a triangle from three integer sides.

                        Slide 15: Let’s consider the triangle example • How to test the code?
                        Exam weight Low
                          Slide 16: • You cannot test every possible input, parameter value, etc.
                          Exam weight Low
                            Slide 17: Slide 17
                            Exam weight Low
                              Slide 18: Slide 18
                              Exam weight Low
                                Slide 19: • Why we write test cases?
                                Exam weight Low
                                  Slide 20: • Test one thing at a time per test method.
                                  Exam weight Low
                                    Slide 21: • The software testers begin executing the test plan after the developers deliver the alpha build, or a build that they feel is
                                    Exam weight Low
                                      Slide 22: • When is testing complete?
                                      Exam weight Low
                                      1. Testing is "complete" when exit criteria are met (coverage, remaining risk, time/budget), never when all bugs are gone.
                                      Slide 23: • Designing test cases and test suites is creative
                                      Exam weight Low
                                        Slide 24: • Test design often yields test case specifications, rather than concrete data
                                        Exam weight Low
                                          Slide 25: • Code produced to support development activities (especially testing)
                                          Exam weight Low
                                            Slide 27: Slide 27
                                            Exam weight Low
                                              Slide 28: Slide 28
                                              Exam weight Low
                                                Slide 29: • How general should scaffolding be?
                                                Exam weight Low
                                                  Slide 30: • Did this test case succeed, or fail?
                                                  Exam weight Low
                                                  1. Oracle: decides pass/fail (comparison-based with expected outputs, or checks of properties).
                                                  Slide 31: Slide 31
                                                  Exam weight Low
                                                    Slide 32: Slide 32
                                                    Exam weight Low
                                                      Slide 33: • Sometimes there is no alternative to human input and observation
                                                      Exam weight Low
                                                        Slide 34: • The defect tracking system records and tracks defects. • It routes each defect between testers, developers, the project manager
                                                        Exam weight Low
                                                          Slide 35: • A smoke test is a subset of the test cases that is typically representative of the overall test plan.
                                                          Exam weight High
                                                          1. Smoke test: a quick subset of tests to check the build is stable enough for further testing.
                                                          🎯 How this can come up · 1 question
                                                          MCQ

                                                          A quick check that a new build’s main functions work before deeper testing is a:

                                                          Slide 36: • Goal: Separate creative task of test design from mechanical task of test execution
                                                          Exam weight Low