+ All Categories
Home > Documents > Testing the.NET Message Sample SilkPerformer 2009.

Testing the.NET Message Sample SilkPerformer 2009.

Date post: 24-Jan-2016
Category:
Upload: drusilla-watson
View: 218 times
Download: 0 times
Share this document with a friend
Popular Tags:
16
Testing the .NET Message Sample SilkPerformer 2009
Transcript
Page 1: Testing the.NET Message Sample SilkPerformer 2009.

Testing the .NET Message Sample

SilkPerformer 2009

Page 2: Testing the.NET Message Sample SilkPerformer 2009.

2 04/21/23

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.

Page 3: Testing the.NET Message Sample SilkPerformer 2009.

3 04/21/23

Hooking a Win32 Client (1)

Create a new SilkPerformer WebServices/XML/SOAP project.Add a new application profile for MessageWin32Client.exe.

Page 4: Testing the.NET Message Sample SilkPerformer 2009.

4 04/21/23

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).

Page 5: Testing the.NET Message Sample SilkPerformer 2009.

5 04/21/23

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).

Page 6: Testing the.NET Message Sample SilkPerformer 2009.

6 04/21/23

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.

Page 7: Testing the.NET Message Sample SilkPerformer 2009.

7 04/21/23

.NET Explorer (2)

Create a new project after launching .NET Explorer.

Page 8: Testing the.NET Message Sample SilkPerformer 2009.

8 04/21/23

.NET Explorer (3)

Load the WSDL from the Web Service:http://localhost/MessageWebService/MessageService.asmx?WSDL

Page 9: Testing the.NET Message Sample SilkPerformer 2009.

9 04/21/23

.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).

Page 10: Testing the.NET Message Sample SilkPerformer 2009.

10 04/21/23

.NET Explorer (5)

Send a message that includes some message text to User2 .

Page 11: Testing the.NET Message Sample SilkPerformer 2009.

11 04/21/23

.NET Explorer (6)

Logout the current user and login as User2 (Username: User2, Password: Pass2).

Page 12: Testing the.NET Message Sample SilkPerformer 2009.

12 04/21/23

.NET Explorer (7)

Invoke GetMessageCount and store the result in a variable called mCount.

Page 13: Testing the.NET Message Sample SilkPerformer 2009.

13 04/21/23

.NET Explorer (8)

Call GetMessage with the message count variable as input (you will receive the last message that was sent)

Page 14: Testing the.NET Message Sample SilkPerformer 2009.

14 04/21/23

.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).

Page 15: Testing the.NET Message Sample SilkPerformer 2009.

15 04/21/23

.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.

Page 16: Testing the.NET Message Sample SilkPerformer 2009.

16 04/21/23

.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).


Recommended