Question regarding webgl unit testing in continuous integration


I found this blog post ( which describes your continuous integration setup, and I read the chapter on automated testing in WebGL Insights, but I can't get my setup to run using jasmine and karma on our Team City installation. I have a windows 10 agent setup with node and I am running the tests in chrome, but my calls to getContext returns null (this is the method I'm using:

The tests are passing if I kick them off manually in a prompt on my agent, but fails when running through Team City. What am I missing?

The most likely issue you are running into is that the configuration under which TeamCity is running simply does not allow for hardware accelerated 3D graphics to be accessed. This is a common limitation of CI setups. For example, Cesium’s own tests on Travis skip all WebGL related code because we are unable to get a context. We are working around this by implementing a fake context, which you can see in this PR:

Are you in a headless environment, if so that’s almost certainly the problem? If you are not in a headless environment, then I would recommend making sure that whatever user/access configuration you have for TeamCity is allowed to actually leverage hardware acceleration and it’s purely a OS-level permissions issue. In a different life time we used to run OpenGL tests via Cruise Control in a similar manner and had to be physically logged in as the user on the system even though we would kick the tests off remotely.

So the good news is, I believe your problem is completely solvable (and hopefully some of my thoughts help), but I don’t have a straight answer as to exactly what your particular problem is.


Just curious, what are you working on where you want to run the Cesium tests with CI. I think it is fantastic, of course, just interested.