Coffeehouse Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Code Testing Using Contracts and Pex

Back to Forum: Coffeehouse
  • User profile image

    Must code contracts and pex be applied in a tdd fashion? Is it possible to apply these testing techniques to 3rd party or legacy code?

  • User profile image

    For a background, I invite people to watch to get an idea on how Pex/Contracts may work together.

  • User profile image

    My answer would be no. Pex and Contracts can both be applied to 3rd party/legacy code, but they really shine when used together:

        - Pex can explore any regardless whether it's 3rd party or legacy. You can use Pex to generate a regression suite for your legacy code (or use the highly experimental 'fix it' feature to infer missing preconditions).
        - Code Contracts can be defined 'out-of-band', i.e. in separate assemblies. So potentially, you could annotate 3rd party code with Contracts. This point is not so obvious though: how much effort are you willing to invest in 3rd party/legacy code?

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.