This is Karthigeyan.
I have downloaded the kit Release20090615CodePlex and followed the complete steps as instructed in the LAB word document for creating the unit test for WCF Web service. I have followed all the necessary steps to reach the exercise 3. However, I am stuck
at the step 6 in teh exercise 3
This is the instrcution to be followed in step 6 “c:\program files\wcfunit\wcfunit” CompileTimeScenario <trace file> SampleConfig.xml
I have provided the folwoing in the SDK prompt
"c:\program files\wcfunit\wcfunit" CompileTimeScenario "c:\Documents and Settings\karthigeyan_raju\My Documents\Release20090615CodePlex\Lab\2008\SampleClientProxy\ConsoleClient" SampleConfig.xml
and got the message WCF Load Test Generator Version 22.214.171.124
The assembly C:\Documents and Settings\karthigeyan_raju\My Documents\Release200
0615CodePlex\Lab\2008\SampleClientProxy\ConsoleClient\bin\Debug does not exist.
Please suggest me where I am going wrong.
EXERCISE 3 – GENERATING THE UNIT TESTS FROM THE TRACE
Estimated time to complete this exercise: 10 min.
In this exercise the command-line tool is used to generate unit test code for calling the WCF service from the data in the trace file and the assembly containing the generated proxy.
Carry out the following steps.
1. Create a new test project in Visual Studio. Delete the tests added by the project template as these are not needed.
2. Add a reference to the following assemblies:
System.Runtime.Serialization (version 126.96.36.199)
If you cannot see these assemblies browse for them in the following path:
C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.0
3. In the directory containing the test project create a file called SampleConfig.xml with the following contents:
<?xml version='1.0' encoding='utf-8' ?>
<assembly fileName="<path to ConsoleClient.exe>"/>
Note that <path to ConsoleClient.exe> must be replaced with the path to the actual ConsoleClient executable.
4. Open an SDK command prompt and change the directory to the one containing the test project.
5. Execute the following command:
svcutil /o:proxy.cs /config:app.config
bearing in mind that the WCF service must still be running.
6. Run the command-line tool using the following command:
“c:\program files\wcfunit\wcfunit” CompileTimeScenario <trace file> SampleConfig.xml
where the <trace file> is the path to the compile_time_proxy.svclog file created in the previous exercise.
7. The tool should produce the following output:
Parsed message with action http://tempuri.org/IArithmetic/Add [OK]
Parsed message with action http://tempuri.org/IArithmetic/Subtract [OK]
8. Two files called CompileTimeScenario.cs and CompileTimeScenario.stubs will have been produced. Add these files to the test project (need to show all files in the Add Exising Item dialog).
9. Rename CompileTimeScenario.stubs to CompileTimeScenario.Stubs.cs, ignoring the warning from Visual Studio about the file becoming unusable.
10. Also add the proxy.cs and app.config files located in the test project folder to the project.
11. The solution should now build and a unit test called CompileTimeScenario should appear in the Test View.
12. Make sure that the sample service is running.
13. Run the CompileTimeScenario unit test. This will make the same two calls that the ConsoleClient made.