A friend who has been familiar with performance testing must be familiar with LoadRunner.
Good. LoadRunner is very powerful. But can you use the powerful functions of LoadRunner?
This article describes how to install LoadRunner in batches and initialize the environment (Windows/Linux) in practice ):
------------------ Windows ------------------
1. Install. Net framwork 3.5
2. Install LoadRunner (the installation package path and program installation path do not contain Chinese characters)
3. Install JDK. (download the latest official installation package. The installation directories of all machines are recommended to be the same)
4. Install the C ++ Runtime Library
Microsoft Visual C ++ 2005 redistributable + SP1
Microsoft Visual C ++ 2008 redistributable + SP1
5. Store the system temporary files on the disk with the largest space. For example, execute batch processing as follows:
WMIC environment where "name = 'temp 'or name = 'tmp'" set variablevalue = 'd: \ Temp'
6. modify the system registry to increase the maximum throughput of the system. Batch Processing is as follows:
Echo Yes | Reg add HKLM \ System \ CurrentControlSet \ Services \ Tcpip \ Parameters/V maxuserport/T REG_DWORD/d 65534/F
Echo Yes | Reg add HKLM \ System \ CurrentControlSet \ Services \ Tcpip \ Parameters/V tcptimedwaitdelay/T REG_DWORD/D 5/F
7. Ensure that the RemoteRegistry Service is automatically started and used for resource monitoring:
SC config RemoteRegistry start = auto
8. Add the LoadRunner Agent to the service and start it automatically:
"% LoadRunner % \ launch_service \ bin \ magentservice.exe"-install
9. Time Synchronization for each test machine can be implemented using Windows Time Synchronization or third-party software. I use the Linux NTP service.
10. If a firewall is installed, release LoadRunner.
11. If you want to perform Oracle testing, you also need to install the Oracle client.
12. Enable Automatic Logon and run 'control userpasswords2' to deselect the check box "to use the local machine, you must enter the user name and password" (with to Prevent Automatic restart after the system is updated)
13. Disable Automatic Restart of system updates:
Echo Yes | Reg add HKLM \ SOFTWARE \ Policies \ Microsoft \ Windows \ windowsupdate \ Au/V noautorebootwithloggedonusers/T REG_DWORD/D 1/F
Test environment:
Microsoft Windows Server 2003 R2 Enterprise Edition Service Pack 2 _ Cn _ i386 (v5.2.3790)
HP LoadRunner software 9.50.0.0 build 3210
------------------ Linux ------------------
1. Download loadrunner9.5 linuxlinuxinstaller t7177-15009.iso.pdf and install the package hp_man_lrig9.50_01_pdf.pdf] on the official website of HP.
The installation package includes hp1_ibm1_linux1_solaris (((( lr9.0 tlrtlrtlr).
2. Handling of installation packages:
1. Zip unzip: unzip tlnux900wc_00.zip
2. Mount the ISO: mkdir/mnt/LoadRunner; mount-T iso9660-o loop T7177-15009.iso/mnt/LoadRunner
3. Start InstallationTake lr9.5 as an example:
/Mnt/LoadRunner/Linux/Installer. Sh
Follow the prompts and click Next to finish.
4.Add User and Environment Variables:
Useradd-G 0-S/bin/CSH higkoo
CAT/opt/HP/hp_loadgenerator/env. CSH>/etc/. Login
CAT/opt/HP/hp_loadgenerator/env. CSH> ~ Higkoo/. cshrc
Touch ~ Root/. rhosts ~ Higkoo/. rhosts
5.Check the running environment(Run on the local machine or using VNC ):
Su-higkoo
CD/opt/HP/hp_loadgenerator/bin/
./Verify_generator
6.Start the service(Using the newly added user higkoo ):
CD/opt/HP/hp_loadgenerator/bin/
./M_daemon_setup start
7. Check whether startup is enabled:
PS aux | grep m_agent_daemon
Netstat-naop | grep 54345
8.Notes:
Enable port 54345 or disable the firewall (Service iptables stop)
After correct settings, use verify_generator to check the result:
./Verify_generator ========================================================== ============== HP Vuser environment verification utility ========================================================== ============== Product: HP LoadRunner 9.50 Version: 09.50.0000 Build: 3378 Higkoolincn100ce5: Verify_generator... OK Verify_generator... OK Verify_generator... OK Don't forget to make sure that the name of the controller Machine Is also in. rhosts Verify_generator... OK Verify_generator... OK Verify_generator... OK Verify_generator... OK Verify_generator... OK Verify_generator... OK Verify_generator... OK _______________________________________________ Summary: ________ Vuser host higkoolincn100ce5: OK |
Connect using controller, and select "under" UNIX environment tab"Don't use RSHTo connect to the Linux Server Load balancer.
If you use the RSH connection, the load-bearing machine must install RSH and configure it correctly, as described in "Don't forget to make sure that the name of the controller machine" during the detection process ".
The simplest solution is to run the service directly without using the RSH connection.
In addition, you can only install the LoadRunner load generator in Linux. In addition, the supported protocols are much less than those in windows. For example, the Winsock protocol is only applicable to Windows by name:
"Error (-81024): lr_vug: The 'winsock 'type is not supported on 'linux' platforms ."
In addition, I tried the Java protocol. The error is as follows:
Error (-81024): lr_vug: the 'general-Java' type is not supported on 'linux 'platforms.
------------------ End, enjoy yourself! ------------------