software testing project: testing csmap program

21
Software Testing Project: Testing csmap program 生醫電資所 黃建龍 2013.6.25

Upload: drake-huang

Post on 11-Apr-2017

182 views

Category:

Software


1 download

TRANSCRIPT

Page 1: Software Testing Project: Testing csmap program

Software Testing Project:Testing csmap program

生醫電資所黃建龍

2013.6.25

Page 2: Software Testing Project: Testing csmap program

csmap - Conservation Score Mapper

● Mapping the given range of a sequence to conservation scores of a chromosome.

● It used mmap, indexing and bisect module for accessing data fastly.

● However, to determine which sites are on the segments is complicated and error-prone.

Page 3: Software Testing Project: Testing csmap program

● For display of dense, continuous data such as GC percent, probability scores, and transcriptome data.

● The conservation score is calculated with whole genome multiple sequence alignments.

● Segmented of many continuous data

Wiggle Track Format (WIG)

Page 4: Software Testing Project: Testing csmap program

Wiggle Track Format (WIG)

Page 5: Software Testing Project: Testing csmap program

file.seek(offset)

It moves the pointer to some other part of the file so you can read or write at that place.

e.g. seek(0) will move the pointer to the beginning of file.

Page 6: Software Testing Project: Testing csmap program

Testing Process

● Unit testing ○ Built-in unittest module (PyUnit)○ Generation of test cases

● Coverage testing○ coverage.py

● Mutation testing○ PyMuTester

Page 7: Software Testing Project: Testing csmap program

Unit testing

● Testing a class or individual function.● Comparison of expected value and return

value.

Page 8: Software Testing Project: Testing csmap program

unittest Module (PyUnit)

http://imsardine.wordpress.com/tech/unit-testing-in-python/

1. The test runner will run that method prior to each test.

2. The test runner will invoke that method after each test.

Page 9: Software Testing Project: Testing csmap program

unittest Module (PyUnit)

Page 10: Software Testing Project: Testing csmap program

Generation of Test Cases

● 5 regions.● The length of each

region: 10● The distance of two

neighboring regions: 10

Page 11: Software Testing Project: Testing csmap program

Generation of Test Cases

Page 12: Software Testing Project: Testing csmap program

Results

Page 13: Software Testing Project: Testing csmap program

● coverage.py (http://nedbatchelder.com/code/coverage/)

○ It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not.

Coverage testing

Page 14: Software Testing Project: Testing csmap program

Coverage testing

Page 15: Software Testing Project: Testing csmap program

HTML display

Page 16: Software Testing Project: Testing csmap program

Bug fixes with test case 14.

Page 17: Software Testing Project: Testing csmap program

Mutation testing

● It involves modifying a program's source code in small ways.

● Mutations are based on well-defined mutation operators (such as using the wrong operator or variable name).

● It helps developers locate weaknesses in the test cases used for the program.

Page 18: Software Testing Project: Testing csmap program

PyMuTester

Page 19: Software Testing Project: Testing csmap program

Results

Page 20: Software Testing Project: Testing csmap program

Results

Total: 21● Alive: 0 (0.0%) ● Killed 11 (52.4%) ● Unreachable: 10 (47.6%)

Page 21: Software Testing Project: Testing csmap program

Conclusion

● Unit testing, coverage testing and mutation testing were used in this study, and a bug revealed under testing.

● The results of coverage testing and mutation testing indicated that test cases were insufficient or some of codes was unreachable.