Software Engineering CS 451: Types of Testing and Testing Strategies, Exams of Software Engineering

This document from cs 451 software engineering course at the university of waterloo, winter 2009, covers various types of testing, including unit testing, integration testing, system testing, acceptance testing, regression testing, and alpha/beta testing. The concepts, benefits, and challenges of each testing type and provides strategies for integration testing, such as top-down, bottom-up, and sandwich integration. The document also discusses dealing with cyclical dependencies and provides resources for further learning.

Typology: Exams

Pre 2010

Uploaded on 08/19/2009

koofers-user-1ax
koofers-user-1ax 🇺🇸

9 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 451
Software Engineering
Winter 2009
Sunny Wong
Types of Testing
Unit Testing
Integration Testing
System Testing
Acceptance Testing
Regression Testing
Alpha/Beta Testing
White Box Testing
Test functionality of methods/procedures
Check logic in code (loops, conditions, etc.)
Given an input, check path of code
def fib(n)
return 1 if n <= 1
return fib(n - 1) +
fib(n - 2)
end
input output
Integration Testing
Ensures interfaces between components have
been implemented correctly
Big-Bang Approach
Whole system is available
Components likely to be completed at different times
Harder to locate errors
Incremental Approach
Need to develop scaffolding code
Focus is on each module
Easier to locate errors
pf3
pf4
pf5

Partial preview of the text

Download Software Engineering CS 451: Types of Testing and Testing Strategies and more Exams Software Engineering in PDF only on Docsity!

CS 451

Software Engineering

Winter 2009

Sunny Wong

[email protected]

Types of Testing

Unit Testing

Integration Testing

System Testing

Acceptance Testing

Regression Testing

Alpha/Beta Testing

White Box Testing

Test functionality of methods/procedures

Check logic in code (loops, conditions, etc.)

Given an input, check path of code

def fib(n) return 1 if n <= 1 return fib(n - 1) + fib(n - 2) input (^) end output

Integration Testing

Ensures interfaces between components have

been implemented correctly

Big-Bang Approach

Whole system is available Components likely to be completed at different times Harder to locate errors

Incremental Approach

Need to develop scaffolding code Focus is on each module Easier to locate errors

Scaffolding Code

Driver

Invokes the module under test Controls and monitors execution Report test results

Stub

Simulates a module not written/tested yet Can be difficult to write Need to avoid writing actual module

Top-Down Integration

Top module is tested with stubs Stubs are replaced in depth first order Some tests are re-run as new modules are integrated A B C D E F

Bottom-Up Integration

Bottom module is tested with driver Drivers are replaced in reverse depth first order Integrated modules grouped together as move up A B C D E F

Sandwich Integration

Top module is tested with stub Bottom module is tested with driver Drivers and stubs are replaced layer by layer Integrated modules grouped together as move up A B C D E F

Method Coverage

All methods have been called

Test Case 1: 5+8E%8E%8-%3%

5'"()%5+#,)%(E%#,)%FE%#,)%&-%. #5%+(%33%8- A1)GA,%8: #,)%H%3%F%9%(: #5%++(%33%F%II%F%33%&-%JJ%+H%23%&-- H%3%K&: A1)GA,%4L5%9%H: ?

Statement Coverage

All “statements” have been executed

Test Case 1: 5+4E%4E%4-%3%K

5'"()%5+#,)%(E%#,)%FE%#,)%&-%. #5%+(%33%8- A1)GA,%8: #,)%H%3%F%9%(: #5%++(%33%F%II%F%33%&-%JJ%+H%23%&-- H%3%K&: A1)GA,%4L5%9%H: ?

Branch Coverage

All predicates have been both true and false

Test Case 1: 5+4E%8E%8-%3%M(M

5'"()%5+#,)%(E%#,)%FE%#,)%&-%. #5%+(%33%8- A1)GA,%8: #,)%H%3%F%9%(: #5%++(%33%F%II%F%33%&-%JJ%+H%23%&-- H%3%K&: A1)GA,%4L5%9%H: ?

Condition Coverage

All predicates have been both true and false

Test Case 1: 5+4E%4E%7-%3%K8LN

5'"()%5+#,)%(E%#,)%FE%#,)%&-%. #5%+(%33%8- A1)GA,%8: #,)%H%3%F%9%(: #5%++(%33%F%II%F%33%&-%JJ%+H%23%&-- H%3%K&: A1)GA,%4L5%9%H: ?

Dealing With Loops

Look for test cases to:

Skip loop entirely Go through loop once Go through loop more than once

Resources

Eclipse - http://www.eclipse.org

JUnit - http://www.junit.org

EMMA (code coverage)

Console - http://emma.sourceforge.net Eclipse Plugin - http://www.eclemma.org

Demo