Test First Development with Pex and Moles
Published January 5th, 2012 Under Unit Testing | Leave a Comment
This video provides a demonstration of Pex, a parameterized white box unit test tool, and Moles, an isolation framework. These two tools useful for test-first development in the context of .NET development. Read more
Code Contracts and Pex: Power Charge Your Assertions and Unit Tests
Published October 13th, 2010 Under Unit Testing | Leave a Comment
This video shows how Code Contracts provides a set of tools for design-by-contract programming and how Pex is an advanced unit-testing tool that uses automated program exploration to intelligently create unit tests with high code coverage. See how they work together so that your code has fewer defects. Learn about new features for Code Contracts including automatic documentation generation, call-site checking for components and reference assemblies for the .NET Framework and for Pex including a light-weight mocking framework, improved support for large code bases, and more thorough test input generation.
More information and video download in other formats
Pex – Unit Testing of SharePoint Services that Rocks!
Published June 10th, 2010 Under Software Testing, Unit Testing | Leave a Comment
SharePoint Services are challenging for unit testing because it is not possible to execute the SharePoint Service without being connected to a live SharePoint site. For that reason, most of the unit tests written for SharePoint are actually integration tests as they need a live system to run. In this session, we show how to use Pex, an automated test generation tool for .NET, to test SharePoint Services in isolation. From a parameterized unit test, Pex generates a suite of closed unit tests with high code coverage. Pex also contains a stubbing framework, Moles, that allows to detour any .NET method to user-defined delegates, e.g., replace any call to the SharePoint Object Model by a user-defined delegate.
Moles: Mocking the Un-Mockable
Published April 26th, 2010 Under Unit Testing | Leave a Comment
In this episode we are going to take at how to use Pex and Moles for .Net. Unit testing is great, but most free isolation frameworks require that your mocks implement an interface. But what do you do when the class you are trying to mock is static or sealed with no interface. If you can’t modify the class then your unit testing efforts are usually stuck. Moles, the new free isolation framework from Microsoft, supports mocking almost any CLR based class (including sealed and static classes).
http://www.dimecasts.net/Content/WatchEpisode/170
The Synergy of Code Contracts and Pex
Published August 26th, 2009 Under Unit Testing | Leave a Comment
Manuel Fähndrich and Peli de Halleux sit down for a quick coding session that shows how to use Code Contracts and Pex together. Code Contracts can be used to specify what your code should do, they get turned into runtime checks which Pex can analyze and try to find counter-examples for. This was a fun session with Manuel and really shows the synergy of the two tools/approaches.
Getting started with Pex in Visual Studio 2008
Published August 24th, 2009 Under Unit Testing | Leave a Comment
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,
* Download Pex from DevLabs
* Download the code example
* Ask your questions in the forum
Pex – Automated Exploratory Testing for .NET
Published August 21st, 2009 Under Unit Testing | Leave a Comment
Pex is a white-box test generation tool for .NET. Starting from a hand-written parameterized unit test, Pex analyzes the program-under-test to determine relevant test inputs fully automatically. To this end, Pex executes the program multiple times with different inputs while monitoring the taken execution paths. Pex uses a constraint solver to determine new test inputs that will exercise different execution paths. As a side effect, Pex may find errors in the program. The result is a traditional unit test suite with high code coverage. In addition, Pex suggests to the programmer how to fix certain errors. Pex is integrated into Microsoft Visual Studio.
RSS
Twitter