Skip to content

Feature Request: Support for passing URL files when using the API #153

Open

Description

@pnivetha21

Current Behavior

When using the sitespeed.io CLI with the API to send tests to a remote server, I'm unable to pass URL files directly. For example, when running:

bash

docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:37.6.0 urls.txt --api.hostname example.com --api.port 3000 --api.location default --api.action addAndGetResult

The file path urls.txt is sent as a literal URL to the API server, which then tries to find that file on the server's filesystem. This results in an error:

- Send test to example.com testing urls.txt

✖ The URL https://urls.txt is not a valid URL

How is this handled currently?

I'm curious if there's an existing recommended approach for this use case. Is there a documented way to pass multiple URLs from a file when using the API functionality? I've looked through the documentation but couldn't find clear guidance on handling URL files with the API. Are users expected to extract URLs manually or is there a built-in feature I'm missing?

Expected Behavior

I would like to be able to pass a local URL file to sitespeed.io and have it read the file locally and send the URLs to the API server, rather than sending the file path or send the URL file to the API and process the file and fetch the urls in the server

Use Case

This functionality would enable teams to maintain URL files in version control and use them directly with the API, making it easier to run standardized tests against remote test runners.

Environment

  • sitespeed.io version: 37.6.0
  • onlinetest version: 1.0.0
  • Docker installation
  • URL file format: text file with one URL per line (with optional labels)

Activity

  1. soulgalore commented on May 14, 2025

    @soulgalore
    Member

    Hi @pnivetha21 thank you for creating the issue, yeah I think that's a use case I missed. I need to think if there's a way to implement it. In the mean time you need to add the loop outside of sitespeed.io and iterate of each entry in the file.

  2. pnivetha21 commented on May 27, 2025

    @pnivetha21
    Author

    Thank you for looking into this. Yeah sure in the meantime I am using a script to loop outside of the sitespeed.io and iterate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions