T03 Remove the MD5 approach and create a new API semantic¶
This milestone is the first one with a heavy programming work and implies that there is a lot of changes in openQA. This milestone cover actions related with the remove of the MD5 mechanism to assert when a image status is present. We replace all this logic using the openCV binding developed in the previous milestone.
We have defined a new concept to replace the MD5 hash, and is the needle. A needle is an image (PNG) screenshot with a JSON document that describe the image and point one or multiple areas of interes. Every area can be included, excluded or converted to text via an OCR. There is a new API to access this needle database, and a new assert function: waitforneedle() that can query an array of needles and wait until some of the areas are found in the virtual environment. Many of the API changes and new needle format are documented in the doc files.
We have replaced the gorc ORC with Tessearc to improve the recognition accuracy and to allow more flexibility in the future, like, for example, training the recognition database with a different font set.
We also have implemented a goanclick() function, that allow to the test developer find a specific area in the screen and move the mouse cursor over it, and simulate the click action. There is a bug in QEMU (reported by the Bernhard Wiedemann) that avoid this action in the actual version of QEMU, so, we have patched QEMU to fix the bug. Also we have remove the old video tool (ffmep2theora) with a more simple one. All this new tools are now in their own devel:openQA repository, in advance of one of the last milestone of the project.
But the more bigger task is the recreation of all the needles and all the test to support the new API and the new screen format, for the four main images of openSUSE distribution.
Because T03 is a big change in openQA, we have decided that is a good moment to start putting the project in a shape that can be actually integrated with the main openQA branch. In order to do that we have created a new milestone that address all the tasks related with this work.
Status of current stage¶
Remove the MD5 approach and create a new API semantic
Task or subtask Completed Notes
Adapt the test definitions to the new matching (action #259) yes
Replace the image matching based on md5 sums by openCV (action #263) yes
make license warning clever (action #281) yes [1]
find out what distri/opensuse/inst.d/040_spashscreen.pm is all about (action #282) yes
add function to verify a needle is no longer present (action #283) yes [2]
find out what livecdreboot handles for users-reboot (action #284) yes
Test Tesseract as a better OCR (action #297) yes
Cretate goandclick API function (action #298) yes
Refactor needels to remove the good label for tag (action #299) yes
Add checkneedle method to the API (action #300) yes
Write needle DB query API (action #301) yes
Create needles for DVD installation (action #302) yes
Create needles for NET installation (action #303) yes
Create needles for KDE installation (action #304) yes
Create needles for GNOME installation (action #305) yes
Create a way to filter the needles that are used in the test (action #310) yes
Notes
- This task is closed here and delayed
- This task is closed here and delayed
Edit the tasks for the next stage¶
We defined the tasks for T03B. Merge openQA changes to upstream
This stage is new and was not predicted in the initial project definition. With this tasks we can assure that part of the work done in this iteration can be accessed in the main openQA version.
Define the tasks for the next+2 stage¶
We defined the tasks for T04. Configure a generic time-out
We are evaluating to avoid this T04 milestone, and go directly to T05. The main reason for that is that this task is small and maybe not critical for this openQA version. The main timeout is used when a test fail, but we can propose better ways to inform that a test has failed that this timeout approach.
Conclusion¶
Go.
Updated by aplanas over 11 years ago · 2 revisions