LoadRunner calls the Oracle Stored Procedure

Source: Internet
Author: User

In order to test the stored procedure, I went around and did it. Here I will talk about what I thought when I received the task and started.

Method 1:

At first, I thought that I could use C # To directly call the stored procedure, and then use Loadrunner to call the dll of C # For testing. Later I found that I could not find LoadRunner how to directly call the dll written by C; but the dll stored procedures have been written, and it is impossible to re-use other methods to do it. Because the task time is relatively tight, I wrote a copy using C. exe calls the dll and runs it after completion. The impression is that there is no pressure on the database or the local database, but the number of load-bearing machines is already 100%, in addition, we need to install an oracle client on each server Load balancer. Otherwise, there will be 30 Server Load balancer servers and each server will be installed with a series!

Method 2:

Finally, I thought of a way to write a WebService To Call Dll, Loadrunner to call WebService for testing. (Is this stupid? Is there any other better method? Please leave a message to me !)

  OracleConnection conn =  OracleCommand cmd =                                                         PaysysInit( DataSource,  DataUserId,  mConn = .Format(= = =                                        CallInterface( nResult =  queryString ==== Convert.ToInt32(cmd.Parameters[ += Convert.ToInt32(cmd.Parameters[   s_account =   s_password =                                       LoginInit( account, ==                               cmd.Parameters.Add(].Direction =].Direction =].Value =].Direction =].Value =            ].Direction =].Direction =].Direction =                             CallInterface(   s_account =   LogoutInit(=             cmd.Parameters.Add(].Direction =].Direction =].Value =  CallInterface(

Problems:

1. When writing the login interface, because only the Input parameter is initialized, the Output parameter is not required, so the parameter is always missing during the call. Both the input and output parameters are required!

Setp2: WebServices calls dll

1. Create a project:

  PaysysLogin( dbName,  dbAccount,  dbPassword,  account,  nResult = = =  PaysysLogout( dbName,  dbAccount,  dbPassword,  nResult = = =

Then you can debug it!

Setp3: deploy to IIS (you can view my previous blog, which is the same)

Http://www.cnblogs.com/Martin_Q/archive/2010/12/06/1897614.html

Debugging result

Problems:

This is a very bad problem. When IIS is used to call conn. Open (), an error occurs:System. data. oracleclient requires oracle client software 8.1.7 or later.

It is worth noting that at first I thought that iis had no permission to access the oracle directory. Why do I think so? For the sake of this question, I wrote a special .exe to execute the call. The exe application is successfully executed, and iis has an error!

The original problem was that the oracle client I installed is a simple version, and many dll files do not exist. Please refer to the following link for more information: 10201_client_win32.zip client versions. Of course, there are other permission issues! I won't talk about it here.

 

Setp4: Use LoadRunner to call WebServices

1. Loadrunner creates a WebService

2. Click ManageServices to add your WebService address.

3. Add WebService call interface

The constructed address is http: // 10.20.87.62: 81/Service. asmx. Why do I need to manually add the following :? What about WSDL? (Let me know !)

4. added successfully

5. Add the corresponding Stored Procedure

                ,lr_eval_string(),lr_eval_string((atoi(lr_eval_string()) == ,lr_eval_string(),lr_eval_string( 

Output result:

All: <? Xml version = "1.0" encoding = "UTF-8"?> <Soap: Envelope xmlns: soap = "http://schemas.xmlsoap.org/soap/envelope/" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsd = "http://www.w3.org/2001/XMLSchema"> <soap: body> <PaysysLoginResponse xmlns = "http://tempuri.org/"> <PaysysLoginResult> 1 </PaysysLoginResult> </PaysysLoginResponse> </soap: Body> </soap: Envelope>

LoginResult: 1

What should we do next after this step!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.