How to Use the Web App Simulator?
The following sections will describe in detail on how to record a transaction and configure the Web App Simulation component for monitoring.
How to Record a Transaction?
The Web App Simulation Recorder is a standalone desktop tool that is packaged with the eG agent and is installed on the computer / VM from where the simulation will happen. This is used to simulate the required web transactions and record the entire simulation to be played back at custom intervals later on.
To record a transaction, do the following:
- Login to the host on which the eG agent is installed.
- Execute the WebAppSimulationRecorder.exe from the <EG_INSTALL_DIR>\lib\Synthetic folder.
-
Figure 1 will then appear.
-
Here, specify the URL of the website using which you wish to record a sequence of transactions to build a script. Let us take http://teleportal.acme.com as an example.
-
In Figure 2, once you enter the URL, click the Start Recording button. Figure 3 will appear if the eG's Web App Simulation extension is not loaded automatically in the Google Chrome browser. Follow the steps listed in Figure 3 to manually load the extension. Once you follow the steps, click the OK button.
-
Google Chrome browser then automatically redirects to the specified URL in Figure 2. Figure 4 will then appear prompting you to start the recording.
-
Click the OK button in Figure 4 to start the recording.
- The next step towards building the script is to start the recording. The primary purpose of the recording is to start capturing the user transactions that are to be emulated.
-
Each activity that you do on the website will be recorded. For example, let us say take the case of recharging a mobile with a pre-paid plan. For this, in our example, we login into the website, ascertain the best pre-paid plan, proceed to recharge by making the payment. These transactions and activity pertaining to the transactions will be recorded in sequence.
- Figure 5 captures each URL hit on the target web app as a transaction and every action (mouse click, keystroke etc) as an Activity. You can even use the Web App Simulation Recorder to record a transaction/activity where TOTP based two-factor authentication is used for user authentication. To know more on how TOTP based two-factor authentication works with web applications / web sites, refer to How TOTP based Two-factor Authentication Works With Web Applications?.
-
While you are recording a simulation, you are allowed to verify the page title or a text in the web page. This helps in maintaining a smooth navigation between web pages while replaying the simulation. To verify the page title, right click on the Google Chrome browser and follow the menu sequence: eG Web App Simulation Extension -> Assert Title (see Figure 6).
Figure 6 : Verifying the title of the web page
This will ensure that the title of the web page is verified. In our example, the page title is ACME TELCOM (see Figure 6) and the same will be verified while replaying the simulation. This will be added as an activity while performing the simulation (see Figure 7). Similarly, you can even verify a text in the web page. For example, you can verify the Payment Successful message in the web page while performing the simulation.
-
Once you have performed all the required transactions, you can stop the recording by selecting the Stop Recording button that appears in Figure 7.
-
Once you have stopped the recording, you can even replay the recording to verify if you have perfectly recorded the script. For this, press the Play button as shown in Figure 8.
Figure 8 : Clicking the Play button to replay the recorded script