I have scripts that generally run as unattended processes. Sometimes I want to run them interactively in Eggplant to see what’s going on.
If a certain variable has not been set, I want to ‘ask’ or ‘answer’ the user for input on what the variable should be. The reasoning is that if the program has not picked up the variable from the runtime environment, then either the user is running the script interactively (the environment is different in that case) or something has gone terribly wrong in the test.
If something has gone wrong in the test, I don’t want my script to sit forever on an ‘ask’ or ‘answer’ when there’s nobody to respond.
I don’t see a timeout on the ask and answer functions. How do you suggest that I get the behavior of:
- Ask the user a question
- If there is no response within a minute, log a test failure.