Testing is not a @#$%! Bad Word

Overview





  1. Types of Testing
  2. Whats Important?
  3. How do we Mature?



Fun Facts






When did Testing and QA begin?


Food Tasting


Japanese Fugu

The deadly puffer fish


Weapons & Ammo



Rear Admiral Grace Hopper 

& The Bug



Types of Testing

(in software development)

Unit Testing





Individual software components or modules. (A Unit of code)



(More on this later!)


Integration Testing


Points of connectivity between modules, applications, systems





Functional Testing


Black-box testing focused on the requirements of the task rather than the application/system itself


Smoke Testing


Simple set of important tasks to ensure no major failures


Security Testing


Ensuring no forms of hacking, external attacks, injections,

or otherwise are possible.


Briefly: Other Types of Testing




Load Testing
Usability Testing
Performance Testing
A/B Testing
Manual Testing

.... and so many more!



How to Test Code?

Writing Bad Unit Tests





  • Unit Tests do not find bugs
  • Unit tests do not test integrations to other components
  • If you are writing a mock...
    you are probably not testing what you think you are!

The Unit Testing Chimera

Writing Good Unit Tests





"It Depends"

Situation Vs. Goals




  • Easy to Write
  • Readable
  • Reliable
  • Fast




Digging 

into the Technical Details



Test Things

that you don't want to change




  • Varied Results? --> Refactor Time?
  • Don't Micromange your tests! --> Maintenance Burden
  • Test public guarantees --> Customer Contracts

Explicit Test Names

& Expected Patterns



test_all_the_things():




test_this_thing():
test_this_thing_with_rice():
test_this_similar_thing():
test_this_similar_thing_with_rice():

Copy Pasta vs DRY





Don't Repeat Yourself:
!! can be dangerous to your testing effort !!



Well... Now What?

New Feature? New Test!






Create one test at a minimum for each new feature!

New Refactor? New Test!





Break functions into sizable chunks.


Building something New?

New test!




Test Driven Development

Test Driven Development





  1. Set goal for outcome
  2. Write the test first
  3. Build the code to the test's outcome

In Summary...



  1. Good Tests save you time, Bad Tests waste it


  2. Start off simple


  3. Remember the Puffer Fish



Questions?





Lets Write Some Code!

Testing is not a bad word

By chellygel

Testing is not a bad word

  • 687