TestProject Forum
Powered by leading experts in the test automation community

How to submit input parameters via API

Hi Guys,

How do I submit input parameters via API?


Hi @vmvelev,

To submit input parameters to your job, you need to attach a data source file to your test inside your job.
Each test in a job can be linked with a data source file (csv file with values to the test’s parameters).
The attachment of the data source to the test is done in the UI.

At the moment, we do not provide the option to attach a data source file in the API request. This task is in our road map and should be implemented in 2020.
I would really appreciate if you could elaborate about your use case and how would you expect to use this feature. It can help us a lot :slight_smile:

Kind regards,

Hello Amit,

We have a website where we do registrations, and most of the data is the same. For example, we have the following:

  • Name
  • Company
  • Email
  • Phone
  • ID
  • Two dropdowns

Our tests include different names (specific and different every time, provided by our developers), and we would like to submit API calls, changing the name only. It would be much more comfortable without CSV.
It would be perfect if we can submit the input parameters in the JSON request.

Kind regards,

Thank you @vmvelev for sharing your use case with us!
I will forward it to the R&D so that they would be aware of it and include it in the task specifications.

1 Like

Thanks a lot @amit.yahav!
It will be great seeing this in production soon :slight_smile:

I guess this topic can be locked until this is released.
Kind regards,

I too have the same need for my tests. I want to be able to register a lot of different users for my tests and I cannot use repeat data so a way to randomize some parts of different inputs like adding different numbers to the end of a string and then saving that data for use in other tests would be great. An example would be something like:

for each registration then being able to call that data back in a later test

You can use one of these addons to create random users (press + add step -> action-> random)

  1. https://addons.testproject.io/random-login-credentials
  2. https://addons.testproject.io/random-data-generator with User+Random number

then save these values in project parameters, they are accessible from all tests and can be updated in real time

Hi Venelin, Submitting input parameters to a tests in now available via API :slight_smile:

now you can pass parameters to jobs in runtime

Use this endpoint https://api.testproject.io/docs/v2/#/Jobs/Jobs_RunJobAsync