tree: 3f4f4154ce78753b0a0900ae3ba2785928f2ee8c [path history] [tgz]
  1. .gitignore
  2. conformance.py
  3. README.md
tools/README.md

Description

This script is to run any version of Khronos WebGL conformance test on various OSes (like Android, ChromeOS, Linux, MacOS and Windows) with various browsers (like Chrome, Edge, FireFox, Safari, etc.). Results will be compared with expectations and a final report will be generated.
WebDriver backs the main logic of test automation in this script.

Supported Configurations

Target OS means the OS you run test on, while host OS is the place you run this script. They are same most of time, while Android is the only known exception now.

[1] means the configuration has been tested.

Setup

Android, Linux, MacOS and Windows

ChromeOS

First, a test image is required as the script relies on telemetry. Then you just need to copy the script to your ChromeOS and execute it as others, including Python, webdriver binary, etc., just work out of the box.

Supported Features

  • Multiple Android devices
    You may connect multiple Android devices with your host machine, and use --android-device-id to designate the exact device you will test on.
  • Multiple GPUs
    Multiple GPUs can be installed on same device. Typically, you may have one discrete GPU and one integrated GPU in this scenario. The choice among them can be quite flexible. For example, on MacOS, you may run one application with discrete GPU, while running another application with integrated GPU at the same time. The script will try to check some info from browser at runtime to see which GPU it uses actually. The info of GPU in usage can be very important for the tests. For example, it's important to know how many of the expectations can be applied in current tests.
  • Crash handling
    It's often to see some GPU driver issues crash the browser. To run the whole test suite in a batch, the capability to recover from crash is critical. However, the crash handling can be very complex, due to different browsers under very different situations.
    Currently, some simple but effective crash handling was added, which was verified to be very useful for tests at least with Chrome.
  • Resume from last tests
    We can't always guarantee the tests to be finished smoothly, especially when many crashes are unexpected. The script will record the progress (<work_dir>/log/resume) in details so that you may resume from it next time.
  • Automatic retry
    Sometimes, a test case can be flaky under an abnormal context, and a clean retest can mute this false alarm. A simple retry mechanism is brought for this sake.
  • Expectation as the baseline
    Sophiscated expectations regarding to OS, GPU and browser can be set so that you can always have a clear idea on improvements and regressions.
  • Test with only a subset of all cases
    You may designate a folder or a specific case for testing using option --suite.
  • Extra browser options
    You may pass extra browser options to test script. An intuitive usage of this is to live behind the proxy.
  • Top time consuming cases
    Top time consuming cases will also be listed in final report, which can help to find some performance issue.
  • OpenGL ES
    Sometimes, you want to test against OpenGL ES instead of OpenGL on Linux, and option --gles is your friend here.
  • Self-build Mesa driver
    On Linux, Mesa driver can be used on the fly, which means you may run the system with system graphics stack, while running browser solely with your self-build Mesa driver. Option --mesa-dir can be used for this sake.

TODO Features

  • Python 3 support
  • More support of host_os, target_os and browser combinations, especially for Safari
  • The design of expectations
  • Get more GPU, OS, browser info
  • log_path of geckodriver
  • Run with multiple frames (?frame=x in url)
    This might not be an important feature.