Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to set "timeout after (milliseconds)" with environment variable?

deejay220989
deejay220989 Posts: 4

Hi,

I have a need to set different timeouts for different tests. For instance, when doing a GET, I would like to set it to have a 3 second timeout, whereas for DELETE I would like maybe a 5 second timeout.

I tried using environmental variables but it did not work, the timeout textbox only accepts numeric inputs.

I would like to use environmental variables so that in case I need to change the timeout for all GET calls, I do not have to go to each and every tests to change, but just changing it at one place will do.

Please advise how can I achieve this. In short, I want to be able to set different timeouts for different tests, which can be easily modified in the future.

Tagged:

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,302 ✭✭✭
    edited June 2019

    the timeout textbox only accepts numeric inputs

    Interestingly, I notice that I can type a variable reference but the editor does not let me save after doing so. As you mention, it does not seem to actually accept non-numeric input.

  • deejay220989
    deejay220989 Posts: 4

    Hi @benken_parasoft,

    Yes, that is what I meant. You should be able to type in anything, but as long as it's not a numerical value, you can't save the test.

  • benken_parasoft
    benken_parasoft Posts: 1,302 ✭✭✭

    At present, I believe you have to set the timeout to a fixed value as the field is not parameterizable. However, in case this helps you, if you want to change the timeout later then you could use Parasoft Search (CTRL+H) to quickly find and optionally update the Timeout field in Client tools. Alternatively, you can leave your client tools to inhert the default timeout value so you can change it in one place, the inherited timeout setting from a parent suite or the default timeout from the Parasoft Misc preferences.