cis-74 computer software quality assurance

66
CIS-74 Computer Software Quality Assurance Systematic Software Testing Chapter 5: Analysis and Design

Upload: shellie-fisher

Post on 03-Jan-2016

22 views

Category:

Documents


2 download

DESCRIPTION

CIS-74 Computer Software Quality Assurance. Systematic Software Testing Chapter 5: Analysis and Design. Creating an Inventory. 1. Gather reference materials 2. Form a brainstorming team 3. Determine test objectives 4. Prioritize objectives . - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CIS-74  Computer Software Quality Assurance

CIS-74 Computer Software Quality Assurance

Systematic Software Testing

Chapter 5:

Analysis and Design

Page 2: CIS-74  Computer Software Quality Assurance

Creating an Inventory

1. Gather reference materials

2. Form a brainstorming team

3. Determine test objectives

4. Prioritize objectives

<continued on next slide>

Page 3: CIS-74  Computer Software Quality Assurance

Creating an Inventory

5. Parse (organize) objectives into lists.

6. Create an inventory tracking matrix

– Left-hand column of objectives should be in prioritized order from step 4.

– This step known as requirements traceability.

<continued on next slide>

Page 4: CIS-74  Computer Software Quality Assurance

Creating an Inventory

7. Identify tests for unaddressed conditions, adding/modifying test cases as needed.

8. Evaluate each inventory item for adequacy. (And add/modify test cases as needed.)

9. Maintain the testing matrix.

Page 5: CIS-74  Computer Software Quality Assurance

Black-Box vs. White-Box

Black-box testing - testing done without knowledge of the internal workings of the program/system being tested.

White-box testing - testing done with knowledge of the internal workings of the program/system being tested.

White-box testing is also called structural testing because it’s based on structure of the code.

Page 6: CIS-74  Computer Software Quality Assurance

Black-Box Science:

Equivalence Partitioning

An equivalence class is formed by a group of tests which:

• All test the same thing.

• If one catches a bug, the others do too.

• If one doesn’t catch a bug, the others won’t either.

Page 7: CIS-74  Computer Software Quality Assurance

Black-Box Science:

Boundary Value Analysis

Test for:

• Exact boundaries

• Value immediately above upper boundary

• Value immediately below lower boundary

Page 8: CIS-74  Computer Software Quality Assurance

Black-Box Science: State-Transition Diagrams

A state machine is a thing which depends not just on current input, but also on past input, for determining output.

A transition occurs when a state is changed by its input from one state into another.

To use in black-box testing: Create a state-transition diagram.

Create a test case for every arrow (transition) from the diagram.

Page 9: CIS-74  Computer Software Quality Assurance

Black-Box Science: Orthogonal Arrays

An Lx(Yz) orthogonal array is a two-dimensional array with:

• X rows

• Z columns

• 1..y in cells of matrix

Page 10: CIS-74  Computer Software Quality Assurance

Black-Box Science: Orthogonal Arrays

• Useful with compatibility testing in particular

• What text did not say:

• How to create an orthogonal array

• How to use an orthogonal array when the variables do not all have the same number of values (as did the example in Table 5-9)

Page 11: CIS-74  Computer Software Quality Assurance

Black-Box Art: Ad Hoc Testing

• Often based on systematic techniques

• Test cases should be created for all bugs found

• Can locate an entire class of tests missed using more formal means

• Fun!

Page 12: CIS-74  Computer Software Quality Assurance

Black-Box Art: Random Testing

• All data fields generated randomly, often with a tool

• Can lead to too many negative tests - those with an invalid input, and expected results of an error message

• Not very useful

• At best, useful for “crash-proofing”

Page 13: CIS-74  Computer Software Quality Assurance

Black-Box Art: Semi-Random Testing

• Random combinations of legitimate values for variables

• Gives a little added confidence to systematic testing

Page 14: CIS-74  Computer Software Quality Assurance

Black-Box Art: Exploratory Testing

• Test design and execution occur concurrently

• Test results may prompt user to delve deeper into that area

• Neither ad hoc nor random in nature

• Productive areas of test are immediately expanded

• Viewed as complementary to structured testing by authors

Page 15: CIS-74  Computer Software Quality Assurance

White-Box Science: White-Box Testing

• “White-box” should be “clear-box” or “glass-box” in authors’ views. (Why?)

• Normally viewed as a technique for unit testing, but can also be used with integration & system testing

• Primarily about path testing (paths through the code)

Page 16: CIS-74  Computer Software Quality Assurance

White-Box Science: Coverage Techniques

• Statement coverage - # of lines of code executed by the tests

• Decision or branch coverage - # of decisions executed by the tests

• Path coverage - # of paths executed by the tests

Page 17: CIS-74  Computer Software Quality Assurance

Test Design Documentation:IEEE Test Design Specification

• One TDS per feature from the “Features to be Tested” from the corresponding test plan

• Test identification section includes test case id’s and high-level description for each test case but not info on how to execute them.

Page 18: CIS-74  Computer Software Quality Assurance

Test Design Documentation:IEEE Test Design Specification

• Test cases may not be sequential because TDS covers all tests necessary to test one feature--some tests for other features may be reusable.

• Feature pass/fail criteria establish success or failure for the TDS’s feature--not individual test cases.

Page 19: CIS-74  Computer Software Quality Assurance

Test Design Documentation:Test Case Specification

Two approaches:

• IEEE Template for Test Case Specification• Focuses on the “what”

• Spreadsheet • Very common method• Can also be used to record results

Page 20: CIS-74  Computer Software Quality Assurance

Test Design Documentation:IEEE Test Procedure Specification

Focuses on “how” tests will be run

Can be run via scripts--automated test procedures. These “scripts” are normally written in a scripting language such as Perl or a UNIX/Linux shell language.

“Scripts” also refer to testing instructions for manually-executed tests.

Page 21: CIS-74  Computer Software Quality Assurance

Review Questions

Page 22: CIS-74  Computer Software Quality Assurance

Which test design technique was covered in depth by the first part of Chapter 5?

Page 23: CIS-74  Computer Software Quality Assurance

Which test design technique was covered in depth by the first part of Chapter 5?

Inventories

Page 24: CIS-74  Computer Software Quality Assurance

What are the column headers in an inventory tracking matrix?

Page 25: CIS-74  Computer Software Quality Assurance

What are the column headers in an inventory tracking matrix?

Test case identifiers.

Page 26: CIS-74  Computer Software Quality Assurance

How are the objectives/inventory items in the column of an inventory tracking matrix ordered?

Page 27: CIS-74  Computer Software Quality Assurance

How are the objectives/inventory items in the column of an inventory tracking matrix ordered?

Priority order (highest to lowest)

Page 28: CIS-74  Computer Software Quality Assurance

With respect to an inventory tracking matrix, what is the name for the process of adding “X”s to those non-header cells which represent test case coverage of an objective/inventory-item?

Page 29: CIS-74  Computer Software Quality Assurance

With respect to an inventory tracking matrix, what is the name for the process of adding “X”s to those non-header cells which represent test case coverage of an objective/inventory-item?

Requirements traceability

Page 30: CIS-74  Computer Software Quality Assurance

What is the name for testing based upon the requirements, i.e., the internal workings of the system under test are unknown?

Page 31: CIS-74  Computer Software Quality Assurance

What is the name for testing based upon the requirements, i.e., the internal workings of the system under test are unknown?

Black-box testing

Page 32: CIS-74  Computer Software Quality Assurance

What is another name for black-box testing?

Page 33: CIS-74  Computer Software Quality Assurance

What is another name for black-box testing?

Behavioral testing.

Page 34: CIS-74  Computer Software Quality Assurance

What is white-box testing?

Page 35: CIS-74  Computer Software Quality Assurance

What is white-box testing?

Testing in which the internal workings of the system under test are known to the tester.

Page 36: CIS-74  Computer Software Quality Assurance

What is another name for white-box testing?

Page 37: CIS-74  Computer Software Quality Assurance

What is another name for white-box testing?

Structural testing. (Why?)

Glass-box testing

Clear-box testing

Translucent-box testing

Page 38: CIS-74  Computer Software Quality Assurance

What is coincidental correctness?

Page 39: CIS-74  Computer Software Quality Assurance

What is coincidental correctness?

Right results for wrong reason. (A test case passes even though the input was processed incorrectly.)

Page 40: CIS-74  Computer Software Quality Assurance

What are the three defining aspects of a group of tests making up an equivalence class?

Page 41: CIS-74  Computer Software Quality Assurance

What are the three defining aspects of a group of tests making up an equivalence class?

1. They all test the same thing

2. If one catches a bug, the others will too.

3. If one fails to catch a bug, the others will also fail.

Page 42: CIS-74  Computer Software Quality Assurance

What are the three areas to test when using boundary analysis?

Page 43: CIS-74  Computer Software Quality Assurance

What are the three areas to test when using boundary analysis?

1. The exact boundaries

2. The value immediately above the upper boundary

3. The value immediately below the lower boundary

Page 44: CIS-74  Computer Software Quality Assurance

Which black-box science technique involves creating a table which lists all possible inputs and outputs?

Page 45: CIS-74  Computer Software Quality Assurance

Which black-box science technique involves creating a table which lists all possible inputs and outputs?

Decision tables

Page 46: CIS-74  Computer Software Quality Assurance

In a state-transition diagram, how are the states and transitions depicted?

Page 47: CIS-74  Computer Software Quality Assurance

In a state-transition diagram, how are the states and transitions depicted?

State - circle with label inside

Transition - directed arc between two states

Page 48: CIS-74  Computer Software Quality Assurance

What is an orthogonal array?

Page 49: CIS-74  Computer Software Quality Assurance

What is an orthogonal array?

A two-dimensional array of integers

Any two columns contain all combinations of the integers contained in the array

Page 50: CIS-74  Computer Software Quality Assurance

What is meant by L9(34)?

Page 51: CIS-74  Computer Software Quality Assurance

What is meant by L9(34)?

An orthogonal array with 9 rows, 4 columns, and cell contents ranging from 1 through 3, inclusively.

Page 52: CIS-74  Computer Software Quality Assurance

What is an example of a pair-wise defect?

Page 53: CIS-74  Computer Software Quality Assurance

What is an example of a pair-wise defect?

A web site that does not work properly with a particular browser and OS even though it works on many other browser/OS combinations.

Example: Bug 7019

Page 54: CIS-74  Computer Software Quality Assurance

What kind of testing involves generating miscellaneous data, often using a tool?

Page 55: CIS-74  Computer Software Quality Assurance

What kind of testing involves generating miscellaneous data, often using a tool?

Random testing

Page 56: CIS-74  Computer Software Quality Assurance

What is the name for a test in which the tester supplies an invalid input in the expectation of receiving an error message?

Page 57: CIS-74  Computer Software Quality Assurance

What is the name for a test in which the tester supplies an invalid input in the expectation of receiving an error message?

Negative test

Page 58: CIS-74  Computer Software Quality Assurance

What is the name for testing in which the test design and test execution are conducted concurrently?

Page 59: CIS-74  Computer Software Quality Assurance

What is the name for testing in which the test design and test execution are conducted concurrently?

Exploratory testing

Page 60: CIS-74  Computer Software Quality Assurance

How do the authors view exploratory testing vs. structured testing?

Page 61: CIS-74  Computer Software Quality Assurance

How do the authors view exploratory testing vs. structured testing?

As a complementary process

Page 62: CIS-74  Computer Software Quality Assurance

What names do the authors claim are better than “white-box testing?”

Page 63: CIS-74  Computer Software Quality Assurance

What names do the authors claim are better than “white-box testing?”

Clear-box testing or glass-box testing.

Page 64: CIS-74  Computer Software Quality Assurance

What metric describes the complexity of a software module?

Page 65: CIS-74  Computer Software Quality Assurance

What metric describes the complexity of a software module?

Cyclomatic Complexity

Page 66: CIS-74  Computer Software Quality Assurance

End of Chapter 5