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: https://github.com/AnalyticalGraphicsInc/cesium/pull/4827
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.