1 / 10

Test Driven Development

Test Driven Development. George Mason University. Today’s topics. Review of Chapter 1: Testing Go over examples and questions testing in Python. Testing review. What is a bug? fault? failure? What is the goal of testing? What are the benefits of test-driven development?

nubia
Télécharger la présentation

Test Driven Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Test Driven Development George Mason University

  2. Today’s topics • Review of Chapter 1: Testing • Go over examples and questions • testing in Python

  3. Testing review • What is a bug? fault? failure? • What is the goal of testing? • What are the benefits of test-driven development? • What makes up a test case? • test input(s) • test result • What is a test suite?

  4. Input Domain Characterization • What are the partitions of the inputs? • What are the partitions for the outputs? (equilateral, isosceles, etc…) • Does order matter? (this will almost always be yes, but the order of what is important)

  5. Boundary Conditions • What are the partitions of the inputs? • What are the partitions for the outputs? (equilateral, isosceles, etc…) • Does order matter? (this will almost always be yes, but the order of what is important) • What are the boundary cases for the input partitions? • What are the boundary cases for the output partitions? • What’s the smallest input I can have? • What’s the largest input I can have?

  6. Inputs of varying number • What are the partitions of the inputs? • What are the partitions for the outputs? (equilateral, isosceles, etc…) • Does order matter? (this will almost always be yes, but the order of what is important) • What are the boundary cases for the input partitions? • What are the boundary cases for the output partitions? • What’s the smallest input I can have? • What’s the largest input I can have? • With sequences (like lists), what is the smallest size? What is the next smallest size?

  7. Examples • What examples did you have trouble with?

  8. Converting your tests to python • Python has several good resources for writing tests • However, we won’t use them this semester, because we need to know python first! • This semester, we will write test cases for all of our programming projects • Follow the instructions on the project specifications

  9. Running test cases • Tests are meant to be run automatically • Again, python has resources for testing, that unfortunately we can’t use yet • Refer to the project specifications for how to run your tests • Recall, your tests will all fail at first before you write any code – this is okay!

  10. Questions?

More Related