Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Getting started with Pex in Visual Studio 2008

Download

Right click “Save as…”

Nikolai Tillmann and Peli de Halleux give a short tutorial on Pex, an automated white box testing tool for .Net. The tutorial is a pair-programming session where they show us how to get started with Pex in Visual Studio, starting from an (untested) piece of C# code:
  • how to use Pex to explore the behavior of any method in your code,
  • how to save the exploration results into a unit test suite,
  • how to improve the generated parameterized unit tests to leverage Pex code exploration engine.

If you want to follow up the steps on your machine as well,

The Research in Software Engineering team (RiSE) coordinates Microsoft's research in Software Engineering in Redmond, USA.

Tags:

Follow the Discussion

  • Carl WeisCode Logix It's in the code.
    This is great, automatic unit test generation and complete code coverage!

    Dowload it, and try it... It rocks!
  • MathieuRhapsody In Metal We Trust
    Awesome! I'm going to try it out as well. Very cool to see that Pex actually uses values inside the function as test values.

    Edit: Ok. I've been playing with it for a half an hour and it looks very very very cool!!! 
  • stevo_stevo_ Human after all
    Is this right that you need a team edition of vs to use pex now? I'm using x64 and it just keeps telling me I need the team editions (I use pro), I used the older versions of pex in pro.
  • Peli de Halleuxpeli Peli
    The DevLabs installer requires Visual Studio 2008/2010 with TeamDev or Team Test.
    The academic download does not require Visual Studio. However, there is currently a bug in that installer which incorrectly checks for VS. We are currently preparing a new drop for the academic download and will update the link shortly.

    Sorry for the inconvinience.
  • stevo_stevo_ Human after all
    Ah ha! no worries, I'll check back soon! cheers.
  • Peli de Halleuxpeli Peli
    The problem has been fixed and a new academic download is available.
  • stevo_stevo_ Human after all
    sooopar! cheers
  • Awesome tool. Just experimented with it and already loving it. Keep up the good work!
  • Peli de Halleuxpeli Peli
    If you use Pex (and hate/like it), don't forget to drop us a note in the forums...
  • I've tried the link at http://msdn.microsoft.com/en-us/devlabs/cc950525.aspx but this one throws an error too that I need 2008 TS. I have the architect version of TS 2008 installed though.

    Running on Win7 x64.
  • Peli de Halleuxpeli Peli
    Hi Tom, I'm sorry for the confusion but Pex requires Visual Studio 2008 Team Dev or Team Test Editions, or Visual Studio 2010 CTP.
  • I have been evaluating Pex, so far I like what I see. Keep up the good work.

    I'll soon be testing complex objects for WCF service calls - I'm not sure what I'll find.

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.