Welcome! Log In Create A New Profile

Advanced

Testing with delayed info / error?

Posted by MiellesMain 
Testing with delayed info / error?
January 23, 2023 05:25PM
I have a program that sends data to the internet. When it gets the response, after some time, it will confirm or present an error message. When I build a test for that program, windev seems to be too impatient, saying the program wasn't closed by the test or the expected info / error window didn't show up. Is there a way to tell windev to wait for that to come up?

Even better: is there a way to log the messages during tests, so that I can see them directly after running the tests (without writing to a file etc)
Re: Testing with delayed info / error?
January 23, 2023 05:50PM
Hi, there are plenty of commands to ...

Multitask [help.windev.com]

You could use a while - end loop to wait for a response and you could introduce a Timer to break the loop if it's a 'time out'
e.g.
WHILE MyResponseVariable = ""

END

Kind regards,
Guenter Predl
office@windev.at
Re: Testing with delayed info / error?
January 24, 2023 02:40PM
So you mean, I should add (for example) your WHILE-loop in the automatic test?
Re: Testing with delayed info / error?
January 24, 2023 04:15PM
Hi, a WHILE-END loop is just a suggestion ... what to do if the response time is regularily short but once in while the response takes a very long time? If you do a Multitask(..) and wait a long time, your program wuill be sloow ...

Kind regards,
Guenter Predl
office@windev.at
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: