Replay Access Log

Replay Access Log is a special kind of scenario that enables the users to replay/re-execute the scenario based on the logs captured in the Access Log File. Access Log Files contain the logs of all requested URLs including requests, responses, Method types (Get/Post), HTTP Headers, Client IP, Remote IP-address, and JSESSIONID. By replaying the access logs generated during live traffic, the Replay Access Log scenario enables you to recreate the production scenario and entire layer of errors (which are not reproducible in Test environment).

It is usually difficult to create all possible flows during testing and the real environment may differ from Test environment. Therefore, Replay Access Log scenarios enable you to create real-life traffic by using previously captured logs of any server for different pages of URL. Replay Access Log scenarios always use production logs (in terms of Access Log file) and this scenario replays the requests with the original data in order of their arrival time in logs.

Advantages of Replay Access Log

Replay Access Log scenarios provide the flexibility to select one or more log files with filters, date/time selection, all or pieces of URL selections. You can also compare the performance test results of actual run on production environment and Replay run on Test environment on the dashboard based on the Test Run for better understanding of capacity utilization.

The main advantages of using Replay Access Log scenarios are as follows:

  • The access log captures the network data of a production run, and replays it for simulating the real time network scenario.
  • The purpose of this is to provide an easy way to simulate production traffic.
  • As the traffic pattern changes, the access log provides a record of individual changes and general shifts in usage.
  • Access logs contain useful data, which can provide some insight.
  • Access logs can be targeted to determine different types of users.
  • Access logs can capture detailed session information.
  • User can also compare the performance test results of actual run on production environment and Replay run on Test environment on the dashboard based upon the Test Run for better understanding of capacity utilization.
  • Replay Access Log scenario provides the flexibility to users to select one or more log files with filters, date/time selection, all or pieces of URL selections.
  • Replay Access Log scenario helps to reproduce production problem in test environment.

What is an Access Log?

An access log is a list of all the requests for individual files that end users have requested from a Web site. These files include the HTML files and their embedded graphic images and any other associated files that get transmitted. The access log (sometimes referred to as the “raw data”) can be analyzed and summarized by another program.

An access log provides the following information:

  • The number of visitors (unique first-time requests) to a home page.
  • The origin of the visitors in terms of their associated server’s domain name (for example, visitors from .edu, .com, and .gov sites and from the online services).
  • How many requests for each page at the site, which can be presented with the pages with most requests listed first.
  • Usage patterns in terms of time of day, day of week, and seasonally.

Running a Replay Access Log

A Replay Access Log scenario enables you to analyze customer logs and simulate the real-time network scenario. You can also customize various settings to test different scenarios.

To recreate a scenario using the Replay Access Log:

  1. Create a Replay Access Log scenario.
  2. Customize the Replay Access Logs settings.
  3. Process the Access Log File.
  4. Analyze the Processed Data.
  5. Run a Script and Compare Results.

The following sections provide information about these steps.

Customizing the Replay Access Log Settings

Creating a Replay Access Log Scenario

Perform the following steps for creating a scenario:

  1. Select View > Scenarios > Scenarios. The NetStorm Scenario window is displayed.
  2. Click the Create button. The Create Scenario dialog box is displayed.

Note: You can also create a scenario by using the Wizard. For more information about creating a scenario, see NetStorm Scenario User Manual.

3. Specify your project details, such as project, sub-project, scenario name, and profile to be used.

4. Click Next. The selected scenario is created. The Scenario Settings window is displayed where user can specify the required settings for the scenario.

5. Select the Replay Access Logs option from the Scenario Type drop-down list in the Schedule Settings window:

6. Select the required log type and provide details based on the selected log.

Selecting a Log Type

You can create the following types of logs:

  • Web Service: Selecting the Web Service log displays the following replay settings:

  • HTTP Log: Selecting the HTTP Log type displays the following replay settings:

  • SQL Frequency List:

  • SQL Access Log and SQL Access Log Extended: To effectively manage a Web server, it is necessary to get feedback about the activity and performance of the server as well as any problems that may be occurring. The Apache HTTP Server provides very comprehensive and flexible logging capabilities. The server access log records all requests processed by the server. The location and content of the access log are controlled by the Custom Log The Log Format directive can be used to simplify the selection of the contents of the logs.

Specifying Replay Settings

Based on the selected log type, you can customize the replay access log settings described in this section.

Users Play Back Factor

  • This specifies the percentage of users to be replayed. If it is 50%, then 50% of the users are replayed. 100% means all users are replayed. This value cannot exceed 100% because user cannot replay more than the allotted users.
  • For example, if the access log file has requests from 10 users, user can set Users Play Back Factor as 10 or less than 10. But user cannot exceed this value more than 10.

Users Arrival Time Factor

  • This keyword offers the flexibility to the user to change the arrival time according to their requirement. This specifies the time at which next user arrives.
  • The Value should be given in percentage. It can be Less than , equal to , or Greater than 100%
  • g. Suppose first user hit at 10 am so the time stamp is updated as 0, next user hit at 10:10am, its time stamp is updated as 10.

By giving the Users arrival time factor, user can change the arrival time as

  • Given as 25% , so next user hits in 2min30sec from first user
  • Given as 100%, so next user hits at same time without any changes.
  • Given as 300%, so the next user hits in 10*3 i.e. 30min from first user.

Inter Page Time Factor

  • This keyword offers the flexibility to a user to change the arrival time of different pages to their requirement. This specifies the time at which next page arrives.
  • The Value should be given in percentage. It can be Less than , equal to , or Greater than 100%
  • g. Suppose first page hit at 10am so the time stamp is updated as 0, next page hit at 10:10am, its time stamp is updated as 10.

By giving the Page arrival time factor, user can change the arrival time as

  • Given as 25%, so next page hits in 2min30sec from previous page.
  • Given as 100%, so next page hits at same time without any changes.
  • Given as 300%, so the next page hits in 10*3 i.e. 30min from previous page.

Replay Profile

Select the Replay Profile that provides information about the scenario you have created.

Access Log Type

The access log file is of the following types:

  • APACHE Type
  • IIS (Internet Information Server) Type
  • Weblogic
  • Custom

Create User Session Using Cookie and Client IP

User session can be created using two ways as below:

  • Cookie: When User selects Cookie option for creating user session, user needs to provide the following values.
    • Primary Cookie Name (Its default value is JSESSIONID).
    • Check box to Keep/Ignore URLs without Primary Cookie.
    • Check box to use/not use Secondary Cookie and its value in the text field.
  • Client IP: When user selects Client IP option for creating user session, user needs to provide the following values.
    • Check box to Keep/Ignore URLs without Client IP.
    • Check box to use/not use Secondary Cookie and its value in the text field.

Date/Time in Access Log

You can set the following values for the Date and time in Access Log option:

  • Request
  • Response

Randomize Replay Time

User can set any time in milliseconds by putting a check mark on Randomize Replay Time. This section is to provide a option to user to set a wait time given in milliseconds for multiple requests coming at the same time and due to those requests, graph data showing peak entries at one time due to multiple requests at the same time.

Redirection Handling Mode

Redirection – Handling Mode with list box with 2 options should be available as given below.

  1. Auto-Mode
    • After processing data, All URL of depth 5(REDIRECTION LIMIT GIVEN)should move to processed URLs(due to Redirection)
    • After script is created and when test is fire then URLs should be redirected to other URLs.
    • The default value for redirection is 20.
  1. As Per Log
    • In this case, URLs’ are not be redirected to another URL and URLs are taken as per the Log file.

Ignore Query String

This option includes two choices as below-

  1. Ignore Query String – Yes

In process Data table it should show the URLs records without Query String Parameter.

  1. Ignore Query String – No

In process Data table it should show the URLs records with Query String Parameter after Question Mark.

Note: Ignore query string is “Yes” as default value.

Inline Object Mode:

  • Skip Inline: It should show only those URLs which are not Inline.
  • Auto Mode: In Group Based Setting Auto Fetch Embedded for All pages with option “Fetch every time” would be enabled.
  • As Per Log: In Process Data Table All Inline URLs should be treated and come as per the log file.

              Note: Default value of this option is “As per Log”.

Number of NVM(s)

  • Number of NVM to create replay data file. (by default num NVM is twice of number of processor in machine).
  • NetStorm should distribute users among all NVMs.
  • Users are distributed in such a manner that all NVM get users based on the start time of
  • For example, if there are 100 user and 10 NVM. Then each NVM gets 10 users.
  • Add option to start from some time e.g. 11 hours (HH:MM:SS). Make sure all NVM reference time to min of one NVM.

Start/End Date/Time:

  • This option enables the user to select data of a particular date and time interval to fetch and use as replay.
  • The data within this interval is requested in the scenario.
  • Start date and End date to filter request for a given timeline user can specify start date/time and end date/time in format- [mm/dd/yyyy hh:mm:ss]

Other Fields

Ensure that the field numbers in the right panel map with the field appearing in the access log file:

Processing the Access Log File

After specifying the Replay Access Log settings, you can add the required access log file from your datasource and process the required data.

Adding and Processing an Access Log File

To add and process an access file:

1.Click the Browse button in the Schedule Settings window, as shown below:

2. Select the required access log from the File Manager window. The file is also displayed in the Selected Files box, as shown highlighted below:

3. Click Upload in the File Manager window. The selected access log file is included in the Schedule Settings window, as shown highlighted below:

4. Click Process Data. The processed data from the selected access log is displayed, as shown below:

Analyzing the Processed Data

After processing data from the access log, you can view the results and analyze the details of all the URLs accessed by the user.

Customizing the Data Display

Using th­­e following options in the Show section, you can display the selected URLs:

  • Main: This check box enables all URLs that are patterned as Main URL with transaction string in the URL Pattern GUI to be displayed in the mid of this window. 
  • Main without TX: This check box enables all URLs that are patterned as Main URL without transaction string in the URL Pattern GUI    to be displayed in the mid of this window.
  • Inline: This check box enables all URLs that are patterned as Inline in the URL Pattern GUI to be displayed in the mid of this window. 
  • Filtered URL: This check box enables all the URLs that are configured in URL Filter window. 
  • Non Processed URLs: This check box enables all non processed URLs..
  • Show Only Unique Pattern: This check box enables the unique pattern for URLs. 
  • Replay All URL(s) using same host: This check box enables the same host name for all URLs to be used in the script for HTTP connection.
  • Use same host for SSL: This check box enables the same host name for all URLs to be used in the script for secure port.

In addition to the Show options, you can also set values for the tabular data fields:

FieldDescription
FilterSpecifies whether a filter is applied or not. Filter can be Yes or No:

  • Yes: If user wants to apply the pattern options to this kind of URL(s).
  • No: If user does not want to apply the pattern options to this kind of URL(s).
TypeThis is the type of URL. Type can be main or inline.
MethodThis includes all the HTTP methods that user needs to select as per our requirement.
Sample URLUser needs to mention the kind of URL pattern that he/she needs to pattern.
URL PatternUser needs to mention the kind of URL pattern which they need to pattern.
Transaction NameThis transaction name is auto filled in URL list file for all the matching URLs.
Host NameHost is the host where request for that particular URL goes. Host name can be NA, Default or Host Name.
CommentsComments can be used by user to give some comments about a pattern.
Body Request FileThis includes all the strings that are included in the body of our requested resource.

Creating a Transaction Pattern

You can create a URL pattern of the processed data using the Make Pattern, Suggest Pattern buttons, and other options, as highlighted below:

To create a pattern:

  1. Click the Make Pattern A Pattern text box appears on the screen.
  2. Write a regular URL expression in the Pattern
  3. Click the Find Matching Pattern.
  4. Specify the type of URL, i.e. Main or Inline.
  5. Enter a name of the pattern in the Transaction Name field.

6. Click the Accept Pattern You can see only those URLs details which are meeting the given criteria. If a user clicks on Cancel Pattern button then it excludes the pattern matching and move the control onto Process Data page.

You can also create a URL pattern using the options:

  • Suggest Pattern button brings out a common pattern out of two or more selected method from Process Data page on the pattern bar. Then User can see only those URLs details which are meeting the criteria given on the Pattern tab after clicking on Accept Pattern If user clicks on Cancel Pattern button then it excludes the pattern matching and move the control onto Process Data page.
  • Filter Remaining URLs button displays all the remaining unprocessed URL.
  • Play Remaining URLs button processes all remaining unprocessed URL.

Running a Test Scenario

After processing the access log data, you can create a script and run your test scenario.

Creating a Script

To create a script:

  1. Click the Create Script button that generates the script based on the current settings saved in the Replay Access Log Scenario.
  2. The Script Manager window displays a message stating that the “Script is generated successfully”, as shown below:

After creating a script, you can further edit the script, generate warnings, and create a summary report using the following options:

  • Edit Script: Provides the functionality to edit a script using the Script Manager GUI.
  • Warnings: Displays the script warning messages.
  • Summary Report: Displays the total number of files processed and the number of URLs processed in that file.
  • Initial Request
  • Non Session Request
  • Inline to Main Requests: Lists the change requests for converting the type from Inline to Main.

Running the Replay Access Log Scenario

After creating  script, you can now run the Replay Access Log scenario by clicking the Replay  button, as highlighted in the following figure:

Comparing Results

After running the Replay Access Log scenario, the test results are displayed on the Dashboard, which allows you to compare different test results. You can compare the performance test results of the actual run with the replay access log results.

The following figure displays a comparison between the production scenario and replays access log data: