Data Enabling in JMeter

We will follow the below steps to Data enable the JMeter script and run it successfully in AIQ.

  1. Create a JMeter script that works fine in JMeter and run the same in AIQ to make sure that the script is working fine. The screenshot of the working script is given below

    As from the above example, there are multiple websites that are used in the script. We can store all the above websites in a CSV sheet and have JMeter access the websites from the CSV sheet. The next step would be to data enable the JMeter script and make sure it runs fine.

  2. The next step would be to remove all the individual websites and store that in a CSV sheet and create a single HTTP request and have it access the website from the CSV. Please follow the below steps

    Create a CSV sheet with "Sites" as the column name and all the website details below it as shown below

    Add a CSV Data set config and enter the following details

    Right-click the thread group - Select Add - Select Config element - Select CSV Data Set Config.

    Note: Please make sure to use the data.csv file in the same location as the .jmx project and also CSV Data Set Config should be available on top of HTTP Request.

    Filename: Enter the name of the file

    File encoding: Should be left blank

    Variable Names: Should be left blank, If given data will be picked from the first column and the first entry in the CSV "SItes" will be picked and the script will fail

    Delimiter: Comma

    Add a new HTTP Request Sampler and Use the column name of the CSV sheet in the "Server Name or IP" as shown below

    Once the above setting is done the script is data enabled successfully. Run the script and check in the results tree

    All the values from the CSV have been picked successfully.

  3. Run the Same script in AIQ. Steps are given below

    Login to AIQ and click Build and Click File→New

    Select the Scenario test type as the Performance test

    Select the completion criteria as "Executions per user"

    Go to the Test cases tab and click "Edit" browse the JMeter script and select the JMeter file

    Go to Resources Click "Add Data Source" and browse the CSV file

    Save the scenario and run the test.

    Check the controller page and verify if the data is getting pulled from the CSV

    For Appvance IQ Reporting purposes, instead of reporting different values of a data-enabled script that causes duplicate entries, the parametrized step can be displayed as a variable name that way it does not show them as different steps instead it shows as a summary of those steps just like Appvance IQ designer enabled scripts, below are the steps for the same:

    The usage recommendation for dynamic parameters on how to add parameters so the Appvance IQ report will report the variable and not the different values. Basically, you have the URL's path and a parameters section. You should not put the query part in the path if you want to get a proper report using variable in Appvance IQ. The URL query parameters should go in the parameter section, for both POST and GET requests.

    You can notice in the below reporting, it displays as one step else this would have been displayed as 4 different steps with 4 different values taken from the datasheet.