L
L
lostpassword2014-11-27 22:37:38
Software testing
lostpassword, 2014-11-27 22:37:38

What would you choose for UI testing of a desktop application?

Hello.
Situation: there is a desktop application in C #, which is being written on the sly. I want to know if there is a way to automatically test it.
Roughly speaking, the user opens a form, enters data, then opens another, enters, then looks at the result, which is displayed on several tabs. I would like to prepare several (10-20-30) examples - and run them, automatically checking the result.
I'm not a rich person, I won't buy Visual Studio Ultimate. And in general, in terms of money, the absolute ceiling is somewhere around 1000 rubles a month (and even then the toad will suffocate me), so I would like something free.
one.When talking about testing, unit tests usually come up - but I honestly don't see how they will be useful to me in this situation. Quite a lot of logic is tied to the events of UI components, and I don’t really know how to emulate, say, a click on a table cell. It is important to emulate a click , because theoretically I can screw up with the handler. Again, I am not yet ready to delve deeply into the technology of unit tests. Is it worth digging in this direction?
2. For tests of the UI itself, I don’t know any tools. The maximum that comes to mind is AutoHotKey - but it will not be very easy to read the result with it. Has anyone had experience with similar events?
Look like that's it. Thanks for the advice, if any.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vyacheslav Smirnov, 2014-11-27
@lostpassword

Used TestComplete. The tool is good. Paid. The debugger works best if the project language is Delphi Script.
1. Separate the logic of the application from the forms. So that in form events only methods of the main class are called. In my own developments, I do not always follow this rule, but I do. There is a text field on the form, and the parameter of the string type in the method. The form has a table with four columns, the method has a list of classes (there are four fields in the class). Etc.
Unit tests are already being written for the main class.
2. Using tools such as TestComplete, it is convenient to write regression tests to check the correctness of displaying pre-prepared data. And it is extremely difficult to check the logic of work with clicks.
Adviсe:
- after each action, check the absence of dialogs with errors and the absence of errors in the logs;
- allocate time to prepare test data, good test data in visual tests is extremely important;
- write short tests (open, check, close), do not write tests that last longer than 20-30 seconds.
You will have to develop an API, at least for such frequent actions as "open" and "close" and an API for checking the results (accessing the database, files, logs). Visual tests pay off if you declare support for multiple configurations (the interface is the same, but the environment is different - operating systems, databases, settings, font options, ...). If you want to test only on one configuration, then automate the minimum of operations, do not complicate.

O
Oxoron, 2014-12-02
@Oxoron

If you already have Premium Studio -
Coded UI Tests. Created just for UI testing.
habrahabr.ru/post/97012 - for the old 2010 version of VS. In 2012, they didn’t change much, I haven’t tried the above yet.
If there is no premium - 1000 rubles, alas, do not meet.
Digging in the direction of Unit-tests is worth it anyway. In addition to the base in the form of Art Of Unit Testing, you can read this friend here: sergeyteplyakov.blogspot.ru

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question