real life testing cs310 guest lecture
play

Real Life Testing CS310 Guest Lecture (why testing can be both - PowerPoint PPT Presentation

Real Life Testing CS310 Guest Lecture (why testing can be both hellish and satisfying) Andrew Eisenberg Tasktop Technologies @werdnagreb (twitter) Automated tests of some form are really, really , REALLY important (and fun) About me


  1. Real Life Testing CS310 Guest Lecture (why testing can be both hellish and satisfying) Andrew Eisenberg Tasktop Technologies @werdnagreb (twitter)

  2. Automated tests of some form are really, really , REALLY important (and fun)

  3. About me • Rice University 94-98 • Morgan Stanley 00-02 • UBC Grad School 02-08 • SpringSource/VMware/Pivotal 08-13 My grad school days • Tasktop 13-now (it was very stressful)

  4. Why should we test? Make sure the thing we built is really the thing we thought we built

  5. No, really…why should we test? • Correctness – over time • Confidence to change • Documentation – Capture design decisions – Communicate to new team members – Communicate to future you • Make sure you are building the right thing

  6. How to test? • Just try it out • Hire someone else to try it out • Write more code that does this automatically What are the problems with each of these?

  7. What kinds of tests are there? • Unit Single components • Integration Multi-components • System Everything together Note: oversimplification, and not correct. But: useful (and roughly Tasktop strategy)

  8. Unit Testing • Single components – Class, module, file, etc • Mock/stub dependencies • Code coverage important – (but don’t rely on coverage alone) • Must be fast! • Run before committing

  9. Unit testing frameworks I use daily JUnit (Java) Jasmine (JavaScript)

  10. SHOW ME SOME ?*#! CODE ALREADY

  11. Integration Testing • Multiple components – package, folder, project – interactions between components • No mocking/stubbing • Speed less important • (Usually) run before committing

  12. Integration testing frameworks I use daily Protractor (JavaScript) JUnit (Java)

  13. SHOW ME SOME ?*#! CODE ALREADY

  14. System tests • Entire system – multiple scenarios • A complex beast – There are no frameworks for this – Specific to each product • Slow • Stability is an issue • Run sometimes

  15. SHOW ME SOME ?*#! CODE ALREADY

  16. Testing is… • …really, really important. • …hard to do right. • …something that requires effort. • …different things to different people. • …about more than just correctness. • …unit, integration, system. • …a joy and a curse.

  17. Andrew Eisenberg @werdnagreb (twitter)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend