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

Define several urls per entry #2422

Open
lepapareil opened this issue Feb 12, 2024 · 0 comments
Open

Define several urls per entry #2422

lepapareil opened this issue Feb 12, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lepapareil
Copy link
Collaborator

lepapareil commented Feb 12, 2024

Problem to solve

Actually , if I want to test the exact same asserts over 2 or more different urls, I can:

  • Have one hurl file per url
  • Have a single hurl file and duplicate the same entry per url
  • Have a single hurl file with variabilized url and create an execution loop to inject each url
  • Have a custom script that generates hurl files

With Curl I can request multiple urls at once:

$ curl -w "%{http_code}\n" \
    -s -o /dev/null https://hurl.dev \
    -s -o /dev/null https://hurl.dev/docs/manual.html

200
200

Proposal

Allow to define several urls per entry, for example:

  • As arguments like Curl:
GET https://first.com https://second.com https://third.com
HTTP 200
[Options]
variable: urls=https://first.com https://second.com https://third.com

GET {{urls}}
HTTP 200
  • From a captured list:
GET https://example.com/json/list/urls
HTTP 200
[Captures]
urls: jsonpath "$.urls"

GET {{urls}}
HTTP 200
  • For example, if I want to test the perf of all urls on hurl.dev:
GET https://hurl.dev/sitemap.txt
HTTP 200
[Captures]
urls: body replace "\n" " "

GET {{urls}}
HTTP 200
[Asserts]
duration < 200
@lepapareil lepapareil added the enhancement New feature or request label Feb 12, 2024
@jcamiel jcamiel removed their assignment Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants