dimanche 2 juillet 2017

Qt C++ Integration tests (webcam, db)

I am developing an app in Qt, which uses webcam and then saves some summary data into the database. I am using Qt except 3rd party library which is used to capture images from webcam and generate needed data.

Question is how can I implement integration tests with QTest?

I mean basically, to be sure, that everything works I need to:

  1. Simulate webcam somehow (pass some video or list of images) so that I can test whether gathered data is correct
  2. Simulate db or create some mock to the Qt db access classes so that I can verify that proper rows are inserted or maybe use some memory db for the test?
  3. Change system clock to simulate timer events - some of the actions in the app are performed after specific amount of time elapsed - how can I simulate that in the tests?

Aucun commentaire:

Enregistrer un commentaire