<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Add screenshooting based testing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83987">83987</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>83980
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Add screenshooting based testing
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ppaalanen@gmail.com
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>weston
          </td>
        </tr>

        <tr>
          <th>Depends on</th>
          <td>83981
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Wayland
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This has several steps:
- add screenshooting to the wl_test extension
- implement it in the test plugin
- make sure it works with the headless backend

In the test framework:
- add a way to fetch screenshots
- add a function to compute a checksum from the screen capture
- add an environment variable, that when set to a directory, all screenshots
will be written there as image files, named based on the test where they came
from

In the applicable tests, mainly those that test that the Pixman and the flavors
of the GL renderer work with the headless backend:
- take a screenshot at the end
- manually check that the recorded image is correct
- hardcode the expected checksum into the code, and make the test fail if the
computed checksum from the screenshot differs

You also needs to make sure that Weston's rendering is completely
deterministic:
- disable random window placement
- ensure the wallpaper is always the same
- ensure the pointer cursors are always the same
- show a fake time in the weston-desktop-shell panel
- ...

The end goal is, that we will be able to easily write more tests, that check
the real output on screen. That tests the whole path from client rendering to
compositor, through compositing, and onto the (fake) screen.

We will also be able to run these tests reliably without any particular
hardware requirements.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>