gngrOrg / grinder

a test suite for gngr
Apache License 2.0
4 stars 1 forks source link

Try to parallelise the test running algorithm #22

Open hrj opened 8 years ago

hrj commented 8 years ago

Currently, the test runs sequentially:

  1. Navigate to test URL
  2. Take a screenshot
  3. Compare the test and reference screenshots

If we used a simple actor system, we could do #3 in separate actor.

Down the line we could parallelize it even more:

hrj commented 8 years ago

This could be a very cool task to pickup @atiqsayyed (when you get free).

hrj commented 8 years ago

@atiqsayyed

Thinking more about this: you needn't use actors; it might be simpler to use Futures with an ExecutorService. The advantage of Future is that you can chain operations together easily and let the ExecutorService do the scheduling.

This is a very high level sketch of how this would work:

Hint: the webdriver object will need to be locked till both the screenshots are acquired. Alternatively, the future for getting screenshots should be scheduled on a single threaded executor-service.

atiqsayyed commented 8 years ago

@hrj this is cooooool. . . I'm picking it up!