locked
How can i get the information for 'pex exploration results' ? RRS feed

  • Question

  • If i execute 'Run PEX', will be show test result at 'pex exploration results' view.

    I hope to use this information to my test result Management System.

    How can i handle this information ?..

    I have some idea.

     

    1. Visual Studio Menu : Tools > Options > PEX > Report - true
    This options provide some report.html.

    But this file so difficult to handle.

     

    2. report.per

    this file have some test result information. But difficult to handle.

    No wellknown document.

     

    3. Save Test Project and Reexecute

    Will be provide '2011-01-07 09_36_27.trx'.

    This file wellknown xml file format.

    So i can handle easy.

    But this way have very big problem.

    For example, always save test project and reexecute.

     

    I hope to ...

    First, handle Pex Exploration Results.

    Second, When pex exploration completed, automatically receive exploration result at our system.

                 When pex exploration completed, how to get the completed event ?

     

    thanks.

     

     

    • Edited by canyou Monday, January 10, 2011 11:07 AM reply changed
    Friday, January 7, 2011 1:19 AM

All replies

  • I found 'Extension Writer Handbook' from PEX hompage, and i applyed 'PexExecutionPackageAttributeBase' for some PEX Test Project.

     

    But i can't find perfect solution for me.

    I want to handle for 'Pex exploration results'

     

    like Bottom : 

      First, implemented custom library overridding 'PexExecutionPackageAttributeBase' ( namming 'PEXExtentionLogger' )

       public class PEXExtentionLogger: PexExecutionPackageAttributeBase {

             protected override object BeforeExecution(IPexComponent host) {

           host.Log.GeneratedTestHandler += (e) =>  MessageBox.Show(e.GeneratedTest.MethodCode);

           return null;

    }

      }

     

      Second, Create PEX parameterized unit test project from My Test Target Library Project (ClassLibrary1).

      PEX test project is 'ClassLibrary1.Tests'

     

      Third, add code at AssemblyInfo.cs of PEX test project and add reference DLL ('PEXExtentionLogger.dll')

              '[assembly: PEXExtentionLogger]'

      ( i want to automize for this step, can i do it ? do you have some idea ?? )

     

      Finally, if 'Run Pex Exploration' at ClassLibrary1.Tests (PEX Test Project), you will see some dialogbox from this code. 

     

          public class PEXExtentionLogger: PexExecutionPackageAttributeBase {

             protected override object BeforeExecution(IPexComponent host) {

           host.Log.GeneratedTestHandler += (e) =>  MessageBox.Show(e.GeneratedTest.MethodCode);   // this

           return null;

    }

        }

     

     

     

    i can't find perfect solution for me.

    I want to automize for all steps. ( without user manual step )

    Somebody help me or give me new idea.

     

     

    And can i snip 'Test Results View' (Not Pex Exploration Results) at PEX Test Project ?

    Monday, January 10, 2011 7:18 AM
  • Generating the .trx file out of the box is not supported out of the box by Pex. As you've discovered you could create an extension that does this for you. Instead of call MessageBox.Show in the 'GeneratedTestHandler', you should build the XML file (.trx is an xml file).

     


    Jonathan "Peli" de Halleux - Try Pex online at www.pexforfun.com!
    Monday, January 10, 2011 11:03 PM
  • Yes, I know.

     

    I want to automize for Third steps. ( without user manual step )

    I can't find solution.

     

    and Visual Studio Test Project(PEX Test Project) don't have PUBLIC API.

     

    So i can't snip about Test Execution Information unlike PEX Extension. (except for 'trx' file)

    Is that right ?

    Tuesday, January 11, 2011 5:26 AM