shortcuts:
TOC
NanoTwitter
search:
Why does testing matter?
slides
|
Conceptual Arguments for Testing
Why Test?
The mental habits needed to write tests parallel exactly those needed to design
Insist on looking at the class/module/unit first as a black box that delivers services
Good design delays all decisions that can be delayed until further requirements are nailed down.
A good test suite can act as a detailed spec
Testing and developing in parallel tends to surface more bugs early int development
Tests demonstrate that your code actually works!
A good test suite protects you from regressions
Make refactoring possible and safe [how safe?]
Intro to Automated Testing
Unit testing: test a small unit of code that has few side effects
Integration testing: test a subsystem that has many components
System testing: test the complete system from top to bottom
Code Coverage: Seeing how much of your actual code is run during a test or production
Performance testing: Checking the speed of your code
Can you test too much?
Testing is not free!
Tests have to be written, debugged and run
Tests have to be maintained
The code changes in two places: implementation and test
Sometimes more: test fixtures, database schemas
What not to test
Try not to test the same thing in more than one place
Try not to test a library which is itself well tests
Try not to test something that is self-evidently trivial (eye of the beholder)
What to test
Try to test code which is prone to off-by-one errors
Try to test code with intricate algorithms
Try to test to verify assumption
Intro
Cosi105 - Scalability 2022 Syllabus
List of lectures
Nano Twitter
Homeworks
Lectures
Web Apps + Sinatra
Welcome
What is Scalability?
Cosi166 Quick Bullets
Intro to Sinatra
Sinatra and Twitter
NanoTwitter introduced
nano Twitter
Starting to think about scaling
Scaling at Hubspot
Service Oriented Architecture
Deploying to the Cloud
Scalable Service design
Scalability, continued
Testing in the world of SOA
Scaling Patterns
Testing Scalability
Tuning for Scale
Logging
Caching
Database Tuning 1
Database Tuning 2
Concurrency 1
Concurrency 2
Queueing
SOA + µservices
Software Engineering
Scalability Runoff 1
Last class!
Background
Technical Presentations
Misc Links and Resources