SLIDE 13 13
❂ ❃ ❄ ❄ ❅☛❆❇☛❈ ❅ ❉ ❊ ❄ ❋ ❇ ❉
■ ❏ ❑ ▲ ❏✏▼ ❁ ▼ ◆
P ◗ ◗ ❘ ❘ ❘ ❙ ❚ ❇ ❙ ❯ ❃ ❄ ❄ ❅ ❇ ❃ ❙ ❚ ❱ ◗ ❲ ❚ ❉ ❇ ❚ ▼ ❁ ▼
Stages of Testing (4)
✛✢✜ ✑✓✟☛✡✌✒✝✫☛✎ ✟ ✿✳✔✓✑✓✕ ✘ ✡☎✬ ✡✌✔✓☞✍✡✦✟☛✡✌☞✍✟✏✎ ✑✓✒ ➜ ➌s➀✏➎✏➋✏➒✝❸s➈♦❻ ❾♦❻ ➇ ➀✱➈✝➎ ➀✱➈✏❼☛➇ ❼ ❻ ❸s➈♦❻✍➂④➇ ❻ ➃✶➄s❽ ➀s➌s➋✏➎ ❻ ➜ ➒✝❸✏➌✱➇ ❾✶➈✏➀❥❻✻➇ ➈♦➏ ❸✏➎ ❻ ❸✏➌❧➂④➇ ❻ ➃④➓❥➇ ❽ ➋✏❼ ❸s❼ ➜ ➇ ➈♦❻ ❸s➈✏➌s❸✏➌❧➓❥❸s❽ ❼☛➇ ➀✱➈✶➇ ❼✺➂④➃✏❾♦❻✺➇ ❼✓❾s➎ ❻ ➋✏❾s➁ ➁ ➑➐❽ ❸s➁ ❸✏❾✏❼☛❸✏➌✁ ❹ ❹ ❹ ✛✙✘ ✡✓✬ ✎ ✔☎✩✓✎ ✬ ✎ ✟ ✿✝✧ ➽ ✡✓✫☛✟✏✎ ✪☛✎ ✙✍✔✌✟✏✎ ✚☎✑t➧➐✡✌☞✍✟✏✎ ✑✌✒ ➜ ❸✏❼ ❻ ➇ ➒✝❾♦❻ ❸s❼☎➍✄✂☎✂✄✆☎➅ ➒✝❸✏❾s➈④❻ ➇ ➒✝❸④❻ ➀④➏ ❾✱➇ ➁ ➋s❽ ❸s➉⑧➂④➇ ❻ ➃✶❽ ❸♦➏ ❸s❽ ❸✱➈☛➎☛❸④❻ ➀ ➀✱➄☛❸✱❽ ❾♦❻ ➇ ➀✱➈✏❾s➁s➄s❽ ➀♦➏ ➇ ➁ ❸✏❼ ➜ ❼ ➀s➒✝❸♦❻ ➇ ➒✝❸s❼✺➏ ➀s❽✍➎☛❸s❽ ❻ ➇ ➏ ➇ ➎☛❾♦❻ ➇ ➀✱➈✝➀❥➏❭➎☛➀✱➈♦➏ ➀s❽ ➒✝❾s➈✏➎ ❸④❻ ➀✝❾✶❼ ❻ ❾s➈✏➌s❾s❽ ➌ ✝✘❸s❹ ❺✱❹✟✞❭❿✡✠❭❿✰➅ ✞❭➌✏❾✱➉ ☞☛ ✌✁✍✯➄✏❽ ➀♦❻ ➀✏➎☛➀✱➁ ❻ ❸✏❼ ❻✻❼☛➋s➇ ❻ ❸✏❼ ✛ ➨✓✡✌✙✘✤☎✫✏✎ ✟ ✿☎✧ ✚ ✔☎✤✓✬ ✟❧➧➐✚☎✬ ✡✓✫☛✔☎✑✌✙✍✡✴✧ ✘ ✡✓✙✍✚✺✹✺✡✓✫ ✿✳✟ ✡✓☞✍✟☛✎ ✑✓✒ ✛✙✘ ✡✌✒✝✫☛✡✌☞✍☞✘✎ ✚☎✑ ➧➐✡✌☞✍✟✏✎ ✑✓✒
❂ ❃ ❄ ❄ ❅☛❆❇☛❈ ❅ ❉ ❊ ❄ ❋ ❇ ❉
■ ❏ ❑ ▲ ❏✏▼ ❁ ▼ ◆
P ◗ ◗ ❘ ❘ ❘ ❙ ❚ ❇ ❙ ❯ ❃ ❄ ❄ ❅ ❇ ❃ ❙ ❚ ❱ ◗ ❲ ❚ ❉ ❇ ❚ ▼ ❁ ▼
Black Box Testing
✛ ✗✓✎ ✙✌✾✯✟☛✡✓☞✱✟✰✙✍✔✓☞✍✡✌☞✭✩✌✔✓☞✱✡✓✕✠✚✝✑✠✫☛✡✓✽☎✤☎✎ ✫ ✡☎✥✭✡☎✑✓✟ ☞✯✚☎✑☎✬ ✿ ✛ ✕✓✚✝✑✟✕ ✟✰✤✓☞✍✡✠✾✌✑✓✚✓✮✯✬ ✡✌✕☎✒✓✡✠✚✓✪✰✎ ✥✠✗✓✬ ✡☎✥✭✡☎✑✌✟☛✔✓✟✏✎ ✚☎✑ ✛ ✹⑨✎ ✡✌✮ ✙✍✚☎✕✓✡✠✔✌☞✯✔✠✩☎✬ ✔✌✙✌✾✭✩✓✚✏✎④↕✶✎ ✑✌☞✘✎ ✕☎✡✌☞✭✑✌✚☎✟❧✹⑨✎ ☞✘✎ ✩✓✬ ✡ ✛ ✙✍✔☎✑✠✩✓✡✠✤✓☞✍✡✌✕✣✔✌✟✰✔☎✑✻✿✳☞✍✟ ✔✓✒✓✡✶↕ ❳✳❞✘❵✘❛ ✐ ✠✌♣✱❞✍⑥✍♣❥❬❭♣♦✐ ❪✘❨ ✠✓♣♦❬⑧♣♦✐ ❪✘❨③✐ ❪✍♣♦✐ ❛ ❵✍⑤
❂ ❃ ❄ ❄ ❅☛❆❇☛❈ ❅ ❉ ❊ ❄ ❋ ❇ ❉
■ ❏ ❑ ▲ ❏✏▼ ❁ ▼ ◆
P ◗ ◗ ❘ ❘ ❘ ❙ ❚ ❇ ❙ ❯ ❃ ❄ ❄ ❅ ❇ ❃ ❙ ❚ ❱ ◗ ❲ ❚ ❉ ❇ ❚ ▼ ❁ ▼
Black-Box Testing Strategies
✛ ✬ ✚✓✚☎✾✭✔✌✟✰☞✘✗✌✡✓✙✘✎ ✪☛✎ ✙✘✔✌✟✏✎ ✚☎✑✓☞★✪☛✚☎✫✰✎ ✑☎✗☎✤✌✟☛☞ ✛ ✟☛✡✌☞✍✟✷✑✌✚✝✫☛✥✦✔✓✬✓✤✓☞✍✡✝↕ ❳t♣s❩✍❨★❢✍❝ ❛ ❵✍⑤★❤❭②④➹☛❵✍❤✌❣ ❨①❩✘❝ ➹✝❛ ❵✘❢✍❞❭✐ ♣✷❦☛❣ ❩✘❵✱❡✘❤✘❨③❴❭❩✘❝ ❞✍❪✍♣♦♥ ✛ ✟☛✡✌☞✍✟✰✔✓✩☎✑✌✚✝✫☛✥✦✔✓✬✓✤✓☞✍✡✝↕ ❳t❡✌❛ ② ② ❪✘❣ ❪✘❵❭✐❧➛✱❛ ❵✱❡✘♣✰❤❭②⑨❪✘❣ ❣ ❤✘❵✍❪✍❤✘❞✍♣ ✬♦❛ ❝ ❝ ❪✍⑤✍❩✘❝✍❛ ❵✘❢✘❞❭✐ ❳t❜s❤✘❨★⑥✍❛ ❵✍❩❭✐ ❛ ❤✘❵✍♣✰❤❭②⑨❪✘❣ ❣ ❤✘❣ ♣ ✛ ✟☛✡✌☞✍✟✷✩✌✚☎✤☎✑✓✕✓✔☎✫ ✿✳✙✍✚☎✑✓✕✝✎ ✟☛✎ ✚✝✑✌☞✓↕ ❳✭❴❭❩✘❝ ❞✍❪✍♣✶❜✱❝ ❤✘♣✏❪❫✐ ❤★⑥✍❤✘❞✘❵✍❡✘❩✍❣ ❬ ⑥✱❪❭✐ ✉➙❪✍❪✘❵★❵✍❤✘❣ ❨✷❩✘❝✱❩✘❵✍❡ ❩✘⑥✘❵✱❤✌❣ ❨✷❩✘❝
❂ ❃ ❄ ❄ ❅☛❆❇☛❈ ❅ ❉ ❊ ❄ ❋ ❇ ❉
■ ❏ ❑ ▲ ❏✏▼ ❁ ▼ ◆
P ◗ ◗ ❘ ❘ ❘ ❙ ❚ ❇ ❙ ❯ ❃ ❄ ❄ ❅ ❇ ❃ ❙ ❚ ❱ ◗ ❲ ❚ ❉ ❇ ❚ ▼ ❁ ▼
Example
/** * Raises a number to an integral power. * * @param base the number to be raised to a power * @param pow the power to which base is to be raised. * Must not be negative. * @return base raised to the pow-th power */ static double power(double base, int pow) {
- error inputs: negative values for pow
- boundary cases: pow = 0, pow = 1, pow = -1
- normal cases:
– pow >= 2, range of values – base: negative, 0, positive – combinations of these
✑ ✑ ✒ ✓ ✔ ✔ ✕✗✖✘✗✙ ✕ ✚ ✛ ✔ ✜ ✘ ✚ ✢ ✣ ✤ ✥ ✦ ✧ ✥✩★ ✪ ★ ✫ ✢ ✢ ✬ ✭ ✮ ✮ ✯ ✯ ✯ ✰ ✱ ✘ ✰ ✲ ✓ ✔ ✔ ✕ ✘ ✓ ✰ ✱ ✳ ✮ ✴ ✱ ✚ ✘ ✱ ★ ✪ ★
Possibilities For Automation
✵✷✶✗✸✺✹✼✻✺✽ ✾❀✿ ❁✺❁✺✽❂✿✗❁✷❃✺✹❅❄❅✹✺❆ ✻❅✿✗✹✷❇☎✹❅✿❈❁❅❉❈✿✗✹✼❇☞✿❈❊☞✻❅❇☞✹✼❇❋✻✺❄❅✸ ✹✏●✏❍✼✹❅❊☞✿✗✹✼✸■❆✗✹✼❇❑❏✺✽ ✿ ❇❈❉✗❆✗❁✺▲▼❇☞❍❅✹✼❊✼◆ ❉✗◆ ❊☞✻✼✿✩◆ ❁✺❄❅❇ ✵P❖✺✹✼✻✺✽ ◆ ✿ ◗❘✾❂❄✼✹❅✹✼✸✺❇❚❙❯✹✺❆ ◗❱❍✺❆ ✹❅❊❑◆ ❇☞✹✼❲❳▲❨✻❅✿✩❩✼✹✺▲❬✻✼✿✩◆ ❊☞✻✺✽ ❇❑❍✼✹❅❊❑◆ ❉✗◆ ❊☞✻❅✿✩◆ ❁✺❄✼❇☞❲❳❏✼❇❑❏❅✻❅✽ ✽ ◗❱❄❅❁❅✿❳✻❯❙✏✻❅◆ ✽ ✻✺❭❅✽ ✹ ✵✷❪❅❁❫❏✼❇❑❏❅✻❅✽ ✽ ◗❴❃✺✹❅❄❅✹❅❆✗✻❅✿ ✹▼✿✗✹❅❇☎✿❵❊☞✻❅❇☞✹✼❇❜❛❝✹✏●✏❍✼✹❅❊☞✿✗✹❅✸ ❆✗✹✼❇❑❏✺✽ ✿ ❇❨❭✏◗❞❩❅✻❅❄❅✸ ✵❢❡❣❏❅✿ ❁❤▲❨✻❅✿ ✹❅✸❋✹❯●❯✹❅❊❑❏❅✿✩◆ ❁✺❄✐◆ ❇❈❇☞✿✩◆ ✽ ✽❅❍✼❁❅❇☞❇❑◆ ❭❅✽ ✹ ✑ ❥ ✒ ✓ ✔ ✔ ✕✗✖✘✗✙ ✕ ✚ ✛ ✔ ✜ ✘ ✚ ✢ ✣ ✤ ✥ ✦ ✧ ✥✩★ ✪ ★ ✫ ✢ ✢ ✬ ✭ ✮ ✮ ✯ ✯ ✯ ✰ ✱ ✘ ✰ ✲ ✓ ✔ ✔ ✕ ✘ ✓ ✰ ✱ ✳ ✮ ✴ ✱ ✚ ✘ ✱ ★ ✪ ★
Test Harness
✵❧❦❣✻❅♠❑✹✼❇❈❇☞✹✼✿❳❁❅❉❂✿✗✹❅❇☎✿♥◆ ❄✺❍❅❏❅✿✗❇♦❛P✹✏●✏❍❅✹✼❊☞✿✗✹❅✸❋❆✗✹✼❇❑❏✺✽ ✿ ❇ ✵P❖❤❏❅❄❅❇❨❍❅❆✗❁❅❃❤❆ ✻✺▲♣❁❤❄❬✹❅✻✼❊✼❩❬✿✗✹✼❇☞✿♥◆ ❄✺❍❅❏❅✿✗❲❤❊☞❁❤▲❬❍❅✻❅❆✗✹✼❇ ❆✗✹✼❇❑❏✺✽ ✿ ❇❈q❈◆ ✿✩❩✐✹❯●r❍✼✹❅❊☞✿✗✹✼✸ ✵P❖✺✹❅❍❅❁✺❆✗✿✗❇♦✻✺❄❯◗❞✸✺◆ ❇☞❊❑❆✗✹✺❍✼✻✺❄✼❊❑◆ ✹✼❇ ✵❵s❤❁✺▲✐❍❅✽ ◆ ❊❑✻✼✿✗✹✼✸❋✿✗❁✐q❈❆✩◆ ✿ ✹✐❉ ❁✺❆❳t❀✉❳✶✗❇☞❲❤✹✺▲❬❭❅✹✼✸✺✸❅✹❅✸ ❇✈◗❯❇☞✿✗✹❅▲❬❇☞❲❂❭✺❏✼✿❳❁❅❉ ✿✗✹✺❄✐❍❅❁❅❇☞❇❑◆ ❭❅✽ ✹ ✵❧❦❣✻❅♠❑✹✼❇❨✽ ❁❅✿✗❇❈❁❅❉❂✸✺❆✩❏❅✸❅❃✺✹❅❆ ◗❞❁✺❏✼✿❳❁❅❉❳✿ ✹❅❇☞✿✗◆ ❄❅❃ ✵P✇❀✻✺♠☞✹❅❇❈✿ ✹❅❇☞✿ ✹✺❆✗❇♦q❈◆ ✽ ✽ ◆ ❄❅❃❋✿ ❁■❆✗❏✺❄✐✻❅❄❅✸❋❆✗✹❅①✩❆✩❏✺❄✐✽ ✻✺❆ ❃✺✹ ✿✗✹✼❇☞✿❳❇❑❏❅◆ ✿✗✹✼❇