TESTCASES.md 5.2 KB

Test Cases

Series of manually performed test cases for scenarios that are difficult / not feasible to test in an automated fashion.

Verify all sibling tiles load when loadSiblings = true

steps

  1. Open the kitchen sink example.
  2. Ensure loadSiblings is enabled.
  3. Ensure displayActiveTiles is enabled.
  4. Zoom in as much as possible so much of the tileset is not visible.
  5. Wait until all tiles have loaded.
  6. Disable the enableUpdate option.
  7. Zoom out to view the whole tileset.

expected

Tiles are displayed all the way out to the edge of the tileset.

Verify sibling tiles do not load when loadSiblings = false

steps

  1. Open the kitchen sink example.
  2. Ensure loadSiblings is disabled.
  3. Ensure displayActiveTiles is enabled.
  4. Zoom in as much as possible so much of the tileset is not visible.
  5. Wait until all tiles have loaded.
  6. Disable the enableUpdate option.
  7. Zoom out to view the whole tileset.

expected

Only tiles that were visible when zoomed in are displayed.

Verify that active tiles render when displayActiveTiles = true

steps

  1. Open the kitchen sink example.
  2. Ensure loadSiblings is enabled.
  3. Ensure displayActiveTiles is enabled.
  4. Zoom in as much as possible so much of the tileset is not visible.
  5. Wait until all tiles have loaded.
  6. Disable the enableUpdate option.
  7. Zoom out to view the whole tileset.

expected

Tiles are displayed all the way out to the edge of the tileset but they are not when displayActiveTiles is false.

Verify tiles load up to errorTarget option

steps

  1. Open the kitchen sink example.
  2. Open the Javascript console.
  3. Ensure errorTarget is set to 6.
  4. Enable SCREEN_ERROR color mode.
  5. Zoom to various levels.
  6. Click on tiles to view current screen space error in the console.

expected

No tiles are above the 6.0 error target threshold.

Verify parent tiles do not load outside of the errorThreshold option

steps

  1. Open the kitchen sink example.
  2. Set error target to 2.
  3. Set error threshold to 6.
  4. Open the javascript console.
  5. Hit "reload".
  6. Inspect the tileset using the following script:
tiles.traverse( tile => {

  let str = new Array( tile.__depth + 1 ).join( '  ' );
  str += tile.__error.toFixed( 2 );
  str += ' : ';
  str += tile.__loadingState;
  console.log( str )
	return tile.__isLeaf;

} );

expected

Verify that no parent tiles have loaded ( __loadingState = 0 ) if they have a threshold above 18 ( ( target + 1 ) * threshold ).

Verify tiles do not display past the maxDepth threshold

steps

  1. Open the kitchen sink example.
  2. Open the Javascript console.
  3. Ensure maxDepth is set to 2.
  4. Enable DEPTH color mode.
  5. Click on tiles to view current depth in the console.

expected

No tiles are above or equal to the 2 max depth value.

Verify that tiles do not change when update() is not called

steps

  1. Open the kitchen sink example.
  2. Zoom all the way in.
  3. Disable the enableUpdate option.
  4. Zoom out.

expected

Verify tiles no longer update with the camera view.

Verify tiles are only displayed within the camera frustum.

steps

  1. Open the kitchen sink example.
  2. Enable the third person camera view.
  3. Zoom in the main view so part of the tileset is cut off.

expected

Verify only tiles in view of the frustum are displayed in the third person camera view.

Verify that multiple cameras are taken into account when calculating error

steps

  1. Open the kitchen sink example.
  2. Enable the third person camera view.
  3. Enable the second camera view.
  4. Enable GEOMETRIC_ERROR color mode.
  5. Zoom in the both cameras on opposite sides of the terrain so part of the tileset is cut off.

expected

Verify only tiles in view of both cameras frustums are displayed in the third person camera view and that tiles nearest the cameras have the lowest geometric error.

Verify that raycasting works as expected

steps

  1. Open the kitchen sink example.
  2. Enable raycasting.
  3. Hover over the surface of the terrain.
  4. Repeat with firstHitOnly = false.

expected

Verify the hit marker is on the point under the mouse and that the normal lines up with the surface.

Verify that raycasting works as expected with maxDepth = 0

steps

  1. Open the kitchen sink example.
  2. Enable raycasting.
  3. Set max depth option to 0.
  4. Hover over the surface of the terrain.
  5. Repeat with firstHitOnly = false.

expected

Verify the hit marker is on the point under the mouse and that the normal lines up with the surface.

Verify debug bounds display when displayBoxBounds = true

steps

  1. Open the kitchen sink example.
  2. Enable display box bounds option.
  3. Move the camera around and zoom in and out.

expected

Verify the boxes change with the level of detail of the terrain.

Verify it does not pop to higher lod on zoom out

steps

  1. Open the kitchen sink example.
  2. Set the error target to 2.
  3. Set the error threshold to 6.
  4. Zoom in all the way.
  5. Click rebuild.
  6. Wait for all tiles to load.
  7. Set the error threshold to 1000 (or zoom out).

expected

Verify the display does not change and the tiles to not disappear while parent tiles load.