Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 4 Jahren, 6 Monaten
Letzter Beitrag:
vor 4 Jahren, 6 Monaten
Beteiligte Autoren:
RAUL2, GuenterP

Are automatic tests useful?

Startbeitrag von RAUL2 am 07.10.2013 21:54

Hi All.

I was reading about Automatic Tests but honestly, I don't find any usefulness for this.

What I actually was trying to do is to record some mouse clicks and data input in a window in order to test it. Because I need to do the same things several times, while testing this (or any other) window, it can be really useful to have a kind of macro for the firsts (only) steps.

I've tried, but the behavor is not the one I was expecting. I don't want a testing scenario where the test starts and end, but, I want the first 5 interactions, and keep testing by my own. Is this possible? Any of you are using this feature for this or something else? I've found almost nothing in the search of the forum about Auto Tests.

Best regards.

Antworten:

Hi Raul,

the Tests are there in order to ensure that your application did not change its behaviour though you applied some changes to it. At some other place within the application! A change of a global procedure or of a class could yield unexpected results in places, where you don't expect / want a change of behaviour.

- Test scenarios are generated in WLanguage and you can edit them in the test scenario editor.
- Tests can be applied to the uncompiled product ('GO'-Mode) as well as to the compiled product which is ready to ship.

Imho, keep the Test scenarios as small as possible ('granular'), they can be grouped and run in groups.

If a test scenario is too long for you, just edit it and put away with the unwanted parts.

von GuenterP - am 08.10.2013 06:25
Hi Guenter! I understand now the purpose of Automatic Tests. Thanks!

Do you think there's a way to accomplish what I'm trying to do? Let's say, for instance, that I need to do 10 steps in order to entry a purchase invoice to the app, in "go-mode":

01- Select Supplier.
02- Enter invoice date
03- Enter invoice #
04- Enter invoice type
05- Enter first line of the invoice: product "aaaa"
06- Enter "aaaa" quantity.
07- Enter "aaaa" price.
08- Enter second line of the invoice: product "bbb"
09- Enter "bbb" quantity.
10- Enter "bbb" price.

11- Here I need to folow by my own because I want to test several different stuff each time. It would be really useful that the firsts 10 steps can be done for a kind of macro, because I need to test the window several times. I don't want to do the steps every time I need to test the window.

Maybe you or someone else are using AT or another tool to accomplish something like this?

Best regards.

von RAUL2 - am 08.10.2013 15:08
Hi Raul,
the test-scenarios are stored in WLanguage!! This means, that you can insert additional lines, a loop or even group several tests together and run them at once!

von GuenterP - am 08.10.2013 15:58
Thanks Guenter!

What I've done is this:

* Create a button outside the window border.
* Asign the {Pause} hot key to the button.
* Add a first line to the code of the button: if ontestmode() then return
* Copy and paste the WD code from the test scenario for doing a kind of macro thing, with several steps.

Now, whenever I need to test some behavor of that window I just hit F9 and then Pause key. It works great!

Best regards.

von RAUL2 - am 08.10.2013 22:48
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.