1 / 16

Testing the .NET Message Sample

Testing the .NET Message Sample. SilkPerformer 2007. Overview. This tutorial examines the following testing scenarios: Hooking a Win32 client application Recording a Web client application Using .NET Explorer to test a Web Service

katy
Download Presentation

Testing the .NET Message Sample

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testing the .NET Message Sample SilkPerformer 2007

  2. Overview • This tutorial examines the following testing scenarios: • Hooking a Win32 client application • Recording a Web client application • Using .NET Explorer to test a Web Service • Creating a .NET test driver using the SilkPerformer .NET Framework • To begin, launch the Message server.

  3. Hooking a Win32 Client (1) • Create a new SilkPerformer WebServices/XML/SOAP project. • Add a new application profile for MessageWin32Client.exe.

  4. Hooking a Win32 Client (2) • Begin recording. • Perform actions in the Win32Client (e.g., connect, login, send, and logout). • End recording. • Review the recorded script. For each call made in the Win32 client application there are WebUrlPostBin calls and a SOAP-Envelope. • Execute a TryScript run (watch the server console window).

  5. Recording a Web Client • Create a new Web project. • Begin recording: http://localhost/MessageWebClient/Default.aspx. • Execute a TryScript run using the recorded script(watch the server console window).

  6. Testing the Web Service with .NET Explorer (1) • Launch .NET Explorer. • Load the WSDL from:http://localhost/MessageWebService/MessageService.asmx?WSDL • Define a scenario such as the following: • Login (User1, Pass1) • SendMessage (User2, Some message text) • Logout • Login (User2, Pass2) • GetMessageCount : store result in variable mMsgCount • GetMessage (mMsgCount) • Logout • This scenario is stored in NetExplorer TestingWebService\TestWS.nef, which can be opened using .NET Explorer.

  7. .NET Explorer (2) • Create a new project after launching .NET Explorer.

  8. .NET Explorer (3) • Load the WSDL from the Web Service:http://localhost/MessageWebService/MessageService.asmx?WSDL

  9. .NET Explorer (4) • Invoke the login method using User1 and Pass1 as input values. • You can also use random variables or global variables mapped to attributes (see the .NET Explorer User Guide for details).

  10. .NET Explorer (5) • Send a message that includes some message text to User2 .

  11. .NET Explorer (6) • Logout the current user and login as User2 (Username: User2, Password: Pass2).

  12. .NET Explorer (7) • Invoke GetMessageCount and store the result in a variable called mCount.

  13. .NET Explorer (8) • Call GetMessage with the message count variable as input (you will receive the last message that was sent)

  14. .NET Explorer (9) • Add the remaining logout method call. • Execute an Animated Run. • The failed verification can be ignored (or you can remove the default verification of the GetMessageCount call).

  15. .NET Explorer (10) • Export a SilkPerformer .NET project or a Visual Studio .NET project (exported projects can be found in the following folder: NetExplorerExportedProject). • Execute a TryScript Run via SilkPerformer or Visual Studio .NET. • Explore the TrueLog. You will see a node for each Web Service call.

  16. .NET Framework Project • Create a new .NET Framework project. • Use the Model Script dialog to bring up Visual Studio .NET. • Code your .NET test driver. • A sample implementation of a test driver that tests the .NET Remoting server and the Web Service can be found in the SPVNetTestDriver folder. • Open the project in Visual Studio .NET and execute a TryScript. • After the run, review the TrueLog and open the user‘s .wrt file. • The sample sends a message from User1 to User2 (where User1 is connected to the remoting server and User2 is connected to the WebService).

More Related