Coding Duel for Fun with Pex

Pex for fun is a simplified version of Pex. Nothing to do with any installation for playing with this and just log in to and play. Code editor supports C#,Visual Basic and F#, also intellisense capabilities are avalable in the editor itself.

Games are puzzles which has their own secret(hidden) implementations. Players can implement the code according to the clues given by Pex. Players can ask from Pex anytime that how close to the hidden or the expected implementation. There are random puzzles that players can picked up and allows new puzzles to be entered to the puzzles list.

These puzzle games are very interactive coding duelsa and it will improve the problem solving capabilities and recalling capabilities as well.

Pex for fun is now avalable in Windows Mobile.

 Pex In Windows Mobile
Lets see how to play and solve a puzzle.I got following puzzle and the Puzzle method getting one integer parameter and returns it. The puzzle has hiden its implementation.

Continue reading “Coding Duel for Fun with Pex”


Pex – Step in to Automated Exploratory Testing for .NET

Pex automatically generates test suites with high code coverage. Right from the Visual Studio code editor, Pex finds interesting input-output values of  methods, which can be saved as a small test suite with high code coverage. Microsoft Pex is a Visual Studio add-in for testing .NET Framework applications.Pex is coming under Microsoft Power Tools and its a result of one of Microsoft research projects. Here’s the link for Pex

Following example will give a brief introduction on Pex and will be useful to get an idea on how it works.

Simple WPF application has ben created and it accepts two parameters(expecting two integers) from its silverlight page and displays addition of those two integers. There is a seperate Class called “Calculation” in the same namespace and it has “CalculateResult” method which adding two integers and return the result back. The program is working properly with two integers but as developers we cannot expect that the end user will always enters two integers and in this program it has not handled. In any parameterized method in a program, there can be unhandled scenarios like this(actually not  simple like this more complicated than this 🙂 )

 Following method will get two parameters and will try to return sum of those two.
Calculate Result Method
Lets run Pex against the CalculateResults method.
 Running Pex
Continue reading “Pex – Step in to Automated Exploratory Testing for .NET”