Automated Testing
Upcoming SlideShare
Loading in...5
×
 

Automated Testing

on

  • 4,676 views

 

Statistics

Views

Total Views
4,676
Views on SlideShare
4,377
Embed Views
299

Actions

Likes
5
Downloads
127
Comments
0

4 Embeds 299

http://johnpaulett.com 264
http://jhcore.com 27
http://www.slideshare.net 5
http://localhost:8000 3

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Automated Testing Automated Testing Presentation Transcript

  • Automated Testing John Paulett jhcore.com 4.17.2009
  • testing sucks
  • buggy code sucks more
  • being an example on thedailywtf.com sucks the most
  • types of testing
  • types of testing unit
  • functional types of testing unit
  • security usability scaling load regression functional types of testing smoke accessibility requirement unit acceptance touch recovery
  • security usability scaling load regression functional types of testing smoke and more ... accessibility requirement unit acceptance touch recovery
  • security usability scaling load regression functional types of testing smoke and more ... accessibility requirement unit acceptance touch recovery
  • security usability scaling load regression functional types of testing smoke and more ... accessibility requirement unit acceptance touch recovery
  • unit testing
  • smallest testable part method / function level assertions
  • junit test case import junit.framework.TestCase; public class TestMath extends TestCase { public void testSquare() { assertEquals(16, Math.square(4)); } }
  • test drive development public class Math { public static int square(int x) { return x; } }
  • failure
  • fix the bug public class Math { public static int square(int x) { return x * x; } }
  • w00t!
  • forces better design separate presentation from business logic from data access! “mock” out what your not testing fake data access class when testing business logic
  • every language has a unit testing framework even php
  • regression testing
  • know when things break
  • a test for every build (and a build for every commit)
  • automate your build
  • hudson hudson.dev.java.net
  • functional testing
  • selenium seleniumhq.org
  • load testing
  • jmeter jakarta.apache.org/jmeter/
  • requirements testing
  • fitnesse fitnesse.org
  • test coverage
  • how much code is tested eclemma.org
  • wuss excuses
  • wuss: i'm the only one on the project
  • winner: i'll be ready for when more people join winner: i want my code to work
  • wuss: just for my research, not production code
  • winner: i don't want to look like a fool publishing buggy results
  • wuss: i test it by using it
  • winner: i realize i never even get close to testing all of it after every change
  • wuss: it is already 1M LOC, with no tests, it's too late
  • winner: i'll add a couple tests when i fix a bug
  • key steps to start 1) unit test on all new code ● when you find a bug in existing code ● work towards 100% branch coverage ● 2) automate your build, test every commit
  • est finis slides at jhcore.com write at least 1 unit test next time you code get your test on!