Web and Mobile Recording Methods and Parameterization in Neoload

Script design and Recording Methods (Web and Mobile) in Neoload (Part 2):

This is the Part 2 of our Neoload training tutorial series.

This tutorial explains the step by step procedure of the recording methods for both web application and mobile application along with pictorial representation for your easy and better understanding of the concept.

Parameterization of Neoload and the types of parameters in Neoload are explained clearly in this tutorial.

Recording methods in Neoload

Web Script Recording

As mentioned in the previous tutorial. In order to record the script, Neoload certificate and proxy should be configured.

Neoload recording modes include:

  • Proxy Mode
  • Tunnel Mode

Let us first discuss the proxy mode recording as most of the applications support proxy mode recording only.

#1) Proxy Mode Recording

Step #1: Open the Neoload and create the project as shown in the Getting Started With Neoload Performance Testing Tool tutorial.

Step #2: Click on the start recording button. It will open the recording wizard as shown below.

Start Recording

Step #3: Choose the mode of recording. To choose the mode of recording click on the advanced tab.

The default and recommended mode will be Proxy mode.

Proxy Mode

Step #4: 

Each script will have 3 action types as mentioned below:

  • Init: Will execute only once (used for Login type actions).
  • Actions: Will execute many times and all the business transactions will be recorded in the actions section (used to perform a sequence of actions continuously).
  • End: End action will execute only once (used for Logout type actions).

Actions

We can record the complete business flow includes login and logout under Actions section, but to keep it more realistic, we will follow the above approach to design the scripts.

Step #5: Choose the type of browser to record the script. But before starting to record make sure that the proxy (host address and port number of Neoload as mentioned in part1) setup is done on the selected browser.

Microsoft Edge

Step #6: Check delete cookies and clear the cache to a start fresh recording.

Clear Cache

Step #7: Now click on ok. Then the recording wizard and browser will open.

Action type (Init, Actions, and End) can be changed while recording as well.

Provide Transaction names for each user action to be measured.

Actions Screen

Step #8: Enter the application URL and proceed to record the business flow and finally click on stop recording. We will use Soasta store sample application in this series to discuss the concepts.

Step #9: Click on stop recording once and a post-recording window will appear as shown below. This will help to filter out the unwanted requests by unchecking the hostnames, and also will help to find the dynamic values and apply existing correlation rules.

Correction Rules

Uncheck the other hosts except for soastastore.com and click next and later finish.

Proxy Mode Recording

Now, we are done with proxy mode recording.

#2) Tunnel Mode Recording

Tunnel mode will help to record Mobile & web applications which are ‘proxy disabled’, Any browser proxy setup is not required in tunnel mode.

The communication between server and browser will happen through Neoload without proxy.

Step #1: In order to start the recording in Tunnel mode, it is necessary to activate the tunnel mode in recording preferences by clicking on Recording Preferences.

Preferences –> General settings –> HTTP Recorder –> Tunnel Mode Recorder settings.

Provide the IP address to access the application from a client.


Tunnel Mode Recording

Step #2: Provide the IP address range “From” should be starting IP and “To” should be the end range, it will be helpful when an application is accessible from multiple IP addresses, “From” and “To” will be the same when we have only one IP address to access the application.

Preferences

Step #3: Click on the recording button, then the recording wizard window will go to advanced tab and then select the tunnel mode and click ok.

Tunnel Mode

Step #4: It will give all the available hosts in the given IP address range. Select the Application host which you want to record and uncheck the remaining hosts.

Selecting Application Host

Step #5: Click on “Detect servers” and proceed to the next and then finally click on finish to start recording the application.

You can find detailed recording steps in Tunnel Recording.

Mobile Application Recording (Android)

In order to record the mobile App or mobile web application, the mobile and Neoload should be running on the same network. i.e. we must use the same network for mobile and desktop/laptop where the Neoload is installed.

As we did for web recording we must install a Neoload certificate on the ‘Mobile’ and should set the proxy in the mobile.

Below are the mandatory settings to record mobile applications:

  • Install Neoload Certificate on Mobile.
  • Proxy settings in Mobile.

#1) Install Neoload Certificate on Mobile

Step #1: Get the Neoload certificate from ‘Conf’ folder of Neoload installation location as explained in Part1.

Step #2: Attach the certificate to email and send it. Open the email on a device and install the certificate.

Step #3: Go to Settings-> click on security -> click on install from phone storage & SD card and here we will be able to find the installed Neoload certificate.

Once the certificate is installed successfully we must set the proxy in Mobile.

#2) Proxy Settings in Mobile

We must give an IP address and port number of Neoload that is running in the mobile proxy.

Step #1: Open Neoload and find the IP address and port number of the Neoload running. Open Neoload Go to Record-> Recording preferences ->General Settings-> Http Recorder and find the IP accessible from the client.

Find the details in the below screenshot

Recording options

General Settings

Step #2: Can also get the IP address from a command prompt using ‘ipconfig’. But it is good to take from Neoload.

Step #3:  To maintain the Neoload running system and the Mobile network the same, we should use WIFI only.

To set the proxy in a Mobile double click or long click on the connected WIFI.

  • Perform a long press on Wi-Fi and select manage network.
  • Under ‘proxy’ choose manual and give the IP address and port of Neoload running system and then save it.

Manual Proxy

Step #4:  If all the steps are performed correctly, then we will get some alert like ‘Unknown third-party monitoring network’. Now we will be able to record the script using mobile.

Record the Script (Mobile)

Step #1: Open Neoload, click on start recording and uncheck the ‘start client’ because there is no need to select the browser for mobile app recording.

Find the details in the below screenshot.

User Paths

Step #2: Click ok to get the recording wizard open.

Same as web recording, choose the action and give a transaction name and then perform the related actions in the mobile App like Launch, login, search, etc.

Select Actions

mobile app

Mobile App Screen

Step #3: Once all the actions are performed in the App, click on stop recording and now we will be able to see the recorded steps in the Neoload.

Mobile App

Debugging the Script

After recording the script successfully, debug the script and perform parameterization, correlation and text checks. We should debug the script once to check if the script is working fine or not.

Step #1: In Neoload script debugging is done using the ‘Vuser check’. Click on the checker as shown in the below screenshot.

Debugging Script

Step #2: You will get the check user path wizard. As shown in the below screenshot.

Check User Path Wizard

Select the script which you want to debug under section ‘A’. Under section ‘B’ advanced settings, we can set the no. of iterations, type of browser and bandwidth details to debug the script as shown below.

Advanced Parameters

Finally, click on start checking and it will start debugging and give Valid if no errors are found.

Validating User Path

We can compare the recorded version and enhanced version to debug the script.

Select request or response which you want to compare then click on the compare button as shown in the below screenshot. Comparison window will highlight the differences. This will work like ‘Windiff’ in LoadRunner. But here we can compare only request by request and not all at once.

comparison Window

Parameterization

The user given input values will be parameterized like username, password, customer Id etc.

Parametrization should be done for load testing in order to achieve real-world scenarios owing to few reasons.

Those reasons include:

  • Parameterization helps to give multiple values to the server.
  • If we use single data for multiple times it may cache the data, and will not provide the real response time.
  • Some of the Applications will not accept a single user to log in multiple times.
  • Some of the Applications will generate a different session id only when we give multiple users.
  • It also helps to maintain the scripts, when you want to execute the scripts in other environments when you simply change the URL parameter and the same for think time and other parameters

Given below are the types of parameters in Neoload

  • Counter
  • List
  • File
  • SQL
  • Random Integer
  • Random String
  • Date
  • Random UUID
  • Shared script
  • JavaScript

Given below are the 3 types of scopes that are available to use parameters in Neoload.

  • Local
  • Global
  • Unique

In Neoload, parameterization can be done using the below steps:

I am showing the parameterization for ‘soastastore’ application which we used for recording.

Step #1: Select the ‘FX’ symbol in the Neoload menu to create the parameters. The variable wizard will open.

Variable Wizard

Step #2: Click on ‘New variable’ to create a new variable.

New Variable

Step #3: Select the type of variable to do the parametrization.

Select the list type variable. The list used to handle less no. of user data. Add the column to enter the field names like username, password etc by clicking ‘Add Column’. Add the values to the column by clicking ‘Add Value’.

Variables Screen

Step #4:  Select the scope of the variable for the variable distribution in the script.

Step #5: Select the value change policy to update the parameter value by each iteration/request/page/by a user.

Step #6: Select the hard-coded value and double-click on it. A variable wizard will open the browser and replace the value with a variable as shown below.

Select Hardcode Value

Step #7: The hard code value can be replaced with a variable as shown in the below screenshot.

Test Data

Conclusion

I hope you would have got a clear idea about how to record web and mobile application using the Neoload tool. Also, you would have become familiar with parameterization concept in the Neoload tool.

In our upcoming tutorial part 3, we will be covering the concept of correlation along with the usage of logical actions in Neoload.