Automated testing in Python and beyond
Upcoming SlideShare
Loading in...5
×
 

Automated testing in Python and beyond

on

  • 1,659 views

KiwiPyCon2011, Wellington, Sunday, Track 1, Automated testing in Python and beyond by Brenda Wallace, Open source hacker @ Weta Digital. Python libraries and extensions. A short intro to unitest and ...

KiwiPyCon2011, Wellington, Sunday, Track 1, Automated testing in Python and beyond by Brenda Wallace, Open source hacker @ Weta Digital. Python libraries and extensions. A short intro to unitest and why they are so good for you.
Overview of python unittests and nose, and comparison to popular unittesting frame works in other languages, including perl, php, ruby, java, scala, erlang.

Statistics

Views

Total Views
1,659
Views on SlideShare
1,659
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

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 in Python and beyond Automated testing in Python and beyond Presentation Transcript

    • Automated testing in Python and beyond
      Brenda Wallace
    • Production Engineer, Weta Digital
  • Unit Tests
    • Unit Testing is testing of individual program "units" in relative isolation
  • Wah?
    • What they are
    • Input -> expected output
    • That's a test
  • Glorified If/Else statements if (stuff happens as expected): OK! else: Fail.
  • Python unit tests
    • class testMyCode(unittest.TestCase):
    def test_Stuff(self): a = MyDataProcessingThing(5) self.assertEqual(a.blah, 9)
  • Python
    • Pass, fail, coverage
  • Super Powers
    • Massive refactors, and know they worked
  • Wanna try something wickedly clever?
    • Do code change quickly
    • instantly see if it works for all 1,000 of your use cases
  • Confidence
    • Debugging is fast
    • Find bugs elsewhere
    • Blame.
    • You look GOOD.
  • More Python
    • Nose!
    • Logging capture
    • STDOUT capture
    • Running single tests
  • Disney
    • pythoscope
  • Where ?
    • Check them into a folder called tests
    • Keep in git/whatever
  • The Theme
      • There were shortcomings in the other frame work so instead of helping fixing those, we started a new one.
  • Java
    • JUnit
      • What everyone uses
    • JTiger
      • There were shortcomings, so instead of fixing those, we started a new one.
    • TestNG
      • Our new one fixes different short comings
    • Looks like python, but with less words
    • But life is too short
  • Perl
    • Perl Unit
    • +60 more on cpan
    • Pod::Coverage
  • PHP
    • PhpUnit
    • SimpleTest
      • Web
  • Erlang
    • EUnit
    • Best intro to testing ever.
  • Write tests
    • Write tests before you write code
  • Re-run
    • Hudson/Jenkins
    • On cron e.g. every hour
    • On commit, poll git for changes
    • Email everyone when it breaks
    • Email only the person who broke it.
  • Thank You