Sunday, February 19, 2012

Pex and Moles : Tool for Automated Exploratory Testing.

Note Pex and Moles will be integral par of Fake Frameowrk and shipped with VS2012
Introduction
Exploratory testing is key for the success of large project that are built on complex logic. Pex and Moles are Visual Studio 2010 Power Tools that help Unit Testing .NET applications.

This post summarize what exactly exploratory testing, how it differ from Domain Model based testing , where Pex and Moles stands for and also points to right learning  resources step by step. 


What is Exploratory Testing ?
It is an white  box testing approach in which testing get started with some very simple inputs like (x=0 and y=null) and with each execution of input set it discover new set of test input such as (null,null), (1,1) etc.
Pex and Moles are latest addition to VS2010 test tool kit and help to achieve highest coverage with minimum test cases.

Exploratory Vs Domain Model based testing?
In very first go it look like domain model based testing approach but I would say it further augment domain model bases testing. 
It combines constrains discovered from program internal logic and discover finite number of condition that could change program output. However in case of domain model based testing input combination are generated based on fixed logic and program internal

What is Pex and Moles?
Theses are new tools that facilitate exploratory testing for code written in Dot.Net framework. In general theses two tools are used in combination  as fallows 
  • Pex :- Enable you to explore any code segment (function) from Visual Studio and convert them to unit test case if required.
  • Moles:- Moles allows to replace any .NET method with a delegate. It supports unit testing by providing isolation and mocking by way of detours and stubs.
Overall Learning Curve   
Five to Ten hours of learning effort will be good enough for getting started on real time project

Licenses
  1. Free for noncommercial use.
  2. Free for MSDN subscribers for noncommercial use.
  3. Paid commercial use. 
Getting Started 
Ready to Get started with Pex and Moles , fallow the steps below.
  1. Install Prerequisite :  VS2005 or higher
  2. Install Pex and Moles installer package 
  3. Watch the Channel9 'Getting Start with Moles' video
  4. Watch the Channel9 'Getting Started with Pex' video
  5. Watch Channel9 Pex - How Pex Works 
  6. Read the small blog Pex & Moles - Testing business layer 
  7. Checkout tutorials here 
  8. Ready to go, Happy coding.

Further References

No comments:

Post a Comment