Need to know about PEX RRS feed

  • Question

  • Hi,

       I found so many articles regarding PEX in Microsoft Research. Thanks for sharing with us. Before that, I am having so doubts about PEX & Moles. I am new to Test Driven Development in .Net. Ok, my doubt is before implement the method , we need to create a test method with all possibilities of right and wrong inputs and implementation. Once we tested then we will implement the same in real world. Fine, where this Pex and mole will come under this scenario.

      Currently, what I am doing is , i have implemented a simple method to read the file content using System.IO. And i ran PEX against this method, and it will create a test project automatically and it showed some null exceptions in PEX explorations. Then i went to my method and implemented the logic to check the null values.After that i ran the same method, now the method ran successfully. So, it checked the input parameter and corrected me to implement null exception...My question is , whether it is checking only null exception and wat about the rest of my implementation. Also, i want to check the same method with positive result. But the generated pex test file warned me not to change the file manually, then how can i test with postive input....i.e I would like to test the generated test method with both positive and negative inputs.



    Saturday, January 8, 2011 8:17 AM

All replies

  • You should follow the tutorials at http://research.microsoft.com/en-us/projects/pex/ in order to learn about Pex. Since your code relies on System.IO, it most likely relies on the File System. In that case, the Pex analysis will probably be defeated.

    In general, it is easier to answer question based on small examples - rather than general question like the one you wrote above.

    Jonathan "Peli" de Halleux - Try Pex online at www.pexforfun.com!
    Monday, January 10, 2011 10:51 PM