Your SlideShare is downloading. ×
  • Like
20120524 english lt2_pythontoolsfortesting
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

20120524 english lt2_pythontoolsfortesting

  • 359 views
Published

 

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
359
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. Python tools for testing English LT #2Kazuhiro Oinuma (@oinume)
  • 2. About myself
  • 3. About myself• CyberAgent,Inc since 2010.3
  • 4. About myself• CyberAgent,Inc since 2010.3• Like Perl, Python, Ruby
  • 5. About myself• CyberAgent,Inc since 2010.3• Like Perl, Python, Ruby• Twitter: @oinume
  • 6. About myself• CyberAgent,Inc since 2010.3• Like Perl, Python, Ruby• Twitter: @oinume• My blog: Oinuma Nippou
  • 7. Recently I learned
  • 8. Recently I learned• py.test
  • 9. Recently I learned• py.test• tox
  • 10. Recently I learned• py.test• tox• ToravisCI
  • 11. py.test
  • 12. py.test• An unit test library
  • 13. py.test• An unit test library• Better than nose
  • 14. py.test• An unit test library• Better than nose • Test results are readable
  • 15. py.test• An unit test library• Better than nose • Test results are readable • Has mocking feature
  • 16. py.test• An unit test library• Better than nose • Test results are readable • Has mocking feature • Can generate junit xml format
  • 17. nose test results
  • 18. py.test test results
  • 19. Mocking featuremonkeypatch.setattr()overwrites an attribute (method)
  • 20. --junitxml
  • 21. --junitxml• --junitxml=junit.xml generates XML for Jenkins
  • 22. --junitxml• --junitxml=junit.xml generates XML for Jenkins• This is a core feature
  • 23. --junitxml• --junitxml=junit.xml generates XML for Jenkins• This is a core feature • nose s one is optional.
  • 24. tox
  • 25. tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)
  • 26. tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)• Using virtualenv
  • 27. tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)• Using virtualenv • Python environment manager
  • 28. tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)• Using virtualenv • Python environment manager• Demo
  • 29. TravisCI
  • 30. TravisCI
  • 31. TravisCI• CI tools for open-sourced Github projects
  • 32. TravisCI• CI tools for open-sourced Github projects• Ready for Perl, Python, Ruby, Java, JavaScript (w/ Node.js), Scala
  • 33. TravisCI• CI tools for open-sourced Github projects• Ready for Perl, Python, Ruby, Java, JavaScript (w/ Node.js), Scala• You don t need to setup Jenkins any more!!
  • 34. How to get to use
  • 35. How to get to use• Enabling TravisCI hook for Github
  • 36. How to get to use• Enabling TravisCI hook for Github• Put .travis.yml in the project directory
  • 37. How to get to use• Enabling TravisCI hook for Github• Put .travis.yml in the project directory• Then, just commit and push !
  • 38. Enabling a hook
  • 39. .travis.ymllanguage: pythonpython: - "2.5" - "2.6" - "2.7"install: - pip install . --use-mirrors - pip install mock>=0.8 pytest>=2.2 pytest-cov>=1.5script: - py.test tests/internal
  • 40. After build
  • 41. Testing becomes more fun !
  • 42. Thank You