SlideShare una empresa de Scribd logo
1 de 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ではじめるテスト

Más contenido relacionado

La actualidad más candente

Asynchronous I/O in PHP
Asynchronous I/O in PHPAsynchronous I/O in PHP
Asynchronous I/O in PHP
Thomas Weinert
 
GettingStartedWithPHP
GettingStartedWithPHPGettingStartedWithPHP
GettingStartedWithPHP
Nat Weerawan
 
Yapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlYapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed Perl
Hideaki Ohno
 
Beware: Sharp Tools
Beware: Sharp ToolsBeware: Sharp Tools
Beware: Sharp Tools
chrismdp
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13PHP Tips for certification - OdW13
PHP Tips for certification - OdW13
julien pauli
 

La actualidad más candente (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
 

Similar a 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
 
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
Michelangelo van Dam
 

Similar a 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
 

Más de Masashi Shinbara

レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
レイヤードアーキテクチャを意識した PHPアプリケーションの構築 ver2
Masashi Shinbara
 
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
Twilio を使えば簡単にできる アプリケーションと電話/SMS連携
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 Authentication
Masashi Shinbara
 
Azure Websites で作るスケーラブルな PHP アプリケーション
Azure Websites で作るスケーラブルな PHP アプリケーションAzure Websites で作るスケーラブルな PHP アプリケーション
Azure Websites で作るスケーラブルな PHP アプリケーション
Masashi Shinbara
 

Más 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オートログイン
 
キャラ立ちしたエンジニアになる!
キャラ立ちしたエンジニアになる!キャラ立ちしたエンジニアになる!
キャラ立ちしたエンジニアになる!
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

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/

Notas del editor

  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