<p>Those of you who have used <a href="http://research.microsoft.com/Pex/" rel="noreferrer">Pex</a>, what do you think its advantages and disadvantages are of Pex as a tool?</p>

<p>Also, what do you think are the advantages and disadvantages of "Automated Exploratory Testing" in general, <strong>as a supplement to</strong> TDD/Unit Testing?</p>

[{'answer_id': 59654, 'author': 'Haacked', 'author_id': 598, 'author_profile': 'https://Stackoverflow.com/users/598', 'pm_score': 4, 'selected': False, 'text': '<p>I think Pex as an exploratory testing tool is really intriguing. In that regard, I see it as something I\'d want to hand off to QA to use.</p>\n\n<p>As a TDD tool, it needs some work, as TDD is a design activity. However, I do like the direction that Peli is heading. There\'s something to be said for automated assisted design. For example, just because TDD is a design tool, there\'s no reason I can\'t have an automated tool point out potential edge cases while I\'m designing, right? Build quality in from the start.</p>\n\n<p>Check out this post in which Peli uses Pex in a TDD style workflow. <a href="http://blog.dotnetwiki.org/TDDingABinaryHeapWithPexPart1.aspx" rel="nofollow noreferrer">http://blog.dotnetwiki.org/TDDingABinaryHeapWithPexPart1.aspx</a></p>\n'}, {'answer_id': 78462, 'author': 'Peli', 'author_id': 14403, 'author_profile': 'https://Stackoverflow.com/users/14403', 'pm_score': 4, 'selected': False, 'text': "<p>Pex lets your write <em>parameterized</em> unit tests. In that sense, it totally fits into the TDD/unit testing flow: write the test, have Pex 'explore' it, find some failing tests, fix the code, and so forth.</p>\n\n<p>The big advantage is that you can express your tests for <em>classes</em> of inputs, not just a couple hard-coded values. This gives more expressiveness for writing tests and also forces to think about the invariant/expectation that your code should fullfill (i.e. it's harder to write assertions).</p>\n"}, {'answer_id': 270988, 'author': 'Jon Dewees', 'author_id': 1365, 'author_profile': 'https://Stackoverflow.com/users/1365', 'pm_score': 3, 'selected': False, 'text': "<p>I'm really pumped about Pex. It will provide tests for edege cases that you won't ever dream up, especially if your team is small and the person writing the methods is the same as the person writing the tests.</p>\n\n<p>It will also provide contractual obligations that your methods will obey.</p>\n"}, {'answer_id': 433956, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': False, 'text': '<p>If you look for literature on writing Theories (google David Saff) - which are a more general way of writing unit tests, and use Pex as a theory explorer I\'ve found a step change in productivity from my experience so far.\nI\'ve just wrote a blog post detailing my experiences of Pex in TDD, here: <a href="http://taumuon-jabuka.blogspot.com/2009/01/theory-driven-development-using_11.html" rel="nofollow noreferrer">http://taumuon-jabuka.blogspot.com/2009/01/theory-driven-development-using_11.html</a></p>\n\n<p>and as I said - I see it as TDD on steroids! It in no way replaces TDD, but enhances the activity.</p>\n'}, {'answer_id': 3320264, 'author': 'GregC', 'author_id': 90475, 'author_profile': 'https://Stackoverflow.com/users/90475', 'pm_score': 2, 'selected': False, 'text': '<p>Test-first development makes you structure your code for testability.  In this respect, Pex finds clever and awkward paths thru your code, helping out beyond simple coverage metrics.</p>\n\n<p>Major forte of Pex with Moles is enabling of tracking side effects when doing Brownfield development: run Pex once and save outputs, then apply code changes, and run Pex again to see what got broken.</p>\n'}]
['https://Stackoverflow.com/questions/59398', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5487/']