Improving Unity's testability

Registered by Gema Gomez

The QA teams feel that there is a need of a unit testing suite so that those tests can be run as autolanding tests, and the autopilot test cases should be used later in the development cycle.

Blueprint information

Not started
Gema Gomez
Needs approval
Stephen M. Webb
Series goal:
Milestone target:

Related branches



Making Unity more suitable for unit testing.

Having 100% of unit tests (in the future)

Problems currently identified
Code is not modular (e.g. push alt+tab and you are supposed to scroll through the icons with the mouse wheel, this should have a unit test but this particular code is written in a way that it becomes really hard to write a unit test for).

Proposed solutions
Currently there is no design/architecture document for the code that is about to be written for new features. QA is not involved in the discussions.
Establish a workgroup to architect the launcher properly and add unit test cases.

Other Comments/concerns
This cycle the unity team is going to spend cleaning up the code and making it more testable.
The launcher needs a lot of refactoring but it is the one that would get most of the benefit
Some mocking will be required for some of the features

Areas to be made testable during R
Refactor parts of Unity and choose some bugs will be fixed and refactor the code around them for testability


Work Items

Work items:
[bregma] Set up a review of the existing bugs and identify candidates for refactoring for unit testing: TODO
[thomir-deactivatedaccount] Set up a review of the existing bugs and identify candidates for refactoring for unit testing: TODO
[bregma] rename "make check-headless" to "make check" and make it part of the build process (dh_auto_test): TODO
[didrocks] run make check during packaging build: TODO
[bregma] move the current make check tests to the new "make check" and make them NOT depend on X11: TODO
[bregma] To notify the QA Team (thomir) every time that something is to be rewritten from scratch or heavily rearchitectured so that he can be involved in the architecture: TODO
[thomir-deactivatedaccount] Check with mhr3 about the lenses: DONE

This blueprint contains Public information 
Everyone can see this information.