45
unctional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Embed Size (px)

Citation preview

Page 1: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 1 CSCE 747 Fall 2013

CSCE 747 Software Testing and Quality Assurance

Lecture 01 – Functional Testing

Page 2: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 2 CSCE 747 Fall 2013

• Last Time • Today

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 3: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 3 CSCE 747 Fall 2013

The NextDate Function

• 2.3.1 Problem Statement• NextDate is a function of three variables: month, day, and

year. It returns the date of the day after the • input date. The month, day, and year variables have

integer values subject to these conditions:• c1. 1 ≤ month ≤ 12• c2. 1 ≤ day ≤ 31• c3. 1812 ≤ year ≤ 2012

• Jorgensen, Paul C. (2011-07-16). Software Testing (Page 22). Auerbach Publications. Kindle Edition.

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 4: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 4 CSCE 747 Fall 2013

The Commission Problem• 2.4.1 Problem Statement• A rifle salesperson in the former Arizona Territory sold rifle locks, stocks, and barrels made

by a gunsmith in Missouri. Locks cost $45, stocks cost $30, and barrels cost $25. The salesperson had to sell at least one complete rifle per month, and production limits were such that the most the salesperson could sell in a month was 70 locks, 80 stocks, and 90 barrels.

• After each town visit, the salesperson sent a telegram to the Missouri gunsmith with the number of locks, stocks, and barrels sold in that town. At the end of a month, the salesperson sent a very short telegram showing –1 lock sold. The gunsmith then knew the sales for the month were complete and computed the salesperson’s commission as follows: – 10% on sales up to (and including) $1000, – 15% on the next $800, and – 20% on any sales in excess of $1800.

• The commission program produced a monthly sales report that gave the total number of locks, stocks, and barrels sold, the salesperson’s total dollar sales, and, finally, the commission.

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 5: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 5 CSCE 747 Fall 2013

Simple ATM (SATM)

• GUI/Interface

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 6: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 6 CSCE 747 Fall 2013

• 2.5.1 Problem Statement• The SATM system communicates with bank customers

via the 15 screens shown in Figure 2.4. • Using a terminal with features as shown in Figure 2.3,

SATM customers can select any of three transaction types: – deposits, – withdrawals, and – balance inquiries.

• These transactions can be done on two types of accounts: checking and savings.

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 7: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 7 CSCE 747 Fall 2013

Page 8: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 8 CSCE 747 Fall 2013

Page 9: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 9 CSCE 747 Fall 2013

Currency Converter

Page 10: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 10 CSCE 747 Fall 2013

Saturn Windshield Wiper Controller

• The windshield wiper on some Saturn automobiles is controlled by a lever with a dial. The lever has four positions — OFF, INT (for intermittent), LOW, and HIGH — and the dial has three positions, numbered simply 1, 2, and 3.

• The dial positions indicate three intermittent speeds, and the dial position is relevant only when the lever is at the INT position. The decision table below shows the windshield wiper speeds (in wipes per minute) for the lever and dial positions.

Page 11: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 11 CSCE 747 Fall 2013

Page 12: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 12 CSCE 747 Fall 2013

Functional Testing

• Black Box testing

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 13: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 13 CSCE 747 Fall 2013

Boundary Value Testing

• Consider testing f(x,y) subject to constraints• a x b• c y d• “Strongly typed languages (such as Ada®and

Pascal) permit explicit definition of such variable ranges.”

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 14: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 14 CSCE 747 Fall 2013

Input domain• Input domain of a function of two variables.

• Automatically generate test casesJorgensen, Paul C. Software Testing

A Craftsman Approach

Page 15: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 15 CSCE 747 Fall 2013

T – Test case generator

• The tool T – generates test cases automatically– Min– Min+– Nom (nominal) – Max-– Max

• MAXINT – -- /usr/include/limits.h

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 16: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 16 CSCE 747 Fall 2013

logical (versus physical) variables,

• Physical variables – tied to a real thing, temperature, age, etc.

• Logical variable – Pin numbers

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 17: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 17 CSCE 747 Fall 2013

Robustness Testing

• Robustness Testing adds

• Max+• Min-

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 18: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 18 CSCE 747 Fall 2013

Worst-Case Testing

• Worst-Case Testing

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 19: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 19 CSCE 747 Fall 2013

Robust worst-case test cases

• Robust worst-case test cases• Combines robust and worst case

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 20: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 20 CSCE 747 Fall 2013

Special value testing

• Special value testing is probably the most widely practiced form of functional testing.

• most intuitive and least uniform.• Ad hoc

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 21: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 21 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 22: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 22 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 23: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 23 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 24: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 24 CSCE 747 Fall 2013

Input Space of Commission Problem

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 25: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 25 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 26: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 26 CSCE 747 Fall 2013

Eclipse and Java Assignment

Jorgensen, Paul C. Software Testing A Craftsman Approach

Page 27: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 27 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 28: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 28 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 29: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 29 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 30: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 30 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 31: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 31 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 32: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 32 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 33: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 33 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 34: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 34 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 35: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 35 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 36: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 36 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 37: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 37 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 38: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 38 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 39: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 39 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 40: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 40 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 41: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 41 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 42: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 42 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 43: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 43 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 44: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 44 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach

Page 45: Functional Testing 1 CSCE 747 Fall 2013 CSCE 747 Software Testing and Quality Assurance Lecture 01 – Functional Testing

Functional Testing 45 CSCE 747 Fall 2013Jorgensen, Paul C. Software Testing

A Craftsman Approach