X
X
xSkyFoXx2012-10-14 21:35:57
Automation
xSkyFoXx, 2012-10-14 21:35:57

How to write automated tests for desktop applications?

I have a fairly large desktop application, which is a collection of forms with a set of controls. I have a collection of basic scripts, from the section "press button A, window B appears, enter 123 in it and click OK, if window C does not appear after that, then the regression test failed." Now this is done manually. How can this process be automated? What means, applications, frameworks? How to make it so that not a person clicks, but the computer itself clicks and writes to the log if the program did not behave as written in the script?

Answer the question

In order to leave comments, you need to log in

7 answer(s)
T
TomasHuk, 2012-10-14
@TomasHuk

Tests can be done using Autoit scripts. It supports clicking on controls, manipulating the mouse cursor, entering text/numbers into fields, monitors for window appearances, can write information to logs, and much more. The language, in principle, is not complicated, if you figure it out, it can be great to come in handy.

P
pletinsky, 2012-10-15
@pletinsky

If you write for Windows, then in my opinion the best solution is the Microsoft UI Automation Framework. He can do everything. Autoit is not particularly keeping pace with it. It has a .net access interface .
For various programming languages, there are wrappers for it. A lot depends on what you write on.

C
creage, 2012-10-14
@creage

There is also Autohotkey - quite advanced. I have a friend writing bots on it)
For an enterprise level, you can look at CodedUI. There and integration into TFS, MSBuild with all the consequences.

K
Killy, 2012-10-15
@Killy

Since I found Python in the profile, I nevertheless decided to offer to try Sikuli .
This solution has some limitations compared to the mentioned AutoIt and AutoHotKey. This is primarily due to the portability of scripts.
But there are some built-in goodies for testing .

I
Ilya Sevostyanov, 2012-10-15
@RUVATA

What language? ... perhaps tests can be implemented, right inside your application

3
3dm, 2012-10-15
@3dm

Pay attention also to SilkTest and TestComplete.

V
Vasily Ryabov, 2017-06-08
@vasily-v-ryabov

If PyQt, then on Windows, pywinauto (starting November 2016) can handle it quite well if you use the "uia" backend (more on backends in the Getting Started Guide ), which makes it easier to work with MS UI Automation technology. I already know several people who have automated Qt applications in this way. Questions can be asked on github or there is a Russian-speaking room in the Gitter chat .
If PyQt is on Linux, then here a new backend can be expected next winter-spring.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question