PPTX HD - Problemspace

Report
Chapter 10
Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Overview
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
The First Computer Bug
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Fail Early
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Contracts
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Contracts
1. preconditions - relationships that must hold
before a function is executed,
2. postconditions - relationships that must hold
after a function is executed,
3. invariants - relationships that must hold
while a function is executed.
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Contracts
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Contracts
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Logging
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Logging
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Log Categories
Table 0.0.1: Log Categories
Mode
Description
Information that is useful when debugging
debug
a problem but otherwise may not be
particularly useful.
info
warning
error
Information that is provided when
processes are working correctly.
Information which points to unusual
system state.
The application is unable to proceed
normally because of reasons indicated.
A very serious error has happened which
critical
will likely cause the system to terminate or
become unresponsive.
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Logging
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Logging
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Logging
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Logging Output
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Unit Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Unit Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Unit Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Unit Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Unit Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Equivalence Classes
The equivalence classes we might consider for this
code include:
• even positive numbers
• odd positive numbers
• even negative numbers
• odd negative numbers
• zero
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Equivalence Classes
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Regression Testing
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Test Driven Development
Copyright © 2014 Dr. James D. Palmer; http://jdpalmer.org/cs1
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

similar documents