Qt "monkey" Testing - simulates random clicks and keystrokes

Is there a structure for simulating a deterministically pseudo-random series of clicks imposed on a Qt application - to try to cause any memory leaks, streaming errors, etc. - typical monkey testing?

Some exotic monkeys use for QTestLib?

+6
source share
2 answers

Yes, you can use the useful unit test module. Take a look at the QTestEventList class in particular. Simply specify the QWidget you want to test, or QMainWindow or any other subclass you want, and add a list of events that you want to create. If you want to create a sequence of points so that you can reproduce in the event of a failure, use qsrand () and qrand ().

+2
source

Squish automated GUI testing system can be used to click monkeys in your application. There are some good things about using Squish for this purpose:

  • Squish works on Windows, Mac, Linux, and Android.
  • It registers any random steps that it performs as a script that can be re-run ( monkey testing documents )
  • He has the opportunity to take a screenshot when the application crashes (screenshot in the failure settings files )

Minuses: Squish is not free. Configuring Squish to run an application can be very annoying, especially if your application requires certain characteristics of a Qt or Python build.

0
source

Source: https://habr.com/ru/post/925034/


All Articles