How to Record a Script

Recording Other Scripts

Ways to Record a Script

There are following ways of script recording:

  • Script can be recorded using Internet Explorer/Mozilla Firefox and NetStorm Browser.
  • For script recording using Internet Explorer/Mozilla Firefox, need to install HTTP Analyzer.
  • WebC and WebJava type script can be recorded using Internet Explorer/Mozilla Firefox and NetStorm Browser.

Prerequisites for Opening Script Manager

Install Java

Java must be installed on the system.

Download Link: https://www.oracle.com/java/technologies/javase-downloads.html

  • If the Java version is 11 or later, refer the Download Script Manager
  • If the Java version is 8 or 9, refer any of the sections, either Launch Script Manager or Download Script Manager.

Set Java Path

Java Path must be set in environment variable of System properties.

Clear Java Cache

  1. Go to Control Panel and click the Java icon in the Adjust your computer’s settings dialog box. The Java Control Panel dialog box is displayed.

3

  1. Click the Settings button, the Temporary Files Settings dialog box is displayed.

4

  1. Click the Delete Files button, the Delete Files and Applications dialog box is displayed.

5

  1. Select all check boxes and click the OK button.

Launch Script Manager

Follow the below mentioned steps to login into NetStorm portal and launch Script Manager:

  1. Enter the NetStorm login URL.

7

  1. Enter the Username and Password and click the Login button. The NetStorm – Product UI Home page is displayed.

  1. Go to View > Scripts > Launch Script Manager menu item. The system prompts to open recorder.jsp file. Select the Open with option (Java Web Start Launcher) and Click OK.

Procedure for Launching Script Manager may vary based on the Browser and other settings.

9

  1. Once the application gets downloaded and verification is completed, the security warning dialog box is displayed.

10

  1. Click the Run A dialog box for getting scripts message is displayed

11

NoteIf user clicks the Run in Background button, this dialog box is disabled and scripts run in background.
  1. After getting Scripts and loading the background files, the Script Manager window is displayed.

Download Script Manager

You can also launch the Script Manager by downloading the installer.

  1. Log into NetStorm.
  2. Select View > Scripts > Download Script Manager.

3. The ScriptManager.exe file is downloaded within the Downloads folder.

4. Launch the Script Manager by double-clicking the ScriptManager.exe file.

5. Provide the Controller URL (the IP of the machine for which you need script manager to be accessed), User Name (username of the machine), and Password (login password) and click Login.

6. After login, the Script Manager window is displayed.

Script Manager Screen Details

Script Manager Screen contains following sections:

  • Menu bar
  • Tool bar
  • Left pane
  • Right pane
  • Bottom pane

Menu bar

Script Manager Menu bar contains following main menus:

  1. File
  2. Edit
  3. View
  4. Action
  5. TabList

File

File menu contains the following sub-menus/menu-items.

13

  • New: New option is used to create a new file/directory inside the script.

14

 NoteTo create a file/directory inside the script, user needs to select the File/Directory option accordingly.
  • Insert: Insert sub-menu has the following options.

  • Parameters: Parameters sub-menu has options for different types of parameters to use in the Script, they are as follow:

16

  • Save: Save option is to save the script after being edited.
  • Exit: Exit option is used to exit from Script Manager GUI.

Edit

Edit menu contains the following sub-menus/menu-items.

  • Find: Find string(s) in a file
  • Replace: Replace string(s) in a file
  • Go to Line: Go to a specific line in file
  • Word Wrap: Confines the data in the file within defined margins
  • External Libraries: To add external libraries
  • Create Script: To create a script
  • Create Script with WSDL: To create script with WSDL.
  • Copy Script: To copy the script
  • Delete Script: To delete an unwanted script
  • Rename Script: To rename a script
  • Create Flow: To create a new flow file
  • Copy Flow: To copy the flow file
  • Rename Flow: To rename a flow file
  • Delete File: To delete a file
  • Copy File: To copy a file
  • Page(s): To View/Change the Page name of the Script
  • Append Page(s): Appends pages to another script
  • Recorder Options: This feature provides the way to split the pages while recording for different method(s)
  • Filters: To filter some URLs at the time of recording of a script
  • Download Script: To download Script on the User’s system (Downloads in .zip format)
  • Upload Script: To upload a script from User’s system to Script Manager (Script should be in .zip format).

View

View menu contains the following sub-menus/menu-items.

  • Run Logic: To define the flow of the execution. It is covered in detail later in this document.
  • Debug Log: To open Debug Log file
  • Error Log: To see the Error Log file
  • Snap Shot: To view the Snap Shot of the Script
  • Compare Script: To compare two or more scripts
  • View Script: To view the Script’s files in the Browser
  • View Parameters List: To view the parameters list.
  • Compile Script: To compile a script
  • Page Details: A user can see Page Detail information of recorded script, such as URL, Headers, Request and Response, Cookies, etc.
  • Test Script: It runs the Script and creates Test Run
  • Show/Hide specTo show/hide the registrations.spec file. By default, it is visible.
  • Show/Hide Analyzer: To show/hide the HTTP analyzer.

Action

Action menu contains the following sub-menus.

19

  • Start Recording: To start the script recording
  • Stop Recording: To stop the script recording
  • Pause Recording: To pause the script recording
  • Resume Recording: To resume the script recording
  • Cancel Recording: To cancel the script recording
  • Enable Log: To enable the logs for debugging purposes
  • Classic Recorder: Old recorder of NetStorm
  • Release Memory: To release all the used memory after recording

TabList

This menu contains the path of the files opened on the right page of the screen. The format is – Project/Subproject/Script/File

Tool bar

This contains a list of icons from where user can perform the actions.

IconMeaningDescription
 1Start buttonTo start Recording the script
 2Stop buttonTo stop recording the script
 3Cancel buttonTo cancel the script recording
 4Pause buttonTo pause script recording
 5Resume buttonTo resume script recording
 6Comment buttonTo add comments in a script
 7Create buttonTo create a new file inside the script
 8Save buttonTo save a file after editing
 9Copy buttonTo copy the script
 10Download buttonTo download a script to local machine
 11Upload buttonTo upload a script from local machine
 12Runlogic buttonTo open the Runlogic GUI window
 13Delete script buttonTo delete a selected script
 14View Snapshot buttonTo see the snap shot of pages of a script
 15Compile Script buttonTo compile a script
 16Test script buttonTo execute a script from script manager
 17Commit Script Version buttonTo commit a script version
 18Version Control History buttonTo view the version control history of the script
 19View script buttonTo view all files created  after recording
 20Synchronize buttonTo refresh the script manager GUI. You can sync the scripts at the project, subproject, or script level.
 21Exit buttonTo exit from the Script Manager GUI
 Download ProjectTo download a project to the system
Upload ProjectTo upload a project from the system
Save All BreakPointsTo save all breakpoints in the script
ContinueTo start the script replay and pauses it on the next breakpoint of the script
Step by StepTo run the script one line at a time
Stop Debug TraceTo stop the debug trace
Search ScriptThe user can search a script by entering either the complete script name or starting characters of that script in textfield. It highlights all the scripts with that name.

Left Pane

Left pane contains list of projects, sub projects, its associated scripts and other files. The following figure shows a sample left pane of the Script Manager GUI:

20

Bottom Pane

This is also known as Message panel where the debugging or information messages are displayed. The following figure shows a sample Bottom pane of the Script Manager GUI:

21

Right Pane

Right panel displays the content of the selected file from left pane. The following figure shows a sample Right pane of the Script Manager GUI:

22

Advance Settings

The Advance Settings section allows the user to set some advance recording options. Click the Start Recording icon. The script recorder dialog box is displayed.

23

For opening the Advance Settings dialog box, click the Advance Settings button. Once clicked, the Advance Settings dialog box is displayed.

The Advance Settings section consists of following tabs:

  • General
  • Netstorm Browser
  • Modify Headers
  • Advanced

General

To perform the General settings, click the General tab. The General settings dialog box is displayed.

There are following options under General settings tab:

Browser Options

  • Browser Type: User can set which browser to be used for recording. Available options are – External Browser/Native Apps, Netstorm Browser, and Internet Explorer. Click And Script type scripts can be recorded only by Netstorm Browser. C type script can be recorded by all supported Browsers. By default, Netstorm Browser is selected. Other options are enabled/disabled based on the type of browser selected.
  • External Browser/Native Apps: This browser type is used for recording scripts from any non-browser application, such as a mobile app. This browser uses proxy recorder to get http request response and other information about http request. After setting options from Script GUI, set up environment/port for recording from JSP interface.
  • Netstorm Browser: This browser type is used for recording C type of scripts. This browser used JxBrowser APIs which used low level Mozilla APIs.
  • Internet Explorer: This browser is used for recording Legacy and C type of scripts. This browser used HTTP Analyzer to get http request response and other information about http request.
  • Clear cache before recording: By selecting this check box, system cache is automatically cleared before start of a script recording. By default, it is selected.
  • Clear cookie before recording: By selecting this check box, cookies are automatically deleted from the system before start of a script recording. By default, it is selected.

Split Page Options

  • Split page for Time difference of URL: User can split page depending on the specified time. If the difference between embedded URL’s request start time and its previous URL’s response time is greater than the specified time, then that particular URL becomes main URL. First select the checkbox and then specify the time in seconds. 
  • Split page option for Specific method: This option is used if user wants embedded URLs with particular method to be split as main URL. The available methods are:
    • POST
    • PUT
    • HEAD
    • DELETE
 NoteUser can select all methods by selecting the ALL check box.
  • Split page option for Ajax HTTP Header: This option is used to split a page with Ajax header (XMLHttpRequest).
  • Split page option for User Click Event: This option is used to split a page with User click.
  • Split page option for URL type: This option is used to split a page on specific URL type (like json URL).

External Browser/Native Apps Option

It is used in case of external device, such as tablet is used for recording a script. This option is enabled after selecting the browser type as External Browser/Native Apps. Specify the page boundary time in seconds.

Body Size Option

If body contents exceed the body size given in textbox, then body contents save in new created directory (http_request_body) in script directory.

Real Browser User Script Options

Real Browser User Support is a way of simulating the Internet access & Browsers executing the transaction via “real” browser (Real Browser Users or RBU). RBU’s are much more heavy weight than typical Virtual users as for an RBU NetStorm uses real browser to download page.

  • BrowserUserProfile: The entire changes user makes in Firefox, like home page, what toolbars used, saved passwords and bookmarks, are all stored in a special folder, called a profile.
  • HarLogDir: Name of the log file where har file is generated. Default name is logs.
  • PageLoadWaitTime: Estimated time required to load the page. Default is 30 sec.
  • VncDisplayId: Implies vnc server display number. Default is 1.
  • HarRenameFlag: Indicates har files should be renamed or not.
    • 1: Rename the har file, adding page name to har.
    • 0: Do not rename the har. Keep the har file name as generated by the browser.

Netstorm Browser

It is used when user is using Netstorm browser for script recording. Here, user can set the Netstorm browser options and can perform the configuring settings. To perform the Netstorm Browser settings, click the Netstorm Browser tab. The Netstorm Browser setting dialog box is displayed.

There are following options under Netstorm browser tab:

Netstorm Browser Options

Here user can set following browser level options:

  • Enable JavaScript
  • Image Download
  • Disable Plug-ins
  • Ignore security certificate warnings
  • Enable Snapshot Capturing
  • Enable PreSnapshot Capturing
  • Verify SSL certificate
  • Enable checkpoint (applicable for only Click&Type scripts)
 NoteBy default all check boxes are selected.
  • Setting User Agent: This option is used set the string in request/response. Default user agent string is Mozilla/4.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24
  • Browser Engine: User can set browser engine which is used for downloading. By default, it is Mozilla.
  • Open browser in Heavy Weight Mode: In the heavyweight rendering mode, we embed a native window into your Java application window and configure Chromium engine to render content into this native window using GPU. User interaction with displayed web page is done by Chromium engine. Chromium receives and processes mouse/keyboard/touch events using platform specific native functionality. It brings a better support of mouse/keyboard/touch events compared to lightweight rendering mode where NetStorm Browser has to process Java events and forward them to Chromium engine. Therefore, if rendering performance is very important for your application, then we recommend that you use default heavyweight rendering mode.

Configure proxy server for recording

In this section, user can configure proxy server for recording. A proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server and the proxy server evaluates the request as a way to simplify and control its complexity.

No proxy: By selecting this option, no proxy is applied to access the web server. This is the default option.

Use system proxy settings: If user selects this option, the proxy settings which are set for the system is applied. In case system proxy is already defined, those settings are loaded for any view/updation. Else, it appears as in case of manual proxy configuration. User can configure system proxy settings and save them. System proxy setting would be configurable only from default scenario settings when user login as Admin.

Use manual proxy settings: In manual proxy settings, set up the proxy manually.

The Manual proxy section contains the following options:

Manual proxy configurations

  • HTTP Proxy: An HTTP proxy is a category of network setting that can be configured in network (or Internet) accessing applications. Specify the HTTP proxy in the following format: http://ip:port. Port number ranges from 1 to 65535. By default, it is 80. 
  • SSL Proxy: It routes traffic from a client to web server using the Secure Sockets Layer (SSL) protocol. SSL is an encrypted protocol that creates a secure connection from a client to another client or server. Specify the SSL proxy in the following format: https://ip:port

Port number ranges from 1 to 65535. By default, it is 443.

 NoteTo have same proxy server for both HTTP and HTTPs protocols, select the Use same proxy server for both protocols check box. All protocols are using same server and port for all the protocols.
  • Exceptions: Exceptions options get enabled in case Manual proxy configuration check box is selected. To bypass proxy server for local address, specify the local address for example, 168.1.0/24 in the No Proxy for text box then select the Bypass proxy server for local address check box.
  • Proxy authentication credential: User’s credentials are verified here. If user selects the Proxy authentication credential check box, the following options are displayed. Enter the User Name, Password and Confirm Password.
 NotePassword and Confirm password values are encrypted and are verified at the back end.

Debugging Tools Support in NetStorm Browser

Debugging tools support enables a user to view the request / response in script recording using NetStorm browser.

Debugging mode

When user clicks the  icon, debug mode is ON. User can see the request / response over the network.

Modify Headers

This section is used to perform header settings and cookie settings for recording a script. To perform these settings, click the Modify Header tab. The Modify Header settings dialog box is displayed.

27

Header Setting

The purpose of header setting section is to manually specify the header name and its value. User can add more than one header in the script by clicking the More button. User can also replace or append the header. In case of Replace, the header specified replaces the existing header. In case of Append, the specified header is appended to the existing header.

Cookie Setting

The purpose of cookie setting section is to manually specify the cookie name and its value. User can add more than one cookie in the script by clicking the More Cookie button.

Advanced

In some cases, if user wants to record headers, such as Referer, User agent String in flow file of script so that NetStorm can send only those headers which are present in flow file of script. In this case, user needs to record all headers in flow file of script. For this, Advanced tab for Header recording is implemented in Script Manager GUI.

Record Headers in Flow File

The following headers options are available in the Advanced tab:

  • Accept
  • Accept-encoding
  • Keep-Alive
  • Host
  • User-Agent
  • Connection
  • Referer

If user selects the All check box, All Headers checkbox is enabled and displayed in flow file of recorded script. User can select any of the header check box provided.

Add Transaction in Flow

You can specify the settings for adding a transaction in the flow file by enabling one of the following options:

  • Default: Selecting the Default option adds the transactions (i.e. start transaction and end transaction) automatically to all the pages of recorded script in flow file.
  • Custom: Selecting the Custom option enables you to add a transaction in the browser. Also, you can end/rename/remove a transaction by using the Transaction window. Each entered transaction has a Status column indicating the state of the transaction. The following Transaction Status are supported:
    • Started: means the transaction has been started.
    • Ended: means the transaction has been ended.
    • Autoend: means the transaction automatically end after the next page.

29

Recording with Sample Application

  1. On the Script Manager UI, click the Start Recording button, the Script Recorder dialog box is displayed.

Sample Application URL (Mercury Tours): http://65.19.151.245:7898/tours/index.html

2. Enter the Script Name, URL to record, Project name, Subproject name and Protocol Category and Click OK. The recording is started and the page specified in the URL text box is displayed.

 NoteUser can set advance settings by clicking the Advance Settings button. Advance setting has already been described.

3. Enter the Member name “hello” and password “world” and click the login

(Recording Page-1)

34

4. Click the “flights” button to find flights.

(Recording Page-2)

35

5. Enter the flight details: (Recording Page-3)

  • Select the Departure City as “New York” and Departure Date is default.
  • Select the Arrival City “Paris” and Return Date is default.
  • Enter No. of Passengers as 2.
  • Select Seating Preference as “Window”.
  • Select Type of Seat “Coach”.

6. Click the continue button.

36

7. Select the third option for Flight. Click the continue button. (Recording Page-4)

37

8. Enter some dummy personal details – Name Address and credit card details. Click the purchase flight button. (Recording Page-5)

38

9. This is flight confirmation page to confirm the flight. Click the sign off button on left side to logout. (Recording Page -6)

39

10. This is logout page which confirms that user has successfully logged out. (Recording Page – 7)

40

11. To finish the recording, click the Stop Recording button on script management window. The Script is created.

41

12. After creation of script, recorded script page names is displayed.

42

  • Above are the default page names which come automatically from Query String, selecting only the last part of the URL.
  • If two pages have same name then it is differentiated by pagename_2 for second page, pagename_3 for third page and so on.

Example:

  • findflight
  • findflight_2
  • findflight_3, of recorded script
 NoteUser can change the page names by clicking the Change button.

Adding Multiple Transactions while Recording a Script

To add a new transaction during the recording process:

  1. Click the Start Recording button, the Script Recorder dialog box is displayed.
  2. Click the Advanced Settings button.
  3. Select the Custom option in the Advanced
  4. Click OK and start recording.
  5. Click the Add Transaction button in the browser to open the transaction window.
  6. Specify the transaction name and click Add button to add the transaction, as shown in following figure:

Renaming/Ending/Removing a Transaction

To rename a transaction:

  1. Select the transaction you want to rename and click the Rename button.

2. Specify the name corresponding to the selected transaction.

3. Press Enter.

Similarly, to remove/end a transaction, select the required transaction and click the Remove/End button, respectively.

Enable/Disable Auto End Transaction

If you want add the transaction as Auto End, select the option Enable Auto End Transaction. By default, this option is enabled.

Viewing the Recorded Script Structure

Follow the below mentioned steps for viewing the recorded script structure.

  1. The flow.c file of Recorded script is displayed by default.

43

  1. To view the init_script.c file of Recorded Script, double -click the init_script.c file.

44

  1. To view the registrations.spec file of Recorded Script, double-click the registrations.spec file. Parameters and checkpoints are added here.

45

  1. To view the exit_script.c file, double-click the exit_script.c file.

46

Viewing Snapshot of Recorded Script

  1. To view the snapshot of the recorded script, click the View Snapshot button on the tool bar.

47

  1. The script pages’ snapshot is displayed.

48

  1. To check the Request/response from snapshot, click the page number of each page. User can also check the main URLs which are followed by the embedded URLs.

49

Testing the Recorded Script

Script Testing is useful for quick test of recorded script. By Script Testing, user can easily look at the flow and how the script is recorded. It should be noted that Script testing is not meaningful for those scripts which are taking dynamic values. For example – Account number, Username, Password etc.

  1. To test the recorded script, click the Test Script button on the Script Manager window.

50

  1. The Test Script dialog box is displayed.

3. First, user needs to specify the number of virtual users and number of iterations. Further, there are certain features for users, such as:

  • Fetch / do not fetch inline objects
  • Treat page as transaction or not
  • Simulate a new user on each iteration
  • Run virtual user as Real Browser User
  • Capture Video
  • Continue Session on page error
  • Disable NetStorm Monitors
  • Enable Script based headers
  • Override recorded page think time by specified seconds
  • Scenario profile: The user can use existing scenario profile while executing a test from script management.
  • Run in Debug mode

4. On clicking the Advance Settings button, user is navigated to a dialog box to set the proxy settings and Java settings.

  1. Proxy Settings: Here, user can specify the protocols, such as HTTP proxy/port and SSL proxy/port. User can also set same proxy server for both protocols. For example: proxy.cavisson.com.
  2. Java Settings: Here, user can set the java class path.
  3. 5. Specify the details and click the OK button. Next, user is navigated to the Test Script dialog box, click OK. The script testing is processed and generates a list with time stamp and trace messages.

Scripts Debugger

Script debugging feature allows a user to debug the script by adding breakpoint so that the user can analyze or verify the data or flow by printing the value of any variable / step execution to verify the condition.

  1. User can add Breakpoint by clicking on line number in flow file of script.

Note: Breakpoints can be applied on C-type script and CLICK_AND_TYPE script.

  1. For running script in Debug mode, there is an option “Run in Debug Mode”.

  1. Start the test in debug mode.

  1. Following options enabled once test is started in Debug Mode:
  • Continue: Continue command starts the script replay, and then and pauses it on the next breakpoint of the script.
  • Step by Step: The ‘Run Step by Step’ command runs the script one line at a time. This enables the user to follow the script execution. The ‘Run Step by Step’ command starts the script replay, and then and pauses it on the first line of the script.
  • Stop: To stop Debug Test

Note: If a user applies multiple breakpoints in a script and stops the debug trace by clicking the ‘Stop Debug Test’ button before execution of all the breakpoints, then test is stopped immediately and further breakpoints are not executed. The same is reflected in debug trace logs.

Details of Execution while executing Script having Breakpoints.

  1. Debug Trace window for Request/Response & Test Run output details:

6. The user can view NS variable data during execution by right-clicking in flow file of script and selecting View Variable Data.

Variable value data using ns_eval_string

Variable value data in HTTP URL

 Use Cases

Below use cases defines script execution based on the available options, such as Continue and Step by Step. The user first needs to apply the break points in the flow file of the script. Then, run the script in debug mode. Once the script is executed in debug mode, user can use the script replay options (Continue / Step by Step).

Continue

On selecting this option, the script execution is started from the first break point and jumps to next breakpoints.

When user clicks the  icon, the script execution is jumped to the next breakpoint and execute the intermediary steps.

Further, on clicking this icon, the script execution jumps to next break point.

The user can view the script execution report in the lower panel.

Step by Step

On selecting this option, the execution is done line by line. It starts the script replay, and then and pauses it on the next line of the script.

When user clicks the  icon, the execution is performed in sequential manner line by line.

Clicking it further, executes the next line of flow file.

User can view the script execution report in the lower panel.

Note:

  • Shortcut keys to perform the BreakPoint related operations.
    • Continue – F5
    • Run Step by Step – F10
    • Remove Breakpoint – F9
  • The user can remove all the breakpoints in current flow by right-clicking on the flow file and selecting ‘Remove All Breakpoints’ option.

Script Compilation

If there is any syntax error then user gets proper Error message while compiling the script.

Below is a Flow file of script having Syntax Error:

Compilation Error while compiling script having some Syntax Error:

Detail of Errors is displayed on lower panel while compiling script:

Highlighting Missing API Close Brackets in Script Compilation

Earlier, during script compilation if there was any syntax error in multiline API, like if ‘);’ was left in multiline API, NetStorm used to skip that without throwing any compilation error. Now, NetStorm highlights an error for the same.

View Page Details

A user can see Page Detail information, such as URL, Headers, Request and Response, Cookies of recorded script. To view the page details, follow the below mentioned steps:

  1. On the Script Manager UI, go to the View menu and click the Page Details menu item.

2. This displays various details, such as URL, Headers, Request and Response, Cookies, of the recorded pages in the flow files.

3. User can select the flow and page name from the drop-down list. The details are categorized into main URL (with green color) and inline URL (with grey color) and displayed in tabular format according to the selected page, such as path of the main / inline URL, response, host, status code, size of the component (page / image), method, content type, and URL.

The detailed information includes – Raw data, Request body, Response body, headers, cookies, and query string. To view the response of a request, click the View Response check box.

Viewing Various Reports

User can view various reports generated on the script by clicking the View Reports button. These reports included:

  1. Summary Report
  2. Page Dump Report
  3. Progress Report
  4. Failure Report
  5. Page Breakdown
  6. Page Detail Report

Summary Report

Summary report shows the summarized status of execution of script. It shows total number of executed pages and URLs of script and also shows completed session on execution of script.

  1. Click the Summary Reports link in the Reports Selection page. The Summary report is displayed:

This report includes following information:

  • Test Information
  • Other Information
  1. Click the Close button to close the Summary report.

Page Dump Report

Page dump report shows all executed pages of script in tabular form. This report displays page details, such as Start time, Page Name, Page Status, Page Response Time etc.

  1. Click the Page Dump link in the Reports Selection page. The Page Dump report is displayed:

This window provides various details on sessions, such as session start time, page name, page status, page response time, parameter substitution, HTTP request, HTTP response body, and HTTP response.

  • To view the HTTP response page snapshot, click the page name.

  • To view the parameter substitution values, such as parameter name and parameter value, click the Parameter Substitution link.

  • To view the HTTP request, click the View link within the Req column.

  • To view the response body (the page before loading), click the View link within the RespBody column.

  • To view the HTTP response, click the View link within the Resp column.

Progress Report

Progress report shows execution status of script. It shows number of all executed pages, URLs and sessions. Progress report also shows status of execution of all pages, URLs and sessions as fail or success.

  1. Click the Progress Report link in the Reports Selection page. The Progress report is displayed in the following format:

Failure Report

Failure report shows the detail for any failure occurs due to execution of script.

  1. Click the Failure Report link in the Reports Selection page. The Failure report is displayed in the following format:

57

Page Breakdown Report

  1. Click the Page Breakdown link in the Reports Selection page. The Page Breakdown report is displayed in the following format:

58

Creating a Page using Action API

Script Manager contains ActionAPI GUI to add Page APIs as functions and updating dump for the added functions. ActionAPI supports various protocols Web URL/HTTP, SMTP Send, POP Get, POP Stat, POP List, FTP Get, DNS Query. Action API for Web URL/HTTP also provides option to add URLs as Inline in Web URL page API. User can also create a page using Action API.

User needs to follow the below mentioned steps for creating a page using ActionAPI:

  1. Open the flow file of a script and right-click on it. Go to Insert > Action API.

59

  1. The ActionAPI dialog box is displayed.

60

  1. Enter the following details:
    • Page Name: Specify the page name. The page name is of maximum 32 characters. First character must be Alpha. Other characters are Alpha, Numeric or Underscore.
    • Protocol: Specify the protocol from the list of protocols, such as Web URL, SMTP Send, POP Get, POP Stat etc.
    • URL: Specify the URL. By default, this is the main URL. User can change it to Inline URL using the URL Type option. In case of Inline URL, user can also specify whether the Inline URL is First Inline, Middle Inline, or last Inline URL.
    • Method: Specify the method from the list of methods, such as GET, POST, HEAD, DELETE etc.
    • Body: User can type the body content or upload body content from a file. In second case, user has the option to upload body from file with no parameters.
  1. Specify the following advance options which are displayed on clicking the Show Advance Options button.

61

  • Version
  • Header (s)
  • PreURLCallBack
  • PostURLCallBack
  1. After filling all the required details, click the Preview button to preview the page details.

62

  1. Click OK. The page is added to the flow file.

63

Create Script using Wizard

User can create script by using wizard too. For this, user needs to follow the below mentioned steps:

  1. Go to View > Scripts > Create Script.

2. This displays the first screen of the wizard (i.e. Project Details) to create script.

Project Details

Here, user needs to provide the following details:

  • Script Name: Name of the script. It should be a valid script name.
  • Project Name: Project where this script is to be created.
  • SubProject Name: Sub-project within the specified project where this script is to be saved.
  • Script Type: Type of the script, which is to be created.
  1. Once the script details are specified in the first screen of the script creation wizard, click the Next This displays the next screen of the wizard (i.e. Page Details).

Page Details

Provide the following page details in this screen of wizard:

  • Page Name: Name of the page within the script.
  • Page Think Time: Page View Time in seconds (after a page is downloaded).
  • Start Transaction Name: It acts as a marker to define the start of a transaction. To mark the start transaction name same as the defined page name, select the Same as Page Name check box. Transaction name length is supported to 1024 characters.
  • End Transaction Name: It acts as a marker to define the end of a transaction. To mark the end transaction name same as the start transaction name, select the Same as Start Transaction Name check box.
  • URL: Specify the URL to be captured.
  • Method: Specify the method name, such as GET, POST, PUT, DELETE.
  • Cookie: Specify the cookie value. If there are multiple cookies, separate them with comma.
  • Header: Within this section, specify the header name and header value. Add them using the  icon.
  1. Then, click the Save The details are displayed in tabular format.
  2. Upon clicking the Next button, user is navigated to Inline Page Details

Inline Page Details

Here, user needs to provide the following details:

  • Page Name: Select the page name within which you need to add the inline page details.
  • Inline URL: Specify the inline URL, which is the extension of main URL.
  • Method: Select the HTTP method from the available options.
  • Cookie: Specify the cookie value. If there are multiple cookies, separate them with comma.
  • Header: Within this section, specify the header name and header value. Add them using the  icon.
  1. Then, click the Save The details are displayed in tabular format.
  2. To view the preview of script file, click the Preview button.
  3. To navigate to the previous / next screen, click the Prev / Next button accordingly.
  4. To finish the script creation, click the Finish button.

JMeter to Cavisson Script Convertor

A user can convert a JMeter script into Cavisson Script using the script convertor provided by Cavisson. Post this, user can view the converted script in NetStorm Script manager and can view the Scenario via NetStorm’s Scenario UI. To do this, follow the below mentioned steps:

  1. On the product’s home page, go to Advanced > Script Conversion.

2. This displays a window with few tabs, select JMeter to Cavisson Script Converter.

3. Select the project, sub-project, and JMeter script. Once the script is loaded, click the Convert button for its conversion into Cavisson format.

4. The script details, such as thread group, and cavisson script path are populated in a table.

5. To launch the script in Script Manager UI, click the View Script button.

6. To view the scenario in NetStorm Scenario UI, click the View Scenario button.

Load Runner to Script Converter

Guidelines:

  • You can add only web_url and web_submit_data api in the LR flow that needs to be converted to NS flow. If you add any other any other API, NetStorm will not be able to convert.
  • You need to upload a zip file of the LR Script in NetStorm, but the zip file should be created only in Load Runner. If you create the zip manually through desktop, then NetStorm will not be able to convert it.
  • If there are multiple actions in the LR script, then NetStorm might be unable to convert the file.

To convert an LR script, follow the below mentioned steps

  1. Select the Load Runner tab.

2. Select the project, sub project, and LR script. Once the script is loaded, click the Convert button for its conversion into Cavisson format. A message is displayed that script is converted successfully.

3. To view the script with NetStorm Script Manager, click the View Script button.

HAR to Script Converter

The user can convert a HAR script into Cavisson Script using the script converter provided by Cavisson. Post conversion, the user can view the converted script in NetStorm Script manager and can view the Scenario via NetStorm’s Scenario UI. To do this, follow the below mentioned steps:

  1. Select the HAR to Script Converter tab.

2. Provide/Select the following details:

    • Project name and Sub project name where the converted script needs to be stored.
    • Script type to which the conversion is needed. For example: WebC(HTTP/HTML) or WebJava(HTTP/HTML).
    • Add Transaction: To add the transactions while script conversion.
    • Auto Split Pages: Pages are splitted on post, put, head, delete, and JSON URL.
    • Create Single Page for each URL: To create separate pages for each inline URL.
    • HAR Zip File: Browse for the HAR Zip file.

3. Click the Convert button for the conversion of HAR script into Cavisson script. A confirmation message is displayed stating Script converted successfully.

4. To view the converted script in Script Manager UI, click the View Script button.

5. To view the created scenario, click the View Scenario button.

Converting a Postman Script into Cavisson Script

You can easily convert a Postman script into a Cavisson script by using the Script Manager UI. To convert a postman script, upload the postman collection .json file in Netstorm. There is no need to manually write or create the script in NetStorm.

Note: Only version 1 of postman collection is supported.

To convert a postman script:

  1. Select Advanced > Script Conversion.
  2. Click the Postman tab.

3. Select a project and sub project. By default, the selected project and sub projects are displayed.

4. Select a script type to which the conversion is needed. For example, WebC(HTTP/HTML) or WebJava(HTTP/HTML).

5. Select the postman collection .json file.

6. Click the Convert button. A confirmation message is displayed stating that the script is converted successfully.

7. To view the converted script in Script Manager UI, click the View Script button.

8. To view the created scenario, click the View Scenario button.

Recording Other Scripts
How to create True-Web Client script for load testing (Click and Script):

How to create a TIBCO script for load testing:

How to record a web Java script for load testing:

YAML Execution

Using YAML, you can run a test scenario in NetStorm without creating any script and scenario. For running a test, you only need to provide the configuration for both script and scenario in the YAML file and then execute the file.

You can create a YAML file in one of the following ways:

  • Manually create a YAML file
  • Upload an exisiting YAML file

Guidelines for using YAML

Refer to the following guidelines while executing a YAML file:

  • Upload the Body file and Data file and specify the content of body as String.
  • Specify the parameters in key = value
  • Upload file from client machine only.
  • Do not specify the METHOD in YAML file. If the user uploads Body file, the METHOD will be POST otherwise it will be GET. To define other methods (PUT/DELETE), the user needs to define that value. method: <Put/Delete>
  • Provide the parameter values by executing some query on database to get the data in a file and use that data in the body as parameter. The user needs to upload Shell/Python script only where the user will specify the database info and query. File extension will be .sh or .py only.
  • If body is of one line, the user can put it in the content and if it is multi line, it must be in a file.
  • Headers should be separated by comma (,).
  • Validation is done at the server side and validation error (if any) is displayed in the UI. The validation is done on the basis of Syntax error, Case Sensitive, and No duplicate entries

Note: If validation fails, an error is prompted to the user on UI. If the user clicks the Execute button without validating the file, the YAML file is internally validated first and then the test is executed.

Manually Creating a YAML File

You can manually write a YAML file in NetStorm or simply copy the contents of a YAML file to execute a test scenario.

To manually create a YAML file:

  1. Log into NetStorm using your credentials.
  2. Select View > Scenario.
  3. Click the Create button to create a new scenario. The Create Scenario window is displayed.
  4. Select YAML from the Scenario Format drop-down list.

5. Select a project and subproject.

6. Specify the scenario name.

7. Click Next.

8. A YAML window is displayed with a text area having YAML format where you can specify the configuration.

9. Copy and Paste the content of the YAML file OR write manually in the text area.

10. Click the Validate button to ensure the validity of your YAML file. Validation is done at the server side and validation error (if any) is displayed in the UI. The validation is done on the basis of Syntax error, Case Sensitive, and No duplicate entries

Note: If validation fails, an error is prompted to the user on UI. If the user clicks the Execute button without validating the file, the YAML file is internally validated first and then the test is executed.

Uploading a YAML File

You can upload an existing YAML file into the body or any data set files.

To upload a file:

  1. Log into NetStorm using your credentials.
  2. Select View > Scenario.
  3. Click the Create button to create a new scenario. The Create Scenario window is displayed.
  4. Select YAML from the Scenario Format drop-down list.
  5. Select a project and subproject.
  6. Specify the scenario name.
  7. Click Next. The YAML window is displayed.
  8. Click the Upload File button.

9.Click Browse.

10. Select the files to upload (body file and data file), as shown in the following figure:

11. Click Close.

Syntax:

configuration: This section specifies the test identification by username, appname, and test name.

 configuration:
username: <UserName>
appname: <ApplicationName>
testname: <TestName>

execution: This section specifies the execution model which could be user model or session rate model. In the case of the user model, provide number of users while session per minute in the session rate model. Here, scenario-name is the name of scenario that is described in the scenario part.

execution:
-concurrency/ session-per-minute: <Number Of Concurrent users Max 10000 or Session per minute>
duration: <hh:mm:ss>
ramp-up: <hh:mm:ss>
ramp-down: <hh:mm:ss>
scenario: <scenarioname>

scenarios: This section specifies the details of url/api to be executed.

scenarios:
<scenario name mentioned in execution section>

 file-parameters: This is optional and required only on using a file for body/payload or using any data file(s) for a file parameter.

file-parameters:
-parameter-name: <parameter name separated by comma>
file-name: <data file having comma separated value>

        Note: file should NOT have any header line.

 headers :This section specifies all header’s name value pairs as name:value

 headers:
  <name>: <value>

requests: This section specifies  url/api, label, body (POST type url) and content check if any.

requests:
-url: <url>
label: <labelName>
body-text: <payload in single line>
content-verification: <Text or string to be validated in response>

Example:

The following sample YAML file consists of three POST type APIs. In this sample file, execution is designed to generate 5 sessions per minute for each API.

configuration:
 username: Anjali
 appName: CavWebservices
 testname: TestNew1
execution:
- session-per-minute: 5
  duration : 00:03:00
  scenario: WebserviceTest1New
- session-per-minute: 5
  duration : 00:03:00
  scenario : WebserviceTest2New
- session-per-minute: 5
  duration : 00:03:00
  scenario : WebserviceTest3New
scenarios:
 WebserviceTest1New :
  headers:
     accept: application/json
     content-type: application/json
  requests :
   - url: http://68.235.60.35:9002/account/balanceEnquiry
     label: BalanceEnquiry
     body-text: {"RequestType":"ViewBalance","Version":"V1","AssociateAccount":[{"accId":"12365498","encryptedsecuritycode":"MTIzZXJkdA==","phonenum":"8895945456","originator":"cavisson"}]}
 WebserviceTest2New :
  headers:
     accept: application/json
     content-type: application/json
     x-pfl-experimentation: V2
  requests:
   - url: http://68.235.60.35:9002/pfl/api/itemAvailability/details
     label: ItemAvailability
     body-text: {"clientXrefDocument":null,"batchCode":"1","reservationNumber":"0","sellAssociateNumber":"01005293","itemList":[{"resgistryNbr":null,"shipToState":"VA","shipMethod":"3","quantityRequested":"1","countryCode":"840","unitPrice":"24.99","requestedOrderMethod":"MO","filLocationNumber":null,"upcNumber":"719812261911","itemAppId":"MCOM","shipToZipCode":"22102","shipMethodOptions":"1","lineNumber":"1","iaType":"MO","priceFlag":"true","priceStatus":null},{"resgistryNbr":null,"shipToState":"VA","shipMethod":"3","quantityRequested":"1","countryCode":"840","unitPrice":"23.99","requestedOrderMethod":"MO","filLocationNumber":"5494","upcNumber":"719812280813","itemAppId":"MCOM","shipToZipCode":"22102","shipMethodOptions":"9","lineNumber":"2","iaType":"MO","priceFlag":"true","priceStatus":null}],"racfId":"yc03466","requestType":"R","referenceId":"271","clientFunctionName":"GA","orderId":"186461346","sellLocationNumber":"139"}
 WebserviceTest3New :
  headers:
     accept: application/json
     content-type: application/json
  requests:
   - url: http://68.235.60.35:9002/pos/EnterprisePaymentServicesv2.0
     label: EnterprisePaymentServices
     body-text: {"RequestType":"Association","Version":"V2","AssociateAccount":[{"accId":"12365498","encryptedsecuritycode":"MTIzZXJkdA==","phonenum":"8895945456","originator":"cavisson"}]}