Cosi 165a - IT Entrepreneurship
Mocking
Mocking
Overview
SUT (“System under test”)
Collaborators (other objects needed to test SUT)
Decoupling is a major goal
What is a Mock?
An object that stands in for another object during testing
Make sure that only the right methods are called
Other terms: doubles, stubs, and others. Don’t get confused.
Advantages
Decoupling is always a good thing.
Performance
Maintainability
Testability
If you introduce a bug in a class
Only the tests that are testing that class will fail
So, fewer false positives
Disadvantages
Need to maintain to consistency between the mock and the class-being-mocked
Otherwise you may be testing somethingn that doesn’t even exist
Coding example:
Doubles Demo
Refs:
Minimalicious Testing in Ruby
Great conceptual overview:
Mocks aren’t Stubs
Was this helpful!?
yes
/
no
Welcome
Term Overview
List of lectures
Guide to this site
Entrepreneurial Projects
Lectures
Lean Startup Immersion
Welcome!!
Intro to Lean Startup
Hypotheses/Assumptions
Minimum Viable Product
Review and practice
Metrics & Growth Engine
Pivot and Grow
Pilot Project Conclusion
Frame 1
Term project Kickoff
Market segments/Value Prop
Quant and Qual Testing
Mockups and Prototypes
Business Models
Frame 1 Conclusion
Frame 2
UI and UX Basics
User Experience Flow
Product Architecture
Client and the server data models
Frame 2 Review
Frame 3
Pricing Models
Finance for Geeks
Growth Hacking
Real World Survival Kit
Intellectual Property [IANAL]
Marketing for Entrepreneurs
Pizza Party?!
Background
Learning Objectives
Homework info
FAQ for Pito Salas
Grading
Teachers
Lexicon
Interesting links
Credits and acknowledgements
Catalog of Topics