30
B. Childers, M. L. Soffa, J. Beaver, L. Ber, K. Cammarata, J. Litman, J. Misurda Presented by : Priyanka Puri 1000676053 SOFTTEST: A FRAMEWORK FOR SOFTWARE TESTING OF JAVA PROGRAMS

SoftTest : A Framework for Software Testing of Java Programs

  • Upload
    tacy

  • View
    48

  • Download
    0

Embed Size (px)

DESCRIPTION

SoftTest : A Framework for Software Testing of Java Programs. Presented by : Priyanka Puri 1000676053. B. Childers, M. L. Soffa , J. Beaver, L. Ber , K. Cammarata , J. Litman , J. Misurda. Structural Software Testing. Assure quality, robust software - PowerPoint PPT Presentation

Citation preview

Page 1: SoftTest : A Framework for Software  Testing  of Java Programs

B. Childers, M. L. Soffa, J. Beaver, L. Ber, K. Cammarata, J. Litman, J. Misurda

Presented by:

Priyanka Puri

1000676053

SOFTTEST: A FRAMEWORK FOR SOFTWARE TESTING OF JAVA PROGRAMS

Page 2: SoftTest : A Framework for Software  Testing  of Java Programs

STRUCTURAL SOFTWARE TESTING

• Assure quality, robust software

• Collect coverage information about the program

• E.g., branch coverage records which edges are hit

• Uses program instrumentation

Page 3: SoftTest : A Framework for Software  Testing  of Java Programs

..Continued..

• Automatically apply multiple test strategies

• Multiple languages and platforms

• Handle large programs

Page 4: SoftTest : A Framework for Software  Testing  of Java Programs

Static instrumentation approaches

• Not scalable: Instrumentation left in place• Time, memory

• Inflexible: Only certain tests, languages, platforms

• Generally not detailed

Page 5: SoftTest : A Framework for Software  Testing  of Java Programs

Approach

• Specification driven: User written test

• Test plans: Recipe of how & where to test

• Path specific: Instrument only what is needed

• Dynamic: Insert & remove instrumentation

Page 6: SoftTest : A Framework for Software  Testing  of Java Programs

TEST FRAMEWORK INSTANCE FOR JAVAWizard for creating the test specification

From test specification determine how to testTest plan uses instrumentation primitives

Source level coverage results

Page 7: SoftTest : A Framework for Software  Testing  of Java Programs

• Apply different tests to various code regions.• may be applied with different coverage criteria• A GUI for• What tests to apply, where to apply, under what

conditions• Select code regions• Conditions can be specified

TEST SPECIFICATION

Page 8: SoftTest : A Framework for Software  Testing  of Java Programs

public class Example

{

public int foo(int x)

{

if(x==200)

x = x+100;

else x = x-100;

return x;

}

}

DEFINITIONS

{

NAME: X, REGION_D,

LOCATION: FILE Example.java {

CLASS example, METHOD foo

}

}

BODY

{

DO BRANCH_TEST

ON REGION X UNTIL:90%

}

Example test specification

Page 9: SoftTest : A Framework for Software  Testing  of Java Programs

TEST PLANNER• Test plan: Where and how to test program

• Test table

• Where to instrument in the target machine code

• Test information (results)

• Branch coverage: when to insert & remove instrumentation, records which edges are hit/not hit

Page 10: SoftTest : A Framework for Software  Testing  of Java Programs

• Test payload

– What to do at an instrumentation point

– Target machine code

– Branch coverage: Update edge coverage

Page 11: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 N,N

2 4 N

3 4 N

4 1 N

Instrumentation

Hit

Page 12: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 N,N

2 4 N

3 4 N

4 1 N

Instrumentation

Hit

Page 13: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 N,N

2 4 N

3 4 N

4 1 N

Instrumentation

Hit

Page 14: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 N,N

2 4 N

3 4 N

4 1 N

Instrumentation

Hit

Page 15: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,N

2 4 N

3 4 N

4 1 N

Instrumentation

Hit

Page 16: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,N

2 4 N

3 4 N

4 1 N

Instrumentation

Hit

Page 17: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,N

2 4 Y

3 4 N

4 1 N

Instrumentation

Hit

Page 18: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,N

2 4 Y

3 4 N

4 1 N

Instrumentation

Hit

Page 19: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,N

2 4 Y

3 4 N

4 1 Y

Instrumentation

Hit

Page 20: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,Y

2 4 Y

3 4 N

4 1 Y

Instrumentation

Hit

Page 21: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,Y

2 4 Y

3 4 N

4 1 Y

Instrumentation

Hit

Page 22: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,Y

2 4 Y

3 4 Y

4 1 Y

Instrumentation

Hit

Page 23: SoftTest : A Framework for Software  Testing  of Java Programs

BRANCH COVERAGE EXAMPLE

Test Table

Test Payload

Mark edge hit

Insert at next point

Remove instrumentation

1

2 3

4

Block Next Hit

1 2,3 Y,Y

2 4 Y

3 4 Y

4 1 Y

Instrumentation

Hit

Page 24: SoftTest : A Framework for Software  Testing  of Java Programs

Example CFG with block as its own successor

Page 25: SoftTest : A Framework for Software  Testing  of Java Programs

TEST VIRTUAL MACHINE• Provides functionality to insert and remove

instrumentation at run-time.

• Implements an interface for inserting and removing instrumentation with fast breakpoints*.

• API provides primitives, such as• the placement of successor breakpoints, • storing test- specific data• removal of breakpoints, for constructing fast

breakpoints with varying payloads

Page 26: SoftTest : A Framework for Software  Testing  of Java Programs

TEST ANALYZER

• Displays the results of tests

• For branch coverage, the analyzer displays

the CFG for a method

• CFG for target machine code

Page 27: SoftTest : A Framework for Software  Testing  of Java Programs

Observations• SoftTest significantly reduces the number of tests resulting in savings in

scripting effort.

• Significant impact on the acceptability of code coverage.

• Provides cost effective approach to testing.

• Low performance and memory overhead.

• For the benchmarks, the memory overhead was 178 to 822 bytes for the test table.

• The performance overhead for coverage varied from 1% to 5.5% of the total execution time.

Page 28: SoftTest : A Framework for Software  Testing  of Java Programs

Preliminary Results: Branch Coverage Testing

Overhead includes:

1. Test Planner

2. Instrumentation

Run-time performance overhead

[3]

Page 29: SoftTest : A Framework for Software  Testing  of Java Programs

REFERENCES

[1] http://veryoldwww.cs.pitt.edu/copa/eclipse.html

[2] SoftTest: A Framework for Software Testing of Java Programs

[3] http://www.cs.pitt.edu/coco/papers/SoftTest-Etx-2003

[4] http://www.softwaretestingmentor.com/types-of-testing/static-testing.php

Page 30: SoftTest : A Framework for Software  Testing  of Java Programs

QUESTIONS?