Danny Tuppeny
Danny Tuppeny

Reputation: 42343

What are the possible ways of testing visual parts of a WebGL/Canvas-based game

Assuming a game written using Dart + WebGL/Canvas...

Much of the logic, maths, input handling, etc. is easily testable with code; but ensuring you actually do the right thing to make your sprite turn up on screen at the correct location/orientation/etc. is more tricky.

What tools/APIs exist that would assist testing the actual rendered output?

Upvotes: 1

Views: 1381

Answers (2)

Jens A. Koch
Jens A. Koch

Reputation: 41756

Upvotes: 3

markovuksanovic
markovuksanovic

Reputation: 15906

What you could do is take a screenshot (of the actual outcome) and then compare it to some image you already have (expected outcome) to make sure they are the same. You could achieve that using WebDriver.

There is an example implementation which uses Selenium here: https://groups.google.com/forum/#!msg/selenium-users/8atiPIh39OY/Gp9_KEXnpRUJ

Upvotes: 1

Related Questions