** Note load Runner is launched running as an administrator *** otherwise a Controller run will report no Connot Initialize Driver DLL, no other than……..

Description:

Load Runner tests Virtual User Generators

And call the Load Runner Controller to test

 

Steps:

1. Install Load Runner

Download address download.csdn.net/detail/ania…

 

2. Start HP Virtual User Generator

Create a Web – HTTP/HTML

 

3. Go to the script editing page

 

 

4. Click Edit, select the browser, and record

 

 

5. Generate the script

 

If you need to check the return value of the HTTP interface test, F4(replay-> run-time Settings)

 

 

The following is a recording script for the web request, running on the application CPA

 

[cpp]  view plain  copy

 

  1. Action()  
  2. {  
  3. web_add_cookie(“edu.yale.its.tp.cas.client.filter.receipt=53/50/49/53/53/51/53/124/69/48/48/50/51/48/49/56/54/124/; DOMAIN = 127.0.0.1 “);
  4.   
  5. web_add_cookie(“remoteuser=anialy; DOMAIN = 127.0.0.1 “);
  6.   
  7. web_add_cookie(“remoteuserid=123456; DOMAIN = 127.0.0.1 “);
  8.       
  9.       
  10.     web_url(“to_topic_page”,  
  11. “URL = http://127.0.0.1:8080/cpa/topic/student/to_topic_page? trainId=297ebd3045e0376f0145e0378a350000&topicCategory=0”,
  12.             “Resource=0”,  
  13.             “RecContentType=text/html”,  
  14. “Referer = http://127.0.0.1:8080/cpa/operation/common/home”,
  15.             “Snapshot=t6.inf”,  
  16.             “Mode=HTML”,  
  17.             EXTRARES,  
  18. “Url=/cpa/common/static/lib/avatar_hover/image/topic/tck-1.gif”, “Referer = http://127.0.0.1:8080/cpa/topic/student/to_topic_page? trainId=297ebd3045e0376f0145e0378a350000&topicCategory=0”, ENDITEM,
  19.             LAST);  
  20.   
  21.     web_url(“getTopicInfo”,  
  22. “URL = http://127.0.0.1:8080/cpa/topic/student/getTopicInfo? topicRelation=0&topicCategory=0&trainId=297ebd3045e0376f0145e0378a350000&userRoleCode=05&searchText=&_=1404108934867”,
  23.             “Resource=0”,  
  24.             “RecContentType=text/html”,  
  25. “Referer = http://127.0.0.1:8080/cpa/topic/student/to_topic_page? trainId=297ebd3045e0376f0145e0378a350000&topicCategory=0”,
  26.             “Snapshot=t7.inf”,  
  27.             “Mode=HTML”,  
  28.             EXTRARES,  
  29. “Url = / CPA/static/student/face/emoji_86 PNG”, “Referer = http://127.0.0.1:8080/cpa/topic/student/to_topic_page? trainId=297ebd3045e0376f0145e0378a350000&topicCategory=0”, ENDITEM,
  30.             LAST);  
  31.   
  32.     return 0;  
  33. }  

 

 

 

 

 

If it is an interface call, record the script

 

[plain]  view plain  copy

 

  1. Action()  
  2. {  
  3.     web_custom_request(“web_custom_request”,  
  4. “URL = nimeide. Cn/searchPageS…
  5.     “Method=POST”,  
  6.     “Resource=0”,  
  7.     “RecContentType=application/json”,  
  8.     “Referer=”,  
  9.     “Mode=HTTP”,  
  10.     “EncType=application/json”,  
  11.     “Body=[‘param1′,’param2’,{\”total_size\”:0,\”page_size\”:12,\”current_page\”:1}]”,  
  12.     LAST);  
  13.     return 0;  
  14. }  

 

 

 

 

 

6. Create a test scenario in Controller

tool -> create controller scenerio

So you go to the Controller tool view

 

The script has been entered, and in the lower left corner of the Design panel, is the configuration for the increment and decrement of the number of vusers,

After the configuration is complete, you can record

When you’re done, open the results of the Run panel,

 

Failed Transactions = 0