question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to hit each row in payload one time?

See original GitHub issue

First, thanks for this awesome project - truly impressive and extremely useful.

I’m new to it, and I’ve read the docs and looked through the issues, but I can’t find anything related to this.

I’m running a smoke test and I’d like to make one request for each element in my payload csv to ensure that they are loading correctly. Here’s what I’m starting with:

config:
  target: 'https://testing.test-domain.dev'
  plugins:
    expect: {}
  payload:
    path: 'tests.csv'
    order: sequence
    fields:
      - 'uri'
      - 'name'
  tls:
    rejectUnauthorized: false

before:
  flow:
    - log: 'Reinit'
    - get:
        url: '/?reload=true'

scenarios:
  - name: Check Response
    flow:
      - get:
          name: Retrieve Response
          url: '{{ uri }}'
          auth:
            user: '{{ $processEnvironment.user }}'
            pass: '{{ $processEnvironment.pass }}'
          capture:
            - json: $['name']
              as: name
          expect:
            - statusCode: 200

When I run this, only the first uri in my payload is run.

I can get them all to run if I add a phases key, but then I need to limit the VU to 1 and try to define a duration that enables every uri to get tested once, but not multiple times.

Am I configuring this wrong, or is there no way to simply run each element in the payload one time?

Thanks again for the amazing tool!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mjclementecommented, May 27, 2022

🎉 @GeekyDeaks @hassy - y’all are incredible. Thanks for the super-fast and helpful advice. Really appreciate it!

Matching the arrivalCount to the number of rows in the csv worked for what we were trying to do.

Cheers!

1reaction
GeekyDeakscommented, May 27, 2022

Alternatively, you could use arrivalCount instead of arrivalRate in the phases

https://www.artillery.io/docs/guides/guides/test-script-reference#fixed-number-of-arrivals-per-second

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Payload and Towing Capacity! Real Life ...
Does this Sequoia have what it takes to transport 6 adults and their stuff to the campsite while towing a full-size camper? #Towing...
Read more >
Payload | Overwatch Wiki - Fandom
The payload is the objective of an Escort or later half of a Hybrid map. It is always in the shape of a...
Read more >
Mass driver - Wikipedia
A mass driver or electromagnetic catapult is a proposed method of non-rocket spacelaunch ... Sequential firing of a row of electromagnets accelerates the...
Read more >
For Each Scope | MuleSoft Documentation
The For Each scope splits a payload into elements and processes them one by one through the components that you place in the...
Read more >
Calling an AWS Lambda function from another Lambda function
This article describes how to call an AWS Lambda Function from another lambda function.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found