SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
unittest嫌いが
               unitestをtesting
                   発表者 : 会津 剛
                   Twitter : @Ido




12年10月22日月曜日
あんた、だれよ
                 • @Ido(あいづ つよし)
                 • 株式会社バスキュール号所属
                  できない担当

                 • 元々はFlashエンジニア
                  (たぶん今も)

                 • 業務でPython使い始めて 約2年
                 • unittestsあまり書きません

12年10月22日月曜日
みなさん
                CD、CI
               してますか?


12年10月22日月曜日
CI、CDには
               unittestを書くのが必須



12年10月22日月曜日
unittestで
               もっと楽したい


12年10月22日月曜日
unittestの
               青い鳥探し


12年10月22日月曜日
Python testing
               tools taxonomy
                http://pycheesecake.org/wiki/
                PythonTestingToolsTaxonomy




12年10月22日月曜日
unittests
               unittest2


12年10月22日月曜日
doctest



12年10月22日月曜日
py.test



12年10月22日月曜日
nose



12年10月22日月曜日
以上の
               詳しい説明はしません



12年10月22日月曜日
ググれば良記事が
               いっぱいでてくるよ


12年10月22日月曜日
だから、誰も使ってな
          いだろうツールを紹介


12年10月22日月曜日
サンプル実行環境の
                ダウンロード
               https://bitbucket.org/aizu/pycon2012_sample/
                                  downloads




12年10月22日月曜日
• testoob
               • python-subunit
               • testtools
               • testosterone

12年10月22日月曜日
testoob
                      v1.15(2009-10-08)
               http://code.google.com/p/testoob/




12年10月22日月曜日
testoobの概要
               • unittestの機能拡張
               • 正規表現やグロブを使ってテストのフィルタリ
                ングしXMLやHTMLで結果を出力できる

               • テストが失敗したときにpdb(デバッガ)を起動
                できる

               • より詳細なレポートの出力ができる
               • etc...
12年10月22日月曜日
•   結果をカラー出力にする
                   bin/testoob --color-mode=auto tests/suite.py

               •   テストメソッド名を正規表現で絞り込む
                   testoob tests/suite.py --regex='test[A-D]'

               •   結果をHTML出力
                   bin/testoob --html=test.html tests/suite.py

               •   エラー時にPDBを立ち上げる
                   bin/testoob --debug tests/suite.py

               •   エラー時に冗長な情報を表示
                   bin/testoob --vassert tests/suite.py



12年10月22日月曜日
python-subunit
                       v0.0.8(2012-05-07)
           http://pypi.python.org/pypi/python-subunit/




12年10月22日月曜日
python-subunitの概要


               • unitestを他の言語と容易に連携させる
                ための仲介を行い、統合したテストを
                行うことができる




12年10月22日月曜日
• コマンドラインテスト
                bin/python -m subunit.run tests.suite


               • シェルコマンドラインテスト
                python -m subunit.run tests.sub_suite




12年10月22日月曜日
testtools
                          v0.9.6(2012-08-10)
               http://testtools.readthedocs.org/en/latest/




12年10月22日月曜日
testtoolsの概要
               • TwistedやBazzrのようなプロジェクトか
                ら派生した,便利なunittestの機能拡張

               • 比較メソッドが多岐にわたる
               • 非同期の遅延テストができる
               • テスト時にモンキーパッチが容易に行え
                る


12年10月22日月曜日
testosterone
                          改め
                      assertEquals
                         v0.4.2(2012-03-29)
               https://github.com/whit537/assertEquals



12年10月22日月曜日
assertEquals

               • 漢のテストランナー
               • コマンドラインとcursesのインター
                フェイスを提供し、より簡単にテスト
                の失敗を見つけることができる




12年10月22日月曜日
• CUIインターフェイスを提供
                bin/assertEquals tests.suite




12年10月22日月曜日
結論



12年10月22日月曜日
unittestを
               使いましょう
               そこまで詳細なテストしないし




12年10月22日月曜日
ご清聴
           ありがとうございました



12年10月22日月曜日
バスキュール、バスキュール号では
                   python開発者を
                   随時募集してます

12年10月22日月曜日

Más contenido relacionado

Similar a 【Pycon2012】unittest嫌いがunitestをtesting

WEBアプリケーションビルド・ テストツール YEOMAN
WEBアプリケーションビルド・ テストツール YEOMAN WEBアプリケーションビルド・ テストツール YEOMAN
WEBアプリケーションビルド・ テストツール YEOMAN kamiyam .
 
Jenkins user conference 東京
Jenkins user conference 東京Jenkins user conference 東京
Jenkins user conference 東京Kohsuke Kawaguchi
 
Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...
Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...
Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...JUNICHI YOSHISE
 
GDK48総選挙の裏側
GDK48総選挙の裏側GDK48総選挙の裏側
GDK48総選挙の裏側Kiyotaka Oku
 
Chromium androidビルド
Chromium androidビルドChromium androidビルド
Chromium androidビルドHiroshi Sakate
 
書こう! 使おう! 単体テスト
書こう! 使おう! 単体テスト書こう! 使おう! 単体テスト
書こう! 使おう! 単体テストryohji ikebe
 
10年ぶりの ニューラルネットワーク
10年ぶりの ニューラルネットワーク10年ぶりの ニューラルネットワーク
10年ぶりの ニューラルネットワークTakatsugu Nokubi
 
ALMツールたべくらべ
ALMツールたべくらべALMツールたべくらべ
ALMツールたべくらべKaoru NAKAMURA
 
書こう! 使おう! 単体テスト
書こう! 使おう! 単体テスト書こう! 使おう! 単体テスト
書こう! 使おう! 単体テストryohji ikebe
 
NVIDIA GPUで作るHeadless X11 Linux
NVIDIA GPUで作るHeadless X11 LinuxNVIDIA GPUで作るHeadless X11 Linux
NVIDIA GPUで作るHeadless X11 LinuxTomoki SHISHIKURA
 
Introduction to Continuous Test Runner MakeGood
Introduction to Continuous Test Runner MakeGoodIntroduction to Continuous Test Runner MakeGood
Introduction to Continuous Test Runner MakeGoodAtsuhiro Kubo
 
物体検出フレームワークMMDetectionで快適な開発
物体検出フレームワークMMDetectionで快適な開発物体検出フレームワークMMDetectionで快適な開発
物体検出フレームワークMMDetectionで快適な開発Tatsuya Suzuki
 
"Ordinary" System Development
"Ordinary" System Development"Ordinary" System Development
"Ordinary" System DevelopmentShintaro Kakutani
 
20190722 Building handy CI with zuul and OpenStack
20190722 Building handy CI with zuul and OpenStack20190722 Building handy CI with zuul and OpenStack
20190722 Building handy CI with zuul and OpenStackAkihiro Motoki
 
20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-RubyKoji SHIMADA
 

Similar a 【Pycon2012】unittest嫌いがunitestをtesting (20)

Jenkinsについて
JenkinsについてJenkinsについて
Jenkinsについて
 
JUC2012
JUC2012JUC2012
JUC2012
 
Aiming study#6pdf
Aiming study#6pdfAiming study#6pdf
Aiming study#6pdf
 
WEBアプリケーションビルド・ テストツール YEOMAN
WEBアプリケーションビルド・ テストツール YEOMAN WEBアプリケーションビルド・ テストツール YEOMAN
WEBアプリケーションビルド・ テストツール YEOMAN
 
Tdd
TddTdd
Tdd
 
Jenkins user conference 東京
Jenkins user conference 東京Jenkins user conference 東京
Jenkins user conference 東京
 
Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...
Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...
Recap: Modern CI/CD with Tekton and Prow Automated via Jenkins X - Kubernetes...
 
GDK48総選挙の裏側
GDK48総選挙の裏側GDK48総選挙の裏側
GDK48総選挙の裏側
 
Chromium androidビルド
Chromium androidビルドChromium androidビルド
Chromium androidビルド
 
書こう! 使おう! 単体テスト
書こう! 使おう! 単体テスト書こう! 使おう! 単体テスト
書こう! 使おう! 単体テスト
 
10年ぶりの ニューラルネットワーク
10年ぶりの ニューラルネットワーク10年ぶりの ニューラルネットワーク
10年ぶりの ニューラルネットワーク
 
ALMツールたべくらべ
ALMツールたべくらべALMツールたべくらべ
ALMツールたべくらべ
 
書こう! 使おう! 単体テスト
書こう! 使おう! 単体テスト書こう! 使おう! 単体テスト
書こう! 使おう! 単体テスト
 
NVIDIA GPUで作るHeadless X11 Linux
NVIDIA GPUで作るHeadless X11 LinuxNVIDIA GPUで作るHeadless X11 Linux
NVIDIA GPUで作るHeadless X11 Linux
 
Introduction to Continuous Test Runner MakeGood
Introduction to Continuous Test Runner MakeGoodIntroduction to Continuous Test Runner MakeGood
Introduction to Continuous Test Runner MakeGood
 
物体検出フレームワークMMDetectionで快適な開発
物体検出フレームワークMMDetectionで快適な開発物体検出フレームワークMMDetectionで快適な開発
物体検出フレームワークMMDetectionで快適な開発
 
"Ordinary" System Development
"Ordinary" System Development"Ordinary" System Development
"Ordinary" System Development
 
20190722 Building handy CI with zuul and OpenStack
20190722 Building handy CI with zuul and OpenStack20190722 Building handy CI with zuul and OpenStack
20190722 Building handy CI with zuul and OpenStack
 
20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby
 
As an Test Engineer
As an Test EngineerAs an Test Engineer
As an Test Engineer
 

【Pycon2012】unittest嫌いがunitestをtesting

  • 1. unittest嫌いが unitestをtesting 発表者 : 会津 剛 Twitter : @Ido 12年10月22日月曜日
  • 2. あんた、だれよ • @Ido(あいづ つよし) • 株式会社バスキュール号所属 できない担当 • 元々はFlashエンジニア (たぶん今も) • 業務でPython使い始めて 約2年 • unittestsあまり書きません 12年10月22日月曜日
  • 3. みなさん CD、CI してますか? 12年10月22日月曜日
  • 4. CI、CDには unittestを書くのが必須 12年10月22日月曜日
  • 5. unittestで もっと楽したい 12年10月22日月曜日
  • 6. unittestの 青い鳥探し 12年10月22日月曜日
  • 7. Python testing tools taxonomy http://pycheesecake.org/wiki/ PythonTestingToolsTaxonomy 12年10月22日月曜日
  • 8. unittests unittest2 12年10月22日月曜日
  • 12. 以上の 詳しい説明はしません 12年10月22日月曜日
  • 13. ググれば良記事が いっぱいでてくるよ 12年10月22日月曜日
  • 14. だから、誰も使ってな いだろうツールを紹介 12年10月22日月曜日
  • 15. サンプル実行環境の ダウンロード https://bitbucket.org/aizu/pycon2012_sample/ downloads 12年10月22日月曜日
  • 16. • testoob • python-subunit • testtools • testosterone 12年10月22日月曜日
  • 17. testoob v1.15(2009-10-08) http://code.google.com/p/testoob/ 12年10月22日月曜日
  • 18. testoobの概要 • unittestの機能拡張 • 正規表現やグロブを使ってテストのフィルタリ ングしXMLやHTMLで結果を出力できる • テストが失敗したときにpdb(デバッガ)を起動 できる • より詳細なレポートの出力ができる • etc... 12年10月22日月曜日
  • 19. 結果をカラー出力にする bin/testoob --color-mode=auto tests/suite.py • テストメソッド名を正規表現で絞り込む testoob tests/suite.py --regex='test[A-D]' • 結果をHTML出力 bin/testoob --html=test.html tests/suite.py • エラー時にPDBを立ち上げる bin/testoob --debug tests/suite.py • エラー時に冗長な情報を表示 bin/testoob --vassert tests/suite.py 12年10月22日月曜日
  • 20. python-subunit v0.0.8(2012-05-07) http://pypi.python.org/pypi/python-subunit/ 12年10月22日月曜日
  • 21. python-subunitの概要 • unitestを他の言語と容易に連携させる ための仲介を行い、統合したテストを 行うことができる 12年10月22日月曜日
  • 22. • コマンドラインテスト bin/python -m subunit.run tests.suite • シェルコマンドラインテスト python -m subunit.run tests.sub_suite 12年10月22日月曜日
  • 23. testtools v0.9.6(2012-08-10) http://testtools.readthedocs.org/en/latest/ 12年10月22日月曜日
  • 24. testtoolsの概要 • TwistedやBazzrのようなプロジェクトか ら派生した,便利なunittestの機能拡張 • 比較メソッドが多岐にわたる • 非同期の遅延テストができる • テスト時にモンキーパッチが容易に行え る 12年10月22日月曜日
  • 25. testosterone 改め assertEquals v0.4.2(2012-03-29) https://github.com/whit537/assertEquals 12年10月22日月曜日
  • 26. assertEquals • 漢のテストランナー • コマンドラインとcursesのインター フェイスを提供し、より簡単にテスト の失敗を見つけることができる 12年10月22日月曜日
  • 27. • CUIインターフェイスを提供 bin/assertEquals tests.suite 12年10月22日月曜日
  • 29. unittestを 使いましょう そこまで詳細なテストしないし 12年10月22日月曜日
  • 30. ご清聴 ありがとうございました 12年10月22日月曜日
  • 31. バスキュール、バスキュール号では python開発者を 随時募集してます 12年10月22日月曜日