Presentation is loading. Please wait.

Presentation is loading. Please wait.

Atlanta Mercury Users Group How to Performance Test.NET and.NET Web Services February 18, 2003 Caleb Billingsley Orasi Software.

Similar presentations


Presentation on theme: "Atlanta Mercury Users Group How to Performance Test.NET and.NET Web Services February 18, 2003 Caleb Billingsley Orasi Software."— Presentation transcript:

1 Atlanta Mercury Users Group How to Performance Test.NET and.NET Web Services February 18, 2003 Caleb Billingsley Orasi Software

2 Agenda  Introduction to.NET  How will.NET Impact Testing  Mercury.NET Support  Load Testing Windows Forms  Introduction to Web Services  Load Testing Web Services with.NET

3 .NET and Mercury Products

4 What is.NET? The.NET Framework is a new computing platform that simplifies application development in the highly distributed environment of the Internet.  Objectives of.NET: *To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely. *To provide a code-execution environment that minimizes software deployment and versioning conflicts. *To provide a code-execution environment that guarantees safe execution of code, including code created by an unknown or semi-trusted third party. *To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments. *To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web- based applications. *To build all communication on industry standards to ensure that code based on the.NET Framework can integrate with any other code.

5 .NET Framework

6 Uses of.NET Applications  Windows Forms Windows Forms is the new platform for Microsoft Windows application development, based on the.NET Framework. This framework provides a clear, object-oriented, extensible set of classes that enables you to develop rich Windows applications.  Web Services Web Services provide an easy to use ‘API’ that is web based to query and retrieve information such as stock quotes, airline schedules, weather, etc.  ASP.NET ASP.NET is the next generation of ASP applications for Microsoft. The single biggest advantage is compiled vs. interpreted. Resulting in greater scalability.  Web Forms Web Forms are an ASP.NET technology that you use to create programmable Web pages.  Traditional Application (CS, Web, etc)

7 What Does.NET mean to Testing .NET creates some new challenges. Systems are more distributed than ever and often you can’t load test every piece. You might have to build Web Service Stubs or have a developer do this to load test an application.  New correlation techniques are required for Web / browser based.NET applications  Given how distributed.NET can become, the ability to Load Test individual pieces will be essential and that will require the.NET LR Add-in  Some.NET Web Applications will require very little change in techniques to test.

8 How Does LoadRunner Support.NET .NET Web apps can be tested in the Normal Web Manner with a few extra correlations.  To Test.NET applications that aren’t based on a web page you will need LoadRunner.NET support. To install the add-in download from  http://www-heva.mercuryinteractive.com/solutions/technologies/net/ http://www-heva.mercuryinteractive.com/solutions/technologies/net/

9 Mercury’s.NET Web Page

10 Supported.NET Environments  Includes: *Data and XML Classes (ADO.NET, SQL, Xpath, XML, etc.) *Framework Base Classes (IO, strong, net security, threading, text, reflection, collections, etc.) *Common Language Runtime (debug, exception, type checking, JIT compilers) *Core Windows Platform (Windows XP,.Net Server, Windows DataCenter)  Mercury Interactive's solutions provide support for the following configurations for Microsoft.NET Platform:

11 Load Testing.NET Windows Forms

12 Steps for Load Testing.NET Applications that don’t have Web Interface  Install MS Visual Studio.NET before LoadRunner Add-in  Install LR.NET Add-in  Create a New Project of type  Add code to call.NET Applications either with GUI or without  Add LR transaction and other LR statements  Compile and Test  Create a Vuser with compiled binary and run in Controller

13 Components of Visual Studio.NET Vuser Project Vuser Menu Init, Action, End Sections Solution Explorer Debug Output

14 Accessing LoadRunner.NET

15 Accessing the LoadRunner API

16 Tips: LoadRunner API in.NET  You can type lr. And the auto-completion will show you all the valid syntax.  Remember you can record users in VBA using the Vugen multi-protocol option. The resulting scripts could then be moved to a.NET user with minimal effort.

17 Exercise 1: Building your First.NET User  Install LR.NET Add-in from http://www- heva.mercuryinteractive.com/solutions/tech nologies/nethttp://www- heva.mercuryinteractive.com/solutions/tech nologies/net  Start MS Visual Studio.NET and create a new LoadRunner Virtual User Project  Add a log message to the script that prints out “Hello World, I’m load testing.NET.”.  Execute the script and view the output log file for correctness.

18 Testing.NET Web Services

19 What is.NET Web Services?  What is a Web Service?  Simply put, a Web service is an application that exposes a programmatic interface using standard, Internet-friendly protocols.  Web services are designed to be used by other programs or applications rather than by humans. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services. Source: http://www.vbws.com/faq/default.aspx

20 Diagram of Client Invoking Web Service Source: http://www.vbws.com/tutors/wsdl/wsdl.aspx

21 Sample.NET Web Service  To view the WSDL (Web Service Description Language) for a Web Service type in the URI with a ?WSDL at the end. Example: http://localhost/Weather/Service1.asmx?WSDLhttp://localhost/Weather/Service1.asmx?WSDL  To try a sample Web Service, open a web browser and type: http://samples.gotdotnet.com/quickstart/aspplus/samples/se rvices/MathService/VB/MathService.asmx http://samples.gotdotnet.com/quickstart/aspplus/samples/se rvices/MathService/VB/MathService.asmx  OR http://airforceone/Duwamish7vb/service/catalogservice.asmx

22 Sample WSDL

23 Sample Web Service Test Page

24 Testing.NET Web Services  You can record Web Services if you application calls them by using the SOAP or Web Recording Protocol.  You can record a Web Service call by using your Web Browser  You can programmatically Load Test Using a LoadRunner.NET Project by using the LoadRunner.NET Add-in

25 Testing a Web Service with LR.NET Add-in Steps: 1. Install Visual Studio.NET 2. Install LR &.NET Add-in from www.merc-int.comwww.merc-int.com 3. Create a new project that is type LoadRunner VB.NET 4. Add a Web Reference to.NET Project 5. Add Code in Visual Studio.NET to call Web Reference 6. Run User & Check Output in window (Extra: Look in source code directory. Which file will have the output from the Vuser?) 7. Compile, put together in a Vuser script and run in controller.

26 Step 4: Adding a Reference  Select ‘Project -> Add Web Reference’ inside Visual Studio  Paste into the Address Field: http://samples.gotdotnet.com/quickstart/aspplus/samples/services/Mat hService/VB/MathService.asmx http://samples.gotdotnet.com/quickstart/aspplus/samples/services/Mat hService/VB/MathService.asmx  Press Enter  Click ‘Add Reference’

27 Step 4 Explanation: Using LR.NET Add-in to Test Web Services

28 Step 5: Add Code to Script  In our sample we were working with a math service.  Open the Solution Explorer (toolbar)  Add the following code inside the vuser_init section (the sample should occupy one line) Dim ws As New LoadRunnerNETClass_Sample1.com.gotdotnet.samples.MathService() VS Project Name URI (Locator for Service) Method / Service

29 Step 6: Running your Vuser  Select ‘Build -> Build Solution’ from the menu  Run the Vuser using the ‘Vuser-> Run Vuser’ menu  After the user runs, you can check your output in the Visual Studio.NET output window or the LoadRunner Vugen log file.

30 TIP: Web Based.NET Recording Modes in Order of Preference  HTML Mode w User Actions (first choice) w Explicit URLs (second choice) (Non HTML – Do no record unless have correlation data)  URL Mode (create concurrent preference)  Web_custom_request  MultiProtocol Recorder  Programatic Solution with.NET Adding  Winsock (Very difficult maybe impossible.)

31 Resources  http://www.w3.org/ http://www.w3.org/  www.merc-int.com www.merc-int.com  Msdn.microsoft.com  Learn Web Services http://www.vbws.com/http://www.vbws.com/  Great Tutorial http://www.gotdotnet.com/http://www.gotdotnet.com/  LoadRunner.NET Readme

32 Wrap-up!  Questions?  My Contact Information: caleb.billingsley@orasi.com caleb.billingsley@orasi.com


Download ppt "Atlanta Mercury Users Group How to Performance Test.NET and.NET Web Services February 18, 2003 Caleb Billingsley Orasi Software."

Similar presentations


Ads by Google