Más contenido relacionado La actualidad más candente (20) Similar a FizzBuzzではじめるテスト (20) Más de Masashi Shinbara (20) FizzBuzzではじめるテスト2. •
@shin1x1 / http://iplus.im/shin1x1
• ×
• Shin x blog http://www.1x1.jp/blog/
• PHP / Goolge+ / / MotoGP
7. • 1 100
•
3 Fizz
5 Buzz
3 5 FizzBuzz
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;
}
}
11. • Selenium IDE
• SimpleTest 1.0.1
• CakePHP 1.3.10
•
https://github.com/shin1x1/CakePHP-FizzBuzz
20. assertIdentical($a, $b); $a === $b
assertEqual($a, $b); $a == $b
assertTrue($b); (boolean)$b
assertFalse($b); !(boolean)$b
assertNull($b); !isset($b)
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
31. • SimpleTest
http://www.simpletest.org/
• Selenium IDE
http://seleniumhq.org/projects/ide/
• CakePHP
http://cakephp.org/
Notas del editor \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