20120524 english lt2_pythontoolsfortesting
Upcoming SlideShare
Loading in...5
×
 

20120524 english lt2_pythontoolsfortesting

on

  • 514 views

 

Statistics

Views

Total Views
514
Views on SlideShare
514
Embed Views
0

Actions

Likes
0
Downloads
2
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

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
  • \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

20120524 english lt2_pythontoolsfortesting 20120524 english lt2_pythontoolsfortesting Presentation Transcript

  • Python tools for testing English LT #2Kazuhiro Oinuma (@oinume)
  • About myself
  • About myself• CyberAgent,Inc since 2010.3
  • About myself• CyberAgent,Inc since 2010.3• Like Perl, Python, Ruby
  • About myself• CyberAgent,Inc since 2010.3• Like Perl, Python, Ruby• Twitter: @oinume
  • About myself• CyberAgent,Inc since 2010.3• Like Perl, Python, Ruby• Twitter: @oinume• My blog: Oinuma Nippou
  • Recently I learned
  • Recently I learned• py.test
  • Recently I learned• py.test• tox
  • Recently I learned• py.test• tox• ToravisCI
  • py.test
  • py.test• An unit test library
  • py.test• An unit test library• Better than nose
  • py.test• An unit test library• Better than nose • Test results are readable
  • py.test• An unit test library• Better than nose • Test results are readable • Has mocking feature
  • py.test• An unit test library• Better than nose • Test results are readable • Has mocking feature • Can generate junit xml format
  • nose test results
  • py.test test results
  • Mocking featuremonkeypatch.setattr()overwrites an attribute (method)
  • --junitxml
  • --junitxml• --junitxml=junit.xml generates XML for Jenkins
  • --junitxml• --junitxml=junit.xml generates XML for Jenkins• This is a core feature
  • --junitxml• --junitxml=junit.xml generates XML for Jenkins• This is a core feature • nose s one is optional.
  • tox
  • tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)
  • tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)• Using virtualenv
  • tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)• Using virtualenv • Python environment manager
  • tox• Run unit tests with multiple pythons (2.5, 2.6, 2.7, etc...)• Using virtualenv • Python environment manager• Demo
  • TravisCI
  • TravisCI
  • TravisCI• CI tools for open-sourced Github projects
  • TravisCI• CI tools for open-sourced Github projects• Ready for Perl, Python, Ruby, Java, JavaScript (w/ Node.js), Scala
  • 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!!
  • How to get to use
  • How to get to use• Enabling TravisCI hook for Github
  • How to get to use• Enabling TravisCI hook for Github• Put .travis.yml in the project directory
  • How to get to use• Enabling TravisCI hook for Github• Put .travis.yml in the project directory• Then, just commit and push !
  • Enabling a hook
  • .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
  • After build
  • Testing becomes more fun !
  • Thank You