CSC 405, Week 7

Guest Lecture on Entrepreneurship
Project-Specific Testing Details
Relevant Testing Background

  • Evaluation of Week 7 Critical Tasks

    1. Weekly Lecture/Lab Overview

      1. Monday:

        1. Guest lecture/discussion on entrepreneurship

        2. Brief introduction to testing

        3. Lab time for project work

      2. Wednesday:

        1. Continued testing discussion

        2. Testing set up and critical task work in lab

      3. Friday:

        1. Project-specific testing details

        2. Check completion of Week 7 critical tasks

        3. Assign Week 8 critical tasks, including testing duties

        4. Lab time for project work
      Types of testing we'll perform:

      1. Functional Model -- JUnit testing through model API CSC405-W12-L7 Slide 2

      2. Functional View -- GWTTesting through view API

      3. Acceptance, Automated -- Selenium testing through HCI

      4. Acceptance, Manual -- human testing through HCI

    2. Mapping Testing Terminology onto 405 and 406

      1. Consider testing activities from Week 3 Lecture Notes.

      2. What follows are notes on how they'll be accomplished in 405 & 406.

    3. Unit Testing

      1. For model, use JUnit3.

      2. For view, use GWTTest.

      3. For DB layer, adapt SQLite testing framework.

      4. For critical methods, formalize with JML.

    4. Module Testing

      1. For model and view, start with stubbed DB test fixtures.

      2. Output results with JUnit Assert methods.

      3. Also output to differencable log.

    5. Integration Testing

      1. Replace stubbed DBs with actual DBs.

      2. Re-run module tests.

    6. System Testing

      1. Run the top-most model/view tests with Junit Runner.

      2. Run automated UI tests with Selenium.

    7. Acceptance Testing

      1. Use existing acceptance test procedure.

      2. Run for each department's Winter 2012 schedule.

    8. Black Box Testing

      1. Write initial test cases, using JML specs for critical methods.

      2. Particular focus on end-user data validation preconditions.

    9. White box

      1. Add more tests based algorithm details in code.

      2. Add more tests based coverage results.
      CSC405-W12-L7 Slide 3

    10. Testing Design

      1. JUnit3 API is well documented.

      2. So is GWTTest.

      3. And SQLite test framework as well.

    11. Test Plan

      1. I strongly recommend a common, uniform structure for these.

      2. Unit test plans in testing method Javadoc comments.

      3. Module test plans in class Javadoc comments.

      4. Integration test plan as a text document.

    12. Top-down Testing

      1. Algorithm with stubbed DBs.

      2. Selenium with or without underlying stubs.

    13. Bottom-up Testing

      1. Algorithm without UI.

      2. Possibly some form of independent DB testing.

    14. Test Case

      1. Defined specifically by JUnit and GWTTest

    15. Testing Oracles

      1. For critical methods, a formal postcondition.

      2. For other aspects of test, human-produced validation methods.

    16. Testing Stubs

      1. Used primarily for independent algorithm testing.

      2. Elsewhere as needed.

    17. Test Driver

      1. Provided by JUnit, GWTTest, Selenium.

    18. Regression Testing

      1. With JUnit Assert.

      2. Differencable logs for algorithm internals.

    19. Test Coverage CSC405-W12-L7 Slide 4

      1. Use Coberatura.

      2. It integrates well with Junit3.

    20. Test Subsumption

      1. Unplug independent DB tests when algorithm is integrated.

      2. Much of Junit tests is effectively subsumed by Selenium-driven tests, but we'll do both as part of the official regression suite.

    21. Test Automation

      1. Via Eclipse.

      2. May also use ant builds and/or makefiles.

    22. Mutation Testing

      1. Might be interesting to do a bit in 406.

    23. Testing Harness

      1. Covered above, particularly under Test Drivers.

    24. Testing Frameworks

      1. To summarize:

        1. JUnit for model API

        2. GWTest for view API

        3. Selenium for automated HCI.

        4. Human-performed for accepted HCI.

      Resources

    25. Design and testing best practices.

      1. Concrete structure in Fisher's 309 SOPs:

        1. Vol 1 -- Repository Structure

        2. Vol 2 -- Design & Imple'n Conventions

        3. Vol 3 -- Testing Conventions
        CSC405-W12-L7 Slide 5 Design and testing best practices, cont'd

      2. Widely-used tools:

        1. CppUnit

        2. Gcov

        3. Linux Test Project, Lcov
        Design and testing best practices, cont'd

      3. An exemplary "best testing practice site" --

        SQLite Testing