Wednesday, June 16, 2010

shift to Characterization test

  • I have to make the unit test for the classes someone made.
  • I have been studying the classes and making the unit tests for them simultaneously.
  • Some class files have the examples of use in the comment statements
This is why I will start to make the tests with Characterization test until now.
Basically, I will prepare a test class for a class, and test the behaviors for the methods.
I won't write tests for private methods. I will write them only for methods that can be accessed externally.
However, even if they are private methods, they should pass C0 test.(I will manage it with rcov.)

Monday, June 14, 2010

design criteria for Unit Test

  • Prepare unit tests for each class.
  • For each module, prepare the mock classes that include each the module
  • When a class is prepared only for internal use or tightly-coupled with another class, I won't prepare the unit test for the class, but prepare it for the central class.

What I did in the second week.

There are some classes which don't have unit tests in the following directories.
appl/
compat/
db/
io/
sequence/
shell/
util/
I'm making unit tests for the classes in db/, such as Bio::PDB::*, Bio::GenBank::*, Bio::KEGG::*.
I'd like to create the unit test completely in the directory within this week.

Sunday, May 30, 2010

start making the unit tests

As I say in my proposal, I started creating the unit tests for BioRuby.
In BioRuby library, 142 files don't have the unit test files.
I will create the unit test for the files that don't use external libraries or softwares in them by next Sunday.
Currently I create unit tests for the files in db directry (I know I'm late..).

Monday, May 24, 2010

rcov and heckle

rcov checks line coverages.
Heckle is a mutation tester.

Thursday, May 20, 2010

What I have to survey

Ruby
Difference between 1.8.7 and 1.9.2. How to overcome the difference
BioRuby
classification of the methods in terms of dependency on other libraries
The way of the test
The way of writing the unit tests. leaning what behavior I have to check and how do I check them

Tuesday, May 18, 2010

How to detect classes not having the unit tests.

Only part of class files have the equivalent test files In BioRuby.
In order to see a whole coverage of the unit test to the all class files with rcov, I have to develop the empty test files for the class files not having them.
The process is as follows.

First, make sure which files in the lib directory don't have the equivalent test files


Seconde, prepare each test file in witch the equivalent lib file is required.

Third, execute rcov to visualize the whole coverage