SlideShare une entreprise Scribd logo
1  sur  32
•
    @shin1x1 / http://iplus.im/shin1x1

• ×
• Shin x blog http://www.1x1.jp/blog/
• PHP / Goolge+ /      / MotoGP
•


•
1. FizzBuzz
2.
3.
4. Selenium IDE
5. SimpleTest
6.
•   1       100



•
    3                       Fizz
    5             Buzz
    3   5                FizzBuzz
<?php
class FizzbuzzController extends AppController {
  public $uses = array();

    public function index() {
      for ($i = 1 ; $i <= 100 ; $i++) {
        if ($i % 3 === 0 && $i % 5 === 0) {
          echo 'FizzBuzz<br />';
        } else if ($i % 3 === 0) {
          echo 'Fizz<br />';
        } else if ($i % 5 === 0) {
          echo 'Buzz<br />';
        } else {
          echo $i.'<br />';
        }
      }
      exit;
    }
}
• Selenium IDE
• SimpleTest 1.0.1
• CakePHP 1.3.10
•
  https://github.com/shin1x1/CakePHP-FizzBuzz
• Web
• Firefox
•
•
• ATND
•           /      /

• Twitter       tweet
• PHP
• PHPUnit
• CakePHP
• CakePHP   PHPUnit
• SimpleTest
•
•
•
•   ok   ng
$ret = Calc::double(3);




• Calc::double()
•
$ret = Calc::double(3);
$this->assertIdentical(6, $ret);


• Calc::double(3)      6

• 6 === $ret
•            ok              ng
assertIdentical($a, $b);    $a === $b

 assertEqual($a, $b);       $a == $b

   assertTrue($b);         (boolean)$b

   assertFalse($b);        !(boolean)$b

   assertNull($b);          !isset($b)
assertBodyText

assertTextPresent

   assertValue      value

 assertLocation             URL

  assertCookie      Cookie
assertAlert assertAlertNotPresent assertAlertPresent assertAllButtons assertAllFields assertAllLinks assertAllWindowIds
assertAllWindowNames assertAllWindowTitles assertAttribute assertAttributeFromAllWindows assertBodyText
assertChecked assertConfirmation assertConfirmationNotPresent assertConfirmationPresent assertCookie
assertCookieByName assertCookieNotPresent assertCookiePresent assertCursorPosition assertEditable
assertElementHeight assertElementIndex assertElementNotPresent assertElementPositionLeft assertElementPositionTop
assertElementPresent assertElementWidth assertEval assertExpression assertHtmlSource assertLocation
assertMouseSpeed assertNotAlert assertNotAllButtons assertNotAllFields assertNotAllLinks assertNotAllWindowIds
assertNotAllWindowNames assertNotAllWindowTitles assertNotAttribute assertNotAttributeFromAllWindows
assertNotBodyText assertNotChecked assertNotConfirmation assertNotCookie assertNotCookieByName
assertNotCursorPosition assertNotEditable assertNotElementHeight assertNotElementIndex
assertNotElementPositionLeft assertNotElementPositionTop assertNotElementWidth assertNotEval assertNotExpression
assertNotHtmlSource assertNotLocation assertNotMouseSpeed assertNotOrdered assertNotPrompt
assertNotSelectOptions assertNotSelected assertNotSelectedId assertNotSelectedIds assertNotSelectedIndex
assertNotSelectedIndexes assertNotSelectedLabel assertNotSelectedLabels assertNotSelectedValue
assertNotSelectedValues assertNotSomethingSelected assertNotSpeed assertNotTable assertNotText assertNotTitle
assertNotValue assertNotVisible assertNotWhetherThisFrameMatchFrameExpression
assertNotWhetherThisWindowMatchWindowExpression assertNotXpathCount assertOrdered assertPrompt
assertPromptNotPresent assertPromptPresent assertSelectOptions assertSelectedId assertSelectedIds assertSelectedIndex
assertSelectedIndexes assertSelectedLabel assertSelectedLabels assertSelectedValue assertSelectedValues
assertSomethingSelected assertSpeed assertTable assertText assertTextNotPresent assertTextPresent assertTitle
assertValue assertVisible assertWhetherThisFrameMatchFrameExpression
assertWhetherThisWindowMatchWindowExpression assertXpathCount
assertAlert assertAlertNotPresent assertAlertPresent assertAllButtons assertAllFields assertAllLinks assertAllWindowIds assertAllWindowNames
assertAllWindowTitles assertAttribute assertAttributeFromAllWindows assertBodyText assertChecked assertConfirmation assertConfirmationNotPresent
assertConfirmationPresent assertCookie assertCookieByName assertCookieNotPresent assertCookiePresent assertCursorPosition assertEditable assertElementHeight
assertElementIndex assertElementNotPresent assertElementPositionLeft assertElementPositionTop assertElementPresent assertElementWidth assertEval
assertExpression assertHtmlSource assertLocation assertMouseSpeed assertNotAlert assertNotAllButtons assertNotAllFields assertNotAllLinks assertNotAllWindowIds
assertNotAllWindowNames assertNotAllWindowTitles assertNotAttribute assertNotAttributeFromAllWindows assertNotBodyText assertNotChecked
assertNotConfirmation assertNotCookie assertNotCookieByName assertNotCursorPosition assertNotEditable assertNotElementHeight assertNotElementIndex
assertNotElementPositionLeft assertNotElementPositionTop assertNotElementWidth assertNotEval assertNotExpression assertNotHtmlSource assertNotLocation
assertNotMouseSpeed assertNotOrdered assertNotPrompt assertNotSelectOptions assertNotSelected assertNotSelectedId assertNotSelectedIds
assertNotSelectedIndex assertNotSelectedIndexes assertNotSelectedLabel assertNotSelectedLabels assertNotSelectedValue assertNotSelectedValues
assertNotSomethingSelected assertNotSpeed assertNotTable assertNotText assertNotTitle assertNotValue assertNotVisible
assertNotWhetherThisFrameMatchFrameExpression assertNotWhetherThisWindowMatchWindowExpression assertNotXpathCount assertOrdered assertPrompt
assertPromptNotPresent assertPromptPresent assertSelectOptions assertSelectedId assertSelectedIds assertSelectedIndex assertSelectedIndexes assertSelectedLabel
assertSelectedLabels assertSelectedValue assertSelectedValues assertSomethingSelected assertSpeed assertTable assertText assertTextNotPresent assertTextPresent
assertTitle assertValue assertVisible assertWhetherThisFrameMatchFrameExpression assertWhetherThisWindowMatchWindowExpression assertXpathCount
verifyErrorOnNext verifyNotErrorOnNext verifyFailureOnNext verifyNotFailureOnNext verifySelected verifyNotSelected verifyAlert verifyNotAlert verifyAllButtons
verifyNotAllButtons verifyAllFields verifyNotAllFields verifyAllLinks verifyNotAllLinks verifyAllWindowIds verifyNotAllWindowIds verifyAllWindowNames
verifyNotAllWindowNames verifyAllWindowTitles verifyNotAllWindowTitles verifyAttribute verifyNotAttribute verifyAttributeFromAllWindows
verifyNotAttributeFromAllWindows verifyBodyText verifyNotBodyText verifyConfirmation verifyNotConfirmation verifyCookie verifyNotCookie verifyCookieByName
verifyNotCookieByName verifyCursorPosition verifyNotCursorPosition verifyElementHeight verifyNotElementHeight verifyElementIndex verifyNotElementIndex
verifyElementPositionLeft verifyNotElementPositionLeft verifyElementPositionTop verifyNotElementPositionTop verifyElementWidth verifyNotElementWidth verifyEval
verifyNotEval verifyExpression verifyNotExpression verifyHtmlSource verifyNotHtmlSource verifyLocation verifyNotLocation verifyMouseSpeed verifyNotMouseSpeed
verifyPrompt verifyNotPrompt verifySelectedId verifyNotSelectedId verifySelectedIds verifyNotSelectedIds verifySelectedIndex verifyNotSelectedIndex
verifySelectedIndexes verifyNotSelectedIndexes verifySelectedLabel verifyNotSelectedLabel verifySelectedLabels verifyNotSelectedLabels verifySelectedValue
verifyNotSelectedValue verifySelectedValues verifyNotSelectedValues verifySelectOptions verifyNotSelectOptions verifySpeed verifyNotSpeed verifyTable verifyNotTable
verifyText verifyNotText verifyTitle verifyNotTitle verifyValue verifyNotValue verifyWhetherThisFrameMatchFrameExpression
verifyNotWhetherThisFrameMatchFrameExpression verifyWhetherThisWindowMatchWindowExpression verifyNotWhetherThisWindowMatchWindowExpression
verifyXpathCount verifyNotXpathCount verifyAlertPresent verifyAlertNotPresent verifyChecked verifyNotChecked verifyConfirmationPresent
verifyConfirmationNotPresent verifyCookiePresent verifyCookieNotPresent verifyEditable verifyNotEditable verifyElementPresent verifyElementNotPresent
verifyOrdered verifyNotOrdered verifyPromptPresent verifyPromptNotPresent verifySomethingSelected verifyNotSomethingSelected verifyTextPresent
verifyTextNotPresent verifyVisible verifyNotVisible
•   OK = GREEN




•   NG = RED
1.

2.

3.

4.
• SimpleTest
  http://www.simpletest.org/



• Selenium IDE
  http://seleniumhq.org/projects/ide/


• CakePHP
  http://cakephp.org/
FizzBuzzではじめるテスト

Contenu connexe

Tendances

Generated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsGenerated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsMark Baker
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)James Titcumb
 
Introduction to Guzzle
Introduction to GuzzleIntroduction to Guzzle
Introduction to GuzzleDQNEO
 
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8Nikita Popov
 
Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHPThomas Weinert
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHPNat Weerawan
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証ME iBotch
 
Yapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlYapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlHideaki Ohno
 
Beware: Sharp Tools
Beware: Sharp ToolsBeware: Sharp Tools
Beware: Sharp Toolschrismdp
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challengervanphp
 
Php 7 hhvm and co
Php 7 hhvm and coPhp 7 hhvm and co
Php 7 hhvm and coPierre Joye
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
Top 10 php classic traps php serbia
Top 10 php classic traps php serbiaTop 10 php classic traps php serbia
Top 10 php classic traps php serbiaDamien Seguy
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13PHP Tips for certification - OdW13
PHP Tips for certification - OdW13julien pauli
 
Synapseindia reviews on array php
Synapseindia reviews on array phpSynapseindia reviews on array php
Synapseindia reviews on array phpsaritasingh19866
 

Tendances (20)

Ruby 2.0
Ruby 2.0Ruby 2.0
Ruby 2.0
 
Generated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 GeneratorsGenerated Power: PHP 5.5 Generators
Generated Power: PHP 5.5 Generators
 
Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)Diving into HHVM Extensions (php[tek] 2016)
Diving into HHVM Extensions (php[tek] 2016)
 
Perl5i
Perl5iPerl5i
Perl5i
 
PHP5.5 is Here
PHP5.5 is HerePHP5.5 is Here
PHP5.5 is Here
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Introduction to Guzzle
Introduction to GuzzleIntroduction to Guzzle
Introduction to Guzzle
 
Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8Just-In-Time Compiler in PHP 8
Just-In-Time Compiler in PHP 8
 
Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHP
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
 
Codeigniter4の比較と検証
Codeigniter4の比較と検証Codeigniter4の比較と検証
Codeigniter4の比較と検証
 
Yapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlYapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed Perl
 
Beware: Sharp Tools
Beware: Sharp ToolsBeware: Sharp Tools
Beware: Sharp Tools
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
 
Perl Basics for Pentesters Part 1
Perl Basics for Pentesters Part 1Perl Basics for Pentesters Part 1
Perl Basics for Pentesters Part 1
 
Php 7 hhvm and co
Php 7 hhvm and coPhp 7 hhvm and co
Php 7 hhvm and co
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Top 10 php classic traps php serbia
Top 10 php classic traps php serbiaTop 10 php classic traps php serbia
Top 10 php classic traps php serbia
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13PHP Tips for certification - OdW13
PHP Tips for certification - OdW13
 
Synapseindia reviews on array php
Synapseindia reviews on array phpSynapseindia reviews on array php
Synapseindia reviews on array php
 

Similaire à FizzBuzzではじめるテスト

Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)Damien Seguy
 
PHP security audits
PHP security auditsPHP security audits
PHP security auditsDamien Seguy
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Michelangelo van Dam
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11Michelangelo van Dam
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress DeveloperJoey Kudish
 
Unit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBeneluxUnit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBeneluxMichelangelo van Dam
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Michelangelo van Dam
 
Php basic for vit university
Php basic for vit universityPhp basic for vit university
Php basic for vit universityMandakini Kumari
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 
Adventures in Optimization
Adventures in OptimizationAdventures in Optimization
Adventures in OptimizationDavid Golden
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and youmarkstory
 
Developer testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticDeveloper testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticLB Denker
 
Review unknown code with static analysis Zend con 2017
Review unknown code with static analysis  Zend con 2017Review unknown code with static analysis  Zend con 2017
Review unknown code with static analysis Zend con 2017Damien Seguy
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5Wim Godden
 

Similaire à FizzBuzzではじめるテスト (20)

Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)Php Code Audits (PHP UK 2010)
Php Code Audits (PHP UK 2010)
 
PHP security audits
PHP security auditsPHP security audits
PHP security audits
 
What's new with PHP7
What's new with PHP7What's new with PHP7
What's new with PHP7
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
Unit testing with zend framework tek11
Unit testing with zend framework tek11Unit testing with zend framework tek11
Unit testing with zend framework tek11
 
Becoming a better WordPress Developer
Becoming a better WordPress DeveloperBecoming a better WordPress Developer
Becoming a better WordPress Developer
 
Unit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBeneluxUnit testing with zend framework PHPBenelux
Unit testing with zend framework PHPBenelux
 
Blog Hacks 2011
Blog Hacks 2011Blog Hacks 2011
Blog Hacks 2011
 
Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12Workshop quality assurance for php projects tek12
Workshop quality assurance for php projects tek12
 
Php basic for vit university
Php basic for vit universityPhp basic for vit university
Php basic for vit university
 
Php 2
Php 2Php 2
Php 2
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Adventures in Optimization
Adventures in OptimizationAdventures in Optimization
Adventures in Optimization
 
Substitution Cipher
Substitution CipherSubstitution Cipher
Substitution Cipher
 
PHPunit and you
PHPunit and youPHPunit and you
PHPunit and you
 
Unit testing zend framework apps
Unit testing zend framework appsUnit testing zend framework apps
Unit testing zend framework apps
 
Developer testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing FanaticDeveloper testing 101: Become a Testing Fanatic
Developer testing 101: Become a Testing Fanatic
 
Review unknown code with static analysis Zend con 2017
Review unknown code with static analysis  Zend con 2017Review unknown code with static analysis  Zend con 2017
Review unknown code with static analysis Zend con 2017
 
PHP 5.4
PHP 5.4PHP 5.4
PHP 5.4
 
The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5The why and how of moving to php 5.4/5.5
The why and how of moving to php 5.4/5.5
 

Plus de Masashi Shinbara

日本語消えたスライド
日本語消えたスライド日本語消えたスライド
日本語消えたスライドMasashi Shinbara
 
Twilio入門 -Web アプリ編-
Twilio入門 -Web アプリ編-Twilio入門 -Web アプリ編-
Twilio入門 -Web アプリ編-Masashi Shinbara
 
いまどきのPHP開発現場 -2015年秋-
いまどきのPHP開発現場 -2015年秋-いまどきのPHP開発現場 -2015年秋-
いまどきのPHP開発現場 -2015年秋-Masashi Shinbara
 
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2Masashi Shinbara
 
先取り!PHP 7 と WordPress
先取り!PHP 7 と WordPress先取り!PHP 7 と WordPress
先取り!PHP 7 と WordPressMasashi Shinbara
 
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携Masashi Shinbara
 
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
レイヤードアーキテクチャを意識したPHPアプリケーションの構築レイヤードアーキテクチャを意識したPHPアプリケーションの構築
レイヤードアーキテクチャを意識したPHPアプリケーションの構築Masashi Shinbara
 
How to learn Laravel5 application from Authentication
How to learn Laravel5 application from AuthenticationHow to learn Laravel5 application from Authentication
How to learn Laravel5 application from AuthenticationMasashi Shinbara
 
認証機能で学ぶ Laravel 5 アプリケーション
認証機能で学ぶ Laravel 5 アプリケーション認証機能で学ぶ Laravel 5 アプリケーション
認証機能で学ぶ Laravel 5 アプリケーションMasashi Shinbara
 
Azure Websites で作るスケーラブルな PHP アプリケーション
Azure Websites で作るスケーラブルな PHP アプリケーションAzure Websites で作るスケーラブルな PHP アプリケーション
Azure Websites で作るスケーラブルな PHP アプリケーションMasashi Shinbara
 
わかってるフレームワーク Laravel
わかってるフレームワーク Laravelわかってるフレームワーク Laravel
わかってるフレームワーク LaravelMasashi Shinbara
 
ビルドサーバで使うDocker
ビルドサーバで使うDockerビルドサーバで使うDocker
ビルドサーバで使うDockerMasashi Shinbara
 
Ansible ではじめるサーバ作業の自動化
Ansible ではじめるサーバ作業の自動化Ansible ではじめるサーバ作業の自動化
Ansible ではじめるサーバ作業の自動化Masashi Shinbara
 
開発現場で活用するVagrant
開発現場で活用するVagrant開発現場で活用するVagrant
開発現場で活用するVagrantMasashi Shinbara
 
PHPコードではなく PHPコードの「書き方」を知る
PHPコードではなく PHPコードの「書き方」を知るPHPコードではなく PHPコードの「書き方」を知る
PHPコードではなく PHPコードの「書き方」を知るMasashi Shinbara
 
Heroku で作る
スケーラブルな 
PHP アプリケーション
Heroku で作る
スケーラブルな 
PHP アプリケーションHeroku で作る
スケーラブルな 
PHP アプリケーション
Heroku で作る
スケーラブルな 
PHP アプリケーションMasashi Shinbara
 
VagrantユーザのためのDocker入門
VagrantユーザのためのDocker入門VagrantユーザのためのDocker入門
VagrantユーザのためのDocker入門Masashi Shinbara
 
Laravel ユーザなら知っておくべきAuthオートログイン
Laravel ユーザなら知っておくべきAuthオートログインLaravel ユーザなら知っておくべきAuthオートログイン
Laravel ユーザなら知っておくべきAuthオートログインMasashi Shinbara
 
キャラ立ちしたエンジニアになる!
キャラ立ちしたエンジニアになる!キャラ立ちしたエンジニアになる!
キャラ立ちしたエンジニアになる!Masashi Shinbara
 

Plus de Masashi Shinbara (20)

日本語消えたスライド
日本語消えたスライド日本語消えたスライド
日本語消えたスライド
 
Twilio入門 -Web アプリ編-
Twilio入門 -Web アプリ編-Twilio入門 -Web アプリ編-
Twilio入門 -Web アプリ編-
 
いまどきのPHP開発現場 -2015年秋-
いまどきのPHP開発現場 -2015年秋-いまどきのPHP開発現場 -2015年秋-
いまどきのPHP開発現場 -2015年秋-
 
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
 
先取り!PHP 7 と WordPress
先取り!PHP 7 と WordPress先取り!PHP 7 と WordPress
先取り!PHP 7 と WordPress
 
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
 
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
レイヤードアーキテクチャを意識したPHPアプリケーションの構築レイヤードアーキテクチャを意識したPHPアプリケーションの構築
レイヤードアーキテクチャを意識したPHPアプリケーションの構築
 
How to learn Laravel5 application from Authentication
How to learn Laravel5 application from AuthenticationHow to learn Laravel5 application from Authentication
How to learn Laravel5 application from Authentication
 
認証機能で学ぶ Laravel 5 アプリケーション
認証機能で学ぶ Laravel 5 アプリケーション認証機能で学ぶ Laravel 5 アプリケーション
認証機能で学ぶ Laravel 5 アプリケーション
 
Azure Websites で作るスケーラブルな PHP アプリケーション
Azure Websites で作るスケーラブルな PHP アプリケーションAzure Websites で作るスケーラブルな PHP アプリケーション
Azure Websites で作るスケーラブルな PHP アプリケーション
 
わかってるフレームワーク Laravel
わかってるフレームワーク Laravelわかってるフレームワーク Laravel
わかってるフレームワーク Laravel
 
ビルドサーバで使うDocker
ビルドサーバで使うDockerビルドサーバで使うDocker
ビルドサーバで使うDocker
 
Ansible ではじめるサーバ作業の自動化
Ansible ではじめるサーバ作業の自動化Ansible ではじめるサーバ作業の自動化
Ansible ではじめるサーバ作業の自動化
 
開発現場で活用するVagrant
開発現場で活用するVagrant開発現場で活用するVagrant
開発現場で活用するVagrant
 
PHPコードではなく PHPコードの「書き方」を知る
PHPコードではなく PHPコードの「書き方」を知るPHPコードではなく PHPコードの「書き方」を知る
PHPコードではなく PHPコードの「書き方」を知る
 
Heroku で作る
スケーラブルな 
PHP アプリケーション
Heroku で作る
スケーラブルな 
PHP アプリケーションHeroku で作る
スケーラブルな 
PHP アプリケーション
Heroku で作る
スケーラブルな 
PHP アプリケーション
 
Vagrant体験入門
Vagrant体験入門Vagrant体験入門
Vagrant体験入門
 
VagrantユーザのためのDocker入門
VagrantユーザのためのDocker入門VagrantユーザのためのDocker入門
VagrantユーザのためのDocker入門
 
Laravel ユーザなら知っておくべきAuthオートログイン
Laravel ユーザなら知っておくべきAuthオートログインLaravel ユーザなら知っておくべきAuthオートログイン
Laravel ユーザなら知っておくべきAuthオートログイン
 
キャラ立ちしたエンジニアになる!
キャラ立ちしたエンジニアになる!キャラ立ちしたエンジニアになる!
キャラ立ちしたエンジニアになる!
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

FizzBuzzではじめるテスト

  • 1.
  • 2. @shin1x1 / http://iplus.im/shin1x1 • × • Shin x blog http://www.1x1.jp/blog/ • PHP / Goolge+ / / MotoGP
  • 3.
  • 5. 1. FizzBuzz 2. 3. 4. Selenium IDE 5. SimpleTest 6.
  • 6.
  • 7. 1 100 • 3 Fizz 5 Buzz 3 5 FizzBuzz
  • 8.
  • 9. <?php class FizzbuzzController extends AppController { public $uses = array(); public function index() { for ($i = 1 ; $i <= 100 ; $i++) { if ($i % 3 === 0 && $i % 5 === 0) { echo 'FizzBuzz<br />'; } else if ($i % 3 === 0) { echo 'Fizz<br />'; } else if ($i % 5 === 0) { echo 'Buzz<br />'; } else { echo $i.'<br />'; } } exit; } }
  • 10.
  • 11. • Selenium IDE • SimpleTest 1.0.1 • CakePHP 1.3.10 • https://github.com/shin1x1/CakePHP-FizzBuzz
  • 13. • ATND • / / • Twitter tweet
  • 14. • PHP • PHPUnit • CakePHP • CakePHP PHPUnit
  • 16.
  • 17. • • • ok ng
  • 18. $ret = Calc::double(3); • Calc::double() •
  • 19. $ret = Calc::double(3); $this->assertIdentical(6, $ret); • Calc::double(3) 6 • 6 === $ret • ok ng
  • 20. assertIdentical($a, $b); $a === $b assertEqual($a, $b); $a == $b assertTrue($b); (boolean)$b assertFalse($b); !(boolean)$b assertNull($b); !isset($b)
  • 21.
  • 22. assertBodyText assertTextPresent assertValue value assertLocation URL assertCookie Cookie
  • 23. assertAlert assertAlertNotPresent assertAlertPresent assertAllButtons assertAllFields assertAllLinks assertAllWindowIds assertAllWindowNames assertAllWindowTitles assertAttribute assertAttributeFromAllWindows assertBodyText assertChecked assertConfirmation assertConfirmationNotPresent assertConfirmationPresent assertCookie assertCookieByName assertCookieNotPresent assertCookiePresent assertCursorPosition assertEditable assertElementHeight assertElementIndex assertElementNotPresent assertElementPositionLeft assertElementPositionTop assertElementPresent assertElementWidth assertEval assertExpression assertHtmlSource assertLocation assertMouseSpeed assertNotAlert assertNotAllButtons assertNotAllFields assertNotAllLinks assertNotAllWindowIds assertNotAllWindowNames assertNotAllWindowTitles assertNotAttribute assertNotAttributeFromAllWindows assertNotBodyText assertNotChecked assertNotConfirmation assertNotCookie assertNotCookieByName assertNotCursorPosition assertNotEditable assertNotElementHeight assertNotElementIndex assertNotElementPositionLeft assertNotElementPositionTop assertNotElementWidth assertNotEval assertNotExpression assertNotHtmlSource assertNotLocation assertNotMouseSpeed assertNotOrdered assertNotPrompt assertNotSelectOptions assertNotSelected assertNotSelectedId assertNotSelectedIds assertNotSelectedIndex assertNotSelectedIndexes assertNotSelectedLabel assertNotSelectedLabels assertNotSelectedValue assertNotSelectedValues assertNotSomethingSelected assertNotSpeed assertNotTable assertNotText assertNotTitle assertNotValue assertNotVisible assertNotWhetherThisFrameMatchFrameExpression assertNotWhetherThisWindowMatchWindowExpression assertNotXpathCount assertOrdered assertPrompt assertPromptNotPresent assertPromptPresent assertSelectOptions assertSelectedId assertSelectedIds assertSelectedIndex assertSelectedIndexes assertSelectedLabel assertSelectedLabels assertSelectedValue assertSelectedValues assertSomethingSelected assertSpeed assertTable assertText assertTextNotPresent assertTextPresent assertTitle assertValue assertVisible assertWhetherThisFrameMatchFrameExpression assertWhetherThisWindowMatchWindowExpression assertXpathCount
  • 24. assertAlert assertAlertNotPresent assertAlertPresent assertAllButtons assertAllFields assertAllLinks assertAllWindowIds assertAllWindowNames assertAllWindowTitles assertAttribute assertAttributeFromAllWindows assertBodyText assertChecked assertConfirmation assertConfirmationNotPresent assertConfirmationPresent assertCookie assertCookieByName assertCookieNotPresent assertCookiePresent assertCursorPosition assertEditable assertElementHeight assertElementIndex assertElementNotPresent assertElementPositionLeft assertElementPositionTop assertElementPresent assertElementWidth assertEval assertExpression assertHtmlSource assertLocation assertMouseSpeed assertNotAlert assertNotAllButtons assertNotAllFields assertNotAllLinks assertNotAllWindowIds assertNotAllWindowNames assertNotAllWindowTitles assertNotAttribute assertNotAttributeFromAllWindows assertNotBodyText assertNotChecked assertNotConfirmation assertNotCookie assertNotCookieByName assertNotCursorPosition assertNotEditable assertNotElementHeight assertNotElementIndex assertNotElementPositionLeft assertNotElementPositionTop assertNotElementWidth assertNotEval assertNotExpression assertNotHtmlSource assertNotLocation assertNotMouseSpeed assertNotOrdered assertNotPrompt assertNotSelectOptions assertNotSelected assertNotSelectedId assertNotSelectedIds assertNotSelectedIndex assertNotSelectedIndexes assertNotSelectedLabel assertNotSelectedLabels assertNotSelectedValue assertNotSelectedValues assertNotSomethingSelected assertNotSpeed assertNotTable assertNotText assertNotTitle assertNotValue assertNotVisible assertNotWhetherThisFrameMatchFrameExpression assertNotWhetherThisWindowMatchWindowExpression assertNotXpathCount assertOrdered assertPrompt assertPromptNotPresent assertPromptPresent assertSelectOptions assertSelectedId assertSelectedIds assertSelectedIndex assertSelectedIndexes assertSelectedLabel assertSelectedLabels assertSelectedValue assertSelectedValues assertSomethingSelected assertSpeed assertTable assertText assertTextNotPresent assertTextPresent assertTitle assertValue assertVisible assertWhetherThisFrameMatchFrameExpression assertWhetherThisWindowMatchWindowExpression assertXpathCount verifyErrorOnNext verifyNotErrorOnNext verifyFailureOnNext verifyNotFailureOnNext verifySelected verifyNotSelected verifyAlert verifyNotAlert verifyAllButtons verifyNotAllButtons verifyAllFields verifyNotAllFields verifyAllLinks verifyNotAllLinks verifyAllWindowIds verifyNotAllWindowIds verifyAllWindowNames verifyNotAllWindowNames verifyAllWindowTitles verifyNotAllWindowTitles verifyAttribute verifyNotAttribute verifyAttributeFromAllWindows verifyNotAttributeFromAllWindows verifyBodyText verifyNotBodyText verifyConfirmation verifyNotConfirmation verifyCookie verifyNotCookie verifyCookieByName verifyNotCookieByName verifyCursorPosition verifyNotCursorPosition verifyElementHeight verifyNotElementHeight verifyElementIndex verifyNotElementIndex verifyElementPositionLeft verifyNotElementPositionLeft verifyElementPositionTop verifyNotElementPositionTop verifyElementWidth verifyNotElementWidth verifyEval verifyNotEval verifyExpression verifyNotExpression verifyHtmlSource verifyNotHtmlSource verifyLocation verifyNotLocation verifyMouseSpeed verifyNotMouseSpeed verifyPrompt verifyNotPrompt verifySelectedId verifyNotSelectedId verifySelectedIds verifyNotSelectedIds verifySelectedIndex verifyNotSelectedIndex verifySelectedIndexes verifyNotSelectedIndexes verifySelectedLabel verifyNotSelectedLabel verifySelectedLabels verifyNotSelectedLabels verifySelectedValue verifyNotSelectedValue verifySelectedValues verifyNotSelectedValues verifySelectOptions verifyNotSelectOptions verifySpeed verifyNotSpeed verifyTable verifyNotTable verifyText verifyNotText verifyTitle verifyNotTitle verifyValue verifyNotValue verifyWhetherThisFrameMatchFrameExpression verifyNotWhetherThisFrameMatchFrameExpression verifyWhetherThisWindowMatchWindowExpression verifyNotWhetherThisWindowMatchWindowExpression verifyXpathCount verifyNotXpathCount verifyAlertPresent verifyAlertNotPresent verifyChecked verifyNotChecked verifyConfirmationPresent verifyConfirmationNotPresent verifyCookiePresent verifyCookieNotPresent verifyEditable verifyNotEditable verifyElementPresent verifyElementNotPresent verifyOrdered verifyNotOrdered verifyPromptPresent verifyPromptNotPresent verifySomethingSelected verifyNotSomethingSelected verifyTextPresent verifyTextNotPresent verifyVisible verifyNotVisible
  • 25. OK = GREEN • NG = RED
  • 26.
  • 27.
  • 28.
  • 29.
  • 31. • SimpleTest http://www.simpletest.org/ • Selenium IDE http://seleniumhq.org/projects/ide/ • CakePHP http://cakephp.org/

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n