Forum Discussion

ocherevkova's avatar
ocherevkova
Occasional Contributor
3 years ago

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?

  • richie's avatar
    richie
    3 years ago

    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

     

     

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

     

    as follows:

     

     

    Cheers,

     

    Rich

  • richie's avatar
    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
  • ocherevkova's avatar
    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.

    • richie's avatar
      richie
      Community Hero

      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

       

       

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

       

      as follows:

       

       

      Cheers,

       

      Rich