software testing project: testing csmap program

Post on 11-Apr-2017

182 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Software Testing Project:Testing csmap program

生醫電資所黃建龍

2013.6.25

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.

● 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)

Wiggle Track Format (WIG)

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.

Testing Process

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

● Coverage testing○ coverage.py

● Mutation testing○ PyMuTester

Unit testing

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

value.

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.

unittest Module (PyUnit)

Generation of Test Cases

● 5 regions.● The length of each

region: 10● The distance of two

neighboring regions: 10

Generation of Test Cases

Results

● 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

Coverage testing

HTML display

Bug fixes with test case 14.

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.

PyMuTester

Results

Results

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

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.

top related