Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterate through List of Values #40

Closed
phonique opened this issue Sep 1, 2023 · 4 comments
Closed

Iterate through List of Values #40

phonique opened this issue Sep 1, 2023 · 4 comments
Assignees

Comments

@phonique
Copy link

phonique commented Sep 1, 2023

Hey Alex,

Accidentally found Pororoca and was wondering, if it'd be a big effort (and if you'd find it useful) to add a feature to automatically iterate through a list/array e.g. if you have somedomain.foo/{{User}}/someaction and {{User}} is a list of values, to perform an individual request with each of them and save the responses.

Thanks!

@alexandrehtrb
Copy link
Owner

Hello @phonique ,

This is a great idea. It could be used in many scenarios, like load testing and multiple requests at the same time.

JMeter, for example, allows this kind of multiple parameterized requests by taking values from a CSV input file, and these values can be used in the URL, body and headers. Do you think something similar would fit as a solution?

@phonique
Copy link
Author

phonique commented Sep 3, 2023

Great, that you like the idea, @alexandrehtrb !

A CSV similar to JMeter would certainly work well, as it would then also be possible to have the list generated (externally).
Including a rudimentary way to create a list in the UI would still be very useful for smaller numbers of values.

Admittedly, I haven't looked how the current collections are saved and whether it would break interoperability with postman if you include files (inline?) in there, but if that's possible, a "file" per variable would probably be a straightforward convention to follow.

@alexandrehtrb
Copy link
Owner

alexandrehtrb commented Nov 24, 2023

Take a base HTTP request

Input data:

  • None
  • Raw JSON array: an array of objects, each object has a string key with a string value, each key-value will be a variable to be considered in URL, headers and req body
  • File: same as above, but from a file

Repetition modes:

  • Simple: fixed number of requests, no input data
  • Sequential: use input data sequentially until all input lines are used. No need to speciify number of requests
  • Random: fixed number of requests, for each request, randomly select a input line from input data

MaxDOP: maximum number of parallel requests

Report:

  • Response time (each request)
  • Success rate (each request)
  • Average success
  • Average response time
  • Total requests sent
  • Total success responses

-> Show input line used for each request
-> Button for saving a response body
-> Needs to work for Pororoca.Test automated tests too
-> Example of JSON array input data, each object is an input line:

[
  {
    "MyVar1": "123",
    "MyVar2": "ABC"
  },
  {
    "MyVar1": "456",
    "MyVar2": "DEF"
  }
]

@alexandrehtrb alexandrehtrb self-assigned this Feb 7, 2024
@alexandrehtrb
Copy link
Owner

Solved in release 3.1.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants