Loadmill
Learn moreSchedule a demo
  • Introduction
    • Loadmill - AI - Powered Solution
    • Deviceless mobile testing
      • Capturing traffic with Loadmill MITM Proxy
      • Loadmill desktop recorder
        • Generating test flows
      • Installing certificate on mobile devices
        • iOS certificate installation
        • Android certificate installation
      • Configuring proxy on mobile devices
        • iOS Wi-Fi settings
        • Android Wi-Fi settings
      • Troubleshooting
    • What is an API
      • API - Data Fetching
      • Quick examples of API requests
      • What is an API endpoint?
    • API Server Testing
      • Contract testing
      • Regression Testing
  • Quick Guide
    • Create Account
    • Download Test Composer
    • Register your first API flow
    • Running Your API Test
  • Loadmill Test Composer
    • Quickstart
    • Composer Layout
    • Filter Settings
  • Test Editor
    • Layout
    • Flows
      • Generated Flow Code
      • Test Flow editor
      • Flow Controls
      • Add CSV to Flow
      • Flow Execution
    • Steps
      • Request step
      • Code step
      • Extraction & Assertion step
      • Web Socket step
    • Extractions - Set Parameters
    • Assertions - Verify Response
    • Parameters
      • Parameter Execution Order
      • Test Suite Parameters
      • Parameters Sets
    • ⨍(⨯) FUNCTIONS
    • Postscript
      • Running Postscript
      • Accessing w/ Postscript
      • Validating Postscript
    • Login/Authentication Flow
    • Before & After Hooks
  • Load Testing
    • Load Test Editor
    • Load Testing Guide
    • Analyzing Load Test Results
    • Parameterized Load Test
    • Domain Verification
    • Configuration Files
    • Load Testing FAQs
    • Load Testing Troubleshooting
  • User Behavior Testing
    • Overview
    • Setup
    • Recording troubleshooting
    • Additional recording methods
    • Recording settings
    • How to work with Recordings
  • Auth
    • Okta SSO integration
    • API Tokens
    • Testing with CORS
    • REST API
  • Integrations
    • Loadmill Agent
    • CI integration
    • GitHub
      • CI integration
      • Data sync
    • GitLab
    • Bitbucket
    • Jira
    • New Relic
    • Slack integration
    • TestRail integration
    • Database Testing
    • Kafka Testing
    • Datadog Integration
    • ✉️Email Testing
    • Webhook Testing
    • Integrations FAQs
    • XRay
    • TestRail
    • gRPC Support
  • Collaboration
    • Collaboration
    • Teams
    • Groups & Reports
    • Test Suite Collaboration
    • Reviews
    • Shared Flows
    • Labels
  • Reporting
    • API Catalog & Coverage
      • API Catalog
        • Unique Entity ID's Mapping
        • Domain Mapping and grouping
        • Endpoints grouping
        • OpenAPI upload
      • Test Coverage
        • Generating API test coverage report
  • General
    • Billing
      • Usage report
    • Settings
      • 📈Analytics
        • Flow Run History
      • 🧳Import & Export
    • General FAQs
    • General troubleshooting
    • Comparisons
      • Loadmill vs. SoapUI
      • Loadmill vs. JMeter
      • Loadmill vs. Blazemeter
      • Loadmill vs. WebdriverIO
      • Loadmill vs. Potato
    • Miscellaneous
      • Running a Test Suite
      • Test Plan
      • API Testing troubleshooting
      • API Testing FAQs
      • Test Editor
        • API Tests - Data from CSV files
Powered by GitBook
On this page
  • Create a CSV file.
  • Update parameter names.
  • Upload CSV file.
  • Run the suite.
  1. Test Editor
  2. Flows

Add CSV to Flow

PreviousFlow ControlsNextFlow Execution

Last updated 3 months ago

When you're ready to take your automation testing to the next level, it's time to start thinking about testing your flow with multiple variations. This means creating different versions of your test cases and running them against different versions of your software. Doing this can help you find bugs that only show up in specific combinations of your software.

This is important because it helps to ensure that your tests are comprehensive and that they cover all possible scenarios. Creating multiple variations of your tests also allows you to test different parts of the API in isolation, which can be helpful in identifying issues.

Loadmill provides a quick, easy method in testing different iterations of your flow by simply uploading a CSV file containing the different iteration values.

Here's an example for a user management application. This app allows you to add and remove users from your dashboard.

To start with, let's try 5 different email addresses, as well as 5 first names and 5 last names. We'll divide the task into 4 easy steps.

Create a CSV file.

The following table shows the variations we want to test.

The expected_outcome will not be uploaded to the test. This is simply to show you the expected outcome for each variation tested.

email
first_name
last_name
expected_outcome

variation1@loadmill.com

John

Doe

pass

variation2@random.com

Doe2

pass

variation3

VariationThree

fail > wrong email

variation4@

John4

Doe_4

fail > wrong email

variation45@company

John_

$

fail > wrong email

Update parameter names.

The "Create a user" API contains hard-coded values that need to be substituted with the parameter names from the CSV headers (email, first_name and last_name).

To do that, replace the string value to ${...parameter name...}. The ${} wraps the values you set on your CSV file by pointing the parameter name to the column header name.

Request Body (before)

{
  "email": "${__escape_quotes(email_in_request_body_1)}",
  "firstName": "John",
  "lastName": "Doe",
  "customId": "johndoe@loadmill.com",
  "environmentId": "da7167ae9563468a9bcb6eb157011745",
  "tenants": [
    "e7f403f4c30d4bc3840456a7953bedb4"
  ]
}

Request Body (After)

{
  "email": "${email}",
  "firstName": "${first_name}",
  "lastName": "${last_name}",
  "customId": "johndoe@loadmill.com",
  "environmentId": "da7167ae9563468a9bcb6eb157011745",
  "tenants": [
    "e7f403f4c30d4bc3840456a7953bedb4"
  ]
}

Upload CSV file.

Now that you're done, the last step is to upload your CSV file by clicking on the CSV button.

Run the suite.

By running the suite, we see the 5 iterations of the flow we created, each sending the server the values from the uploaded CSV.

We notice that the last two test iterations have passed when the expected outcome would have been to fail. That is a crucial part in testing your server as it allows you to understand how your API behaves in those scenarios.

Overall, creating multiple variations of your API tests is important because it helps to ensure that the API is functioning correctly and that it meets all expectations. By doing so, you can avoid potential issues and ensure that your API is ready for production.