Make UI tests use a separate userdb
ClosedPublic

Authored by TallFurryMan on Apr 16 2020, 4:28 PM.

Details

Summary

This differential makes UI tests independent on the local user settings by using the Qt Test Mode user. Basically it:

  • Uses test mode to make sure unitary userdb tests use a blank user db.
  • Uses test mode to make sure UI tests start from scratch, as the user folder is completely removed before testing.
  • Provides 'kstarsui.rc' explicitely when initializing KStars, so that (at last!) toolbars and menus are visible.

Now anyone can safely run UI tests without the risk that one's carefully tuned Ekos configuration is lost.

This differential should also fix builds made with no INDI dependency installed.

This differential also reworks the kstars_ui_tests header to (briefly) explain how to create UI tests, and some of the reasons they are written as they are.

Test Plan

Execute kstars_ui_tests.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
TallFurryMan created this revision.Apr 16 2020, 4:28 PM
Restricted Application added a project: KDE Edu. · View Herald TranscriptApr 16 2020, 4:28 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
TallFurryMan requested review of this revision.Apr 16 2020, 4:28 PM
TallFurryMan edited the summary of this revision. (Show Details)Apr 16 2020, 4:37 PM

The Focus test is still quite long because there is currently no way to determine the star detection is finished.
And actually KStars sometimes crashes when a new capture is taken while the detection is still in progress. Another test to be built!

  • Merge branch 'master' into improve__userdb_tests
mutlaqja accepted this revision.Apr 17 2020, 4:40 PM
This revision is now accepted and ready to land.Apr 17 2020, 4:40 PM
This revision was automatically updated to reflect the committed changes.