none
How to add a default value for test in WCFTestClient? If its possible. RRS feed

  • Question

  • Hello MSDN community.

    It's possible to add a default value by code or any cfg in WCFTestClient? For example there are values that are null and I want for every update to load the default value, for example a Json Body with value="ID":"123", then anybody can test without know what the service does exactly.

    Thanks for the help.

    Regards.


    Monday, June 8, 2015 1:41 PM

Answers

  • I am afraid not. The default configuration and contracts are generated the same way the svcutil tool generates configuration when adding service reference. It is up to the caller, i.e. the user of the test client in this case, to provide the values.

    You may want to consider writing coded unit tests or use a demo cient application to test your WCF service methods instead of using the WCFTestClient. Then you can define the default values in code and re-use them every time you run the unit test(s) or the demo client.

    Hope that helps.

    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

    Monday, June 8, 2015 3:02 PM