Junit for SE Class 2008/2009

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Junit for SE Class 2008/2009 - Presentation Transcript

    1. Software Engineering ●Testing ●Unit-testing ●JUnit
    2. Why testing at all?
    3. Simplest case: Development => Production 700 600 500 (random numbers, but you get the idea) 400 Bugs found 300 Bugfix Cost 200 100 0 Development Release
    4. Real world (no testing) 1600 € 1,500.00 1400 1200 1000 800 Bugs found Cost per Bug 435 600 400 321 200 € 200.00 0 Development Production
    5. Real world (no testing) 1600 321 x 1500 = € 1,500.00 Total: 1400 €481,500 € 568,500 1200 435 x 200 = 1000 800 €87,000 Bugs found Cost per Bug 435 600 400 321 200 € 200.00 0 Development Production
    6. Real world + testing 121 x 1500 = 1600 €181,500 € 1,500.00 Total: 1400 € 308,500 1200 635 x 200 = €127,000 1000 635 800 Bugs found 600 Cost per Bug 400 € 200.00 200 121 0 Development Production
    7. no testing vs + testing 600000 € 568,500.00 500000 about a half! 400000 € 308,500.00 300000 Cost 200000 100000 0 No testing With testing
    8. In the software eng. process... Imagination Real world Design Coding
    9. In the software eng. process... Imagination Real world GAP Design ` Coding
    10. In the software eng. process... Imagination Real world Design Testing Coding
    11. Continue with examples  A living cell: A quick introduction to JUnit, D. Steinberg http://www.slideshare.net/sundar22in/junit  Shopping Cart Unit testing with JUnit, T. Zimmermann http://www.slideshare.net/tom.zimmermann/unit-testing-with-junit
    12. Let's try it out!
    13. Create a new Java Project
    14. Let's create a model class ...
    15. ... an Ad post
    16. Now, a JUnit Class
    17. Call it PostTest, to follow a name pattern
    18. Confirm to add JUnit library
    19. First things first: setup() and tearDown()
    20. Add a couple of methods to our model class
    21. Let's add some tests!
    22. Here we go: Run As => JUnit Test
    23. All tests passed!
    24. Time for the TestSuite
    25. Let's call it PostTestSuite
    26. Use it with PostTest.class
    27. Let's try it out!
    28. Here you have it: JUnit's Swing GUI
    29. Introducing new model attribute: price
    30. Reflect that in our TestCase and re-run JUnit test ...
    31. Oops! Test failed. failed Can you figure out why?
    32. Further reading  JUnit FAQ http://junit.sourceforge.net/doc/faq/faq.htm  JUnit http://www.junit.org

    + crhym3crhym3, 12 months ago

    custom

    523 views, 1 favs, 0 embeds more stats

    Slides for SE Class 2008/2009
    http://projects.jamcl more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 523
      • 523 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 25
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories

    Tags