081112slides_handouts

081112slides_handouts - 1 UVa CS205 Engineering Software...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 UVa CS205 Engineering Software 081112 Unit Testing UVa CS205 Engineering Software 081112 Unit Tests ¡ Unit tests give evidence of the correctness of individual modules (i.e., in Java, classes or methods) ¡ Writing test cases: ¢ Test all paths through the code thoroughly . ¢ Test incrementally ¡ "code a little, test a little, code a little ...." ¢ Test-Driven programming (concept of eXtreme programming) ¡ Write tests first. ¡ Then write code, stopping as soon as all tests are passed. ¢ Separate out the specification tests from the implementation tests ¡ Æ if you change the implementation, only change the implementation tests UVa CS205 Engineering Software 081112 More on Unit Tests ¡ More on writing test cases: ¢ Common practice in large project to run test suite frequently ¡ at least once a day ¡ before checking code into repository ¢ Test each module in isolation so that if you make changes in other modules tests don’t need to be rerun ¢ Create mock objects as substitutes for the rest of the program....
View Full Document

{[ snackBarMessage ]}

Page1 / 6

081112slides_handouts - 1 UVa CS205 Engineering Software...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online