
694.4 Automated Testing of WebGL Applications
our tests. On the other hand, using a single context for all tests risks a test corrupting
thecontext’s state and causing later tests to fail. In Cesium, we’ve found a good balance by
creating a context for each test suite. A test suite is a single source le that tests a closely
related group of functionality, such as a single class, so it’s usually easy to reason about the
context state changes occurring in the suite.
A single-pixel rendering test like this is far from exhaustive, of course. Because it really
just asserts that the polygon put something on the screen, there are plenty of things ...