Pex is a tool from Microsoft Research that aims to automate unit testing by generating test inputs through static and dynamic analysis of code. It learns more about the code over time to generate inputs that increase code coverage. Pex has been used internally at Microsoft to test core components and is available today for Visual Studio 2008 and 2010, though it has some limitations as a research project. The document discusses Pex's capabilities, examples of its use, and its potential future applications when combined with techniques like behavior-driven development and code contracts.