Data Runner - Yaak Plugin
I'm exploring Yaak plugin API to create a custom plugin.
The goal is to allow users to select a CSV or JSON file and iterate through the rows, running the same requests multiple times with different data each time.
Why is this needed?
This functionality is necessary to validate a dataset without manually creating multiple requests.
How to access Data Runner?
Right-click context menu
New tab in the request template (next to Info)
Create a new Data Runner template function to map to columns in the CSV
Workflow
Navigate to the Data Runner tab.
Select a CSV or JSON file.
The Data Runner function now operates based on column or property names.
Provides Preview and Run Request options.
On Preview, display a preview of all data in a modal dialog.
Upon Run Request, execute all requests in parallel.
Show the status of each request in a list view.
Selecting a request displays its output in the right pane.
Template functions in other requests should refer to the selected request's response payload.
The scope of this feature can be expanded from a single request to an entire folder or even a workspace.
Currently, there are several limitations within the Plugin API.
There's no way to extend the existing request UI in Yaak.
We will revisit this when the Plugin API is more mature, or maybe consider incorporating it directly into the core functionality.
Plugins that provide custom user interface won’t be possible for a while, but I think you could do a very simple version of this with the addition of a file picking API.
The plugin would:
Add a request action that prompts the user to select a CSV
Add another request action to send the request with the CSV data
Read CSV and send all requests in parallel
Display results using dialog API
Would that work? I’m currently adding more plugin APIs to get ready for the launch of a public plugin repository so this is a good time for feedback :)
Yes, this definitely works.
Is it possible to show the response for each result similarly to the default request view in the dialog?
They would appear in the existing response history in the order they were sent. Not the best experience but you’ll be able to see them at least.