BVandLC Tool.

A tool for guiding PEX to achieve Boundary Value and Logical Coverage Criteria.

Boundary Value Coverage

For a logical condition (x > 10)

The typical test inputs generated by Pex are
x=0, x=12 //* Values may Vary

We add instrumentation to guide Pex to generate values at boundary conditions as well
i.e besides x=0, x=12 two new test inputs are generated
x=9,x=10

Logical Coverage

For a logical statement (x || (y && z))
the typical test inputs generated by Pex are
(F,F,F) ,(F,T,F), (F,T,T),(T,F,F)

We add instrumentation to guide Pex to generate test cases to execute condition at all ( if possible ) combinations of truth values of constituent clauses.
Our implementation currently faces some issues in some of the compiler optimizations where a complex predicate is broken down to multiple simple predicates in MSIL, we would shortly upload fixes

Steps to execute the tool

  • Generate the PUTs for the Project to be tested using Pex. (This would generate <ProjectName>Tests.dll).
  • Using Command Line execute Tool "path of <ProjectName>.exe"
  • Note that a file <ProjectName>.exe.pe would be generated in the same folder where <ProjectName>.exe resides.
  • Copy the file in the Test directory of the project. ( the folder in which <ProjectName>Tests.dll exists)
  • Rename the file to <ProjectName>.exe replacing the older <ProjectName>.exe if present.
  • Using Command Line execute pex <ProjectName>Tests.dll. Pex will execute PUTS with additional inputs and would generate reports to browse.

PS: For the demonstrative purpose there is test project namely TestPro bundled along the sources.
  • Sources of BVandLC V0.1 can be downloaded from here.

Last edited Apr 27, 2010 at 8:53 AM by rahulpandita, version 7

Comments

No comments yet.