fair-acc / opendigitizer

Generic Digitizer Framework based on OpenCMW
GNU Lesser General Public License v3.0
6 stars 3 forks source link

[3SP] UI: Integrate ImGUI test engine into the build #208

Open ivan-cukic opened 2 weeks ago

ivan-cukic commented 2 weeks ago

Add ImGUI test engine to the build and provide an example test (for example, switching between the main application pages)

Only tests that trigger the different functionality, and not tests on visual output.

iamsergio commented 2 days ago

I've got it integrated, just got a question about our plans.

Will we be writing:

1) unit-tests - Each test lives in a separate executable and tests a single reusable GUI component in isolation

or

2) end-to-end tests - Launches the application and goes through a complete use-case testing several GUI components in one go. In this case, please choose between 2.1 and 2.2: 2.1) Each test lives in a separate executable - Requires refactoring main.cpp so each test can share it OR 2.2) Tests are written within main executable and run with opendigitizer-ui --run-tests

Task #207 seems to hint at unit-testing, while this task says "switching between the main application pages", which is more about running the whole application, so I guess we want both styles.

To complete this task, can I follow 2.2, which is straighforward, or do you want me to do 2.1 and refactor the main loop into a reusable library so tests can consume it ?

RalphSteinhagen commented 2 days ago

@iamsergio Yes, both. I think a coarse skeleton-like integration would suffice in the beginning so that other developers can chime in about expanding the tests.

The issue https://github.com/fair-acc/opendigitizer/issues/207 concerns primarily component-based unit tests (i.e., initially, one test per UI widget type). We also need a few visual snapshots for the main UI views—albeit the latter is not all-encompassing testing but just the essentials. We will widen and flesh it out as needed later.

@wirew0rm can fill in the required level of detail and which aspect needs to be done via which issue, if needed.