Friday, August 5, 2016

IP Spoofing in Loadrunner

What is IP Address: ?

Application servers and network devices use IP addresses to identify clients. The application server often caches information about clients coming from the same machine. Network routers try to cache source and destination information to optimize throughput. If many users have the same IP address, both the server and the routers try to optimize. Since Vusers on the same host machine have the same IP address, server and router optimizations do not reflect real- life situations.

Loadrunner's Multiple IP Addresses: 

Load Runner’s multiple IP address feature enables Vusers running on a single machine to be identified by many IP addresses. The server and router recognize the Vusers as coming from different machines and as a result, the testing environment is more realistic.

Adding IP Addresses to HOST :

LoadRunner includes an IP Wizard program that you run on each host machine to create multiple IP addresses. You add new IP addresses to a machine once and use the addresses for all scenarios.

The following procedure summarizes how to add new IP addresses to a host:

  • Run the IP Wizard on the host machine to add a specified number of IP addresses. 
  • Re- start the host machine. 
  • Update the server’s routing table with the new addresses, if necessary. 
  • Enable this feature from the Controller. 

Using the IP Wizard
The IP Wizard resides on each host machine. You run this process one time to create and save new IP addresses. The new addresses can be a range of addresses defined by the Internet Assignment Numbers Authority. They are for internal use only, and cannot connect to the internet. This range of addresses are
the default used by the IP Wizard.
To add new IP addresses to a host machine:

  1. Invoke the IP Wizard from the Load Runner program group.
  2. If you have an existing file with IP address settings, select Load settings from file and choose the file.
  3. If you are defining new settings, select New Settings .
  4. Click Next to proceed to the next step. If you have more than one network card,choose the card to use for IP addresses and click Next .
The optional Web server IP address step enables the IP Wizard to check the server’s routing table to see if it requires updating after the new IP addresses are added to the host

 
  • To check the server’s routing table directly after adding the addresses, enter the server IP address.
  • Click Next to see a list of the machine’s IP address(es). Click Add to define the range of addresses.


IP addresses include two components, a netid and hostid. The submask determines where the netid portion of the address stops and where the hostid begins. 


  • Select a class that represents the correct submask for the machine’s IP addresses.
  • Specify the number of addresses to create. Select Verify that new IP addresses are not already in use to instruct the IP Wizard to check the new addresses. If some addresses are in use, the IP Wizard will only add the addresses not in use.
  • Click OK to proceed.
After the IP Wizard creates the new addresses, the summary dialog box lists all of the IP addresses.



  • Click Finish to exit the IP Wizard. The IP Wizard Summary dialog box is dispalyed.
  • Note the address of the .bat file and check Reboot now to update routing tables to initialize the NT device drivers with the new addresses.
  • Click OK .
  • Edit the .bat file by inserting your IP address instead of CLIENT. IP.
  • Update the Web Server routing table

 

Tuesday, August 2, 2016

Siebel Scripting Challenges in Loadrunner

Load test scripts are difficult to create due to highly dynamic nature of Siebel applications. Load test scripts typically automate transactions at the protocol level for maximum scalability, however Siebel requests are very dynamic and if the recording tool captures hard-coded data values then they will not play back.
Manual parameterization is often required which is tedious and time-consuming, plus it requires extensive Siebel expertise. Once you get your tests running, the highly distributed Siebel architecture makes performance bottlenecks difficult to identify.
Correlation in Siebel:
Correlating standard HTML pages is not a difficult task, all you usually need to do is look for a value inside an HTML tag and match it to a regular expression, which tends to be an easy task, in the case of Siebel however, it does not send all of its information in an HTML format, instead it does so in a very difficult format to read by humans and to correlate using regular expressions, see the text below for an example.
@0`1`3`3``0`UC`1`Status`OK`SWEC`16`1`0`ResultSet`0`Return Alerts`<pre><br><font face="verdana" color="red" size=3>   Executive - Transfer call to Executive Specialist Team if applicable<br>or<br>Handle with Care <br> </font></pre><br><font face="verdana" color="black" size=2>   &nbsp&nbsp&nbsp1. Pension Eligible`0`12` Notifications `0`2`0``0`OP`bn` bc`S_BC4`7`0``0`br`0`ArgsArray`34*qrs WMT Contact Toggle FormApplet 1*1`size`1`cr`0`OP`g`bc`S_BC4`type `SWEIRowSelection`2`0``0`OP`en`bc`S_BC4`2`0``0`OP`bn`bc`S_BC2`7`0``0`br`0`ArgsArray`38*qrs WMT Contact Summary SR List pplet1*11*01*01*01*0`size`5`cr`4`OP`g`bc`S_BC2`type` SWEIRowSelection`2`0``0`OP`en`bc`S_BC2`2`0``0`OP`bn`bc `S_BC3`7`0``0`br`0`ArgsArray`29*FIN

While developing Siebel performance test scripts using load runner we need to do very few script enhancement.
SWEACn ---> Siebel Web Extension Applet count.
This value usually appears in web_url() and you can correlate @ first occurrence in the start and replace all other occurrences with the correlated variable name.

SWERowids ---> Siebel Web Extension Rowids
Kindly note this value is not same as the one mentioned earlier. This value would correspond with the SWEMethod implemented/used in the step. So the Ordinal No depends on the SWEMethod in the Server Response.

SWERowId = rowid to perform the action
SWERowIds = record's parent rowId

SWETS ---> Siebel Web Extension Time Stamp
This can be correlated by using web_reg_save_timestamp() just above the request and pass it.
SWEC ---> Siebel Web Extension Click count
This can be correlated by increment method followed in LR or using the web_reg_save_param ()

I know Siebel Correlation library will reduce the scripting efforts to some extent, but I would also like to focus on row_ids and SWEACn and SWC correlations.

Read "Correlating Siebel-Web Scripts" in VuGen guide which will help you to import WebSiebel77Correlation.cor file. This makes your correlation part easier

Dynamic Record Changing:
Problem: whenever any new record is added or existing record is modified the position of records will change. While recording we need to select a record (SR) from the list of records, but the selected record position will change whenever any new record is added/modified, this leads to a problem while replaying the script as the record position has changed.

 Default: while trying to correlate the record items (each record has atleast 20 fields) the boundaries of fields are changing dynamically, and there is no specific pattern for boundaries.

Example:  1-4611378121*21HealthandWelfare10*Phone
                  Call1*05*Sivakota2*HW7*Inquiry0*4*TEST5*COBRA19*0

If we want to capture ---> the boundaries of SIVAKOTA are changing dynamically without any specific pattern.

Solution: To the above problem we are explicitly capturing the entire record and storing into the parameter array.
//*1-4819497423*HRO3*ODM1*15*Sivakota7*Payroll11*Transaction0*5*ALBEE12*

web_reg_save_param("Record","LB/DIG=*#-#####","RB/DIG=*#-#####","ORD=1"LAST);

The entire record is captured into array “Record”, now we are explicitly matching the field values, by writing some code logic it will take the first value, and using StringCheck function whenever the value is not matched StringCheck function will return a null pointer. Once the value is matched, the matched value will be send as field input to server.

Pros:  The logic will handle dynamic record changes And Script maintenance is less.
Cons: All the field values should be statically kept into pointer array.

          Ex: char* LastnameArray [] = {"ALBEE","ADKINS","TEST","ADELMUND","Sivakota1"};
          Memory utilization is high.

Siebel Load and Performance Testing.

Siebel Load and Performance Testing

Unlike functional testing, performance testing works on a protocol level, in the case of Siebel that's done by simulating the HTTP requests that the Siebel UI generates. We can use any web testing tool for testing the Siebel Application.
The Siebel Test Automation framework allows you to implement secure access to test automation, in which the SWE requires a password to generate test automation information. This is useful for real-time testing in a production environment, and can be integrated with system monitoring tools.
Load testing can help you ensure that your Siebel application will perform and scale under real user workloads once it’s deployed to production. This can help you ensure that it will be able to withstand the expected number of concurrent users while maintaining acceptable performance and response times.It can also help you identify and address critical bottlenecks prior to deployment. Monitoring the components of your Siebel environment during load testing is extremely important.

Stress testing can be performed to test beyond the limits of normal operation and helps you assess the capacity and scalability of your application infrastructure automated load testing for Siebel has its own challenges.