Ask a Question

Load properties from the file if run ReadyAPI from console.

SOLVED
ocherevkova
Occasional Contributor

Load properties from the file if run ReadyAPI from console.

I have Environment properties in the .txt file.

Is there a way to use them if run ReadyAPI from the console?

How to mention taking values from this file?

3 REPLIES 3
richie
Community Hero

Hey @ocherevkova,

What do you mean by console....do you mean the testRunner?

The way i do this is i have a project level .properties file that contains all my environment specific parameters. im typing this on my phone so i cant give you the exact field name, but there is a field in the testRunner config entitled something like "project level parameters".

I copy the content of the .properties file to this "project level parameters" field and then select the "copy to clipboard" button, this copies the command to run the testRunner in headless mode with all the project level parameters included within the command.

Does this help?

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
ocherevkova
Occasional Contributor

No. I wasn't able to find a "copy to clipboard" button beside my project properties. I resolved it via Global properties and then declared them as -G for the testRunner.

Hey @ocherevkova 

 

apologies - it's not copy to clipboard - I don't know if the button text has changed recently or I'm misremembering - but it's a 'Get Command Line' button that generates the full command with all the properties set that does what I was talking about.

 

See image

 

richie_0-1656967949148.png

 

Actually the 'Copy to Clipboard' button is revealed on the form after you've selected 'Get Command Line'

 

as follows:

richie_1-1656968058598.png

 

 

Cheers,

 

Rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
cancel
Showing results for 
Search instead for 
Did you mean: