This project has moved and is read-only. For the latest updates, please go here.

Using Server Side Trace for NETTCP Binding

Apr 21, 2010 at 2:58 PM

Hello All,

     I was trying to generate a Unit Test by following the steps described in the the Read Me document which comes with the tool. I followed exercise 6 to enable the trace logs. Please find below the information which might be relevant:

  • WCF Service hosted locally using console host.
  • Service configured for using Net Tcp Binding
  • Enable server side trace by following the steps mentioned in the "Read Me"
  • service_side.svclog log file generated
  • Opened Visual studio 2008. Created a new test, Selected the WCF test wizard
  • Selected the option "Use a Precaptured Trace File" option
  • Choose the "Server Side" Radio button
  • Clicked Parse.
  • The Wizard Window dissapears.

Repeated the above steps couple of time with no luck. I would be indebted if I could receive any kind of help. Looking forward for the reply.

Regards,

-Varun

 

Coordinator
Apr 21, 2010 at 3:29 PM

Could you try this with the command line version of the tool and tell me what happens?

Thanks

Rob

Apr 21, 2010 at 3:51 PM

Hello Rob,

    Thank you for the quick response. I perused the read me document to check on how to use the tool through command line. It only mentions about generating the unit tests from the Compile time trace(Exercise 3) but there is no mention about command line utility for pre captured server side trace. Could you kindly guide me in using the tool through Command line for generating unit tests using pre captured server side trace. Thank you once again for your time.

Regards,

Varun

Coordinator
Apr 21, 2010 at 4:05 PM

Follow the example for the compile time trace in exercise 3 but make sure that the config file has the following:

 

<WcfUnitConfiguration xmlns='http://microsoft.com/wcfunit'
                      testMethodMode='ScenarioMethodOnly'
                      operationTimerMode='IncludeOperationTimers'
                      clientTrace='false'
                      serviceTrace='true'>

Regards

Rob

Apr 21, 2010 at 4:53 PM
Edited Apr 22, 2010 at 1:16 AM

Please find the below post

 

Apr 21, 2010 at 5:55 PM
Edited Apr 22, 2010 at 1:16 AM

Please find below Post

-Varun

Apr 21, 2010 at 7:24 PM
Edited Apr 22, 2010 at 1:15 AM

Rob,

   I realized that there were few mistakes in my SampleConfig.xml file, After making the necessary corrections the file had the following content:

<?xml version="1.0" encoding="utf-8"?>
<WcfUnitConfiguration xmlns='http://microsoft.com/wcfunit'
                      testMethodMode='ScenarioMethodOnly'
                      operationTimerMode='IncludeOperationTimers'
                      clientTrace='false'
                      serviceTrace='true'>
  <assembly fileName="C:\VSSTest\TestProject\Server\Binaries\TestProject.Services.DataService.Contracts.dll"/>
    <soapActions soapActionMode='Include'>
      <soapAction action="http://tempuri.org/IDataService/GetData"/>
    </soapActions>
  </WcfUnitConfiguration>

As you can see above, I have included the soap action and the assembly file name, After making this change I ran the command line utility, But I am getting the following message in the console window:

C:\Program Files\WcfUnit>WcfUnit CompileTimeScenario "C:\VSSTest\TestProject\comp
ile_time_proxy.svclog"  SampleConfig.xml
WCF Load Test Generator Version 3.0.0.0
Parsed message with action http://tempuri.org/IConnectionRegister/Duplicate [FIL
TERED OUT]
Parsed message with action http://tempuri.org/IDataService/SaveData [FILTERED OU
T]
Parsed message with action http://tempuri.org/IConnectionRegister/Duplicate [FIL
TERED OUT]
Parsed message with action http://tempuri.org/IDataService/GetData [OK]
Data or message contract attribute expected on type System.Xml.Linq.XElement

Kindly let me know if I am missing out on anything here. Thanking you.

Regards,

Varun