views:

527

answers:

2

Looking to get your take on an automated testing tool (voting should bring good ones to the top)

Ideal tool would:

  • Eliminate the need to present a set of values to a method.
  • employ techniques such as Interactive Exploratory Testing where the code is examined to determine what values are required to exercise all code paths. i.e. the unit tests for a method is determined by the complexity of the code

For example, if a method checks that an integer argument is 123, at least 2 unit tests are generated: one where that argument is 123 and one where it is not.

For Java my understanding is these are some options but not .NET

  • TestGen4J
  • AgitarOne

Have heard of Pex - For .NET from Microsoft Research but this has a non-commercial license

Thanks

+2  A: 

I've tried some of these tools in other languages and IMHO they are almost a complete waste of time. Reason? They can't guess at the semantics of a method call in any meaningful way. There's a very good article about this here -- well worth a read.

Phil Bennett
unit tests describe the behavior of a software and can therefore not be generated
mo
+2  A: 

Pex enables parameterized unit testing and uses dynamic symbolic execution (some kind of automated exploratory testing) to generate inputs. Pex can understand the semantics of MSIL, i.e. of any managed method call. In the '123' example, Pex would find both tests.

It lets developers write parameterized unit tests - so it totally fits in a test-first development style.

Unfortuntely, Pex can be used for commercial software for now. More info at http://research.microsoft.com/pex

a pex developer :)

Peli