I've to find a solution for test automation for web gis/mapping application that using OpenLayers 2.x or Leaflet as javascript libraries.

I'm oriented on evaluate Selenium WebDriver (or other similar tools, suggestion? ...): are there somewhere examples / tutorials / experiences or similar?

  • are you trying to test the clients (OpenLayers/Leaflet) or the Server? – Ian Turton Jun 12 '15 at 15:59
  • @iant this is definitely about browser-based testing. – blah238 Jun 12 '15 at 21:31
  • 1
    Related: gis.stackexchange.com/questions/129505/… – blah238 Jun 12 '15 at 21:39
  • @iant: I need to test clients ... – Cesare Jun 13 '15 at 19:08
  • @blah238 your link refers suggestions about ESRI JS API that is not my solution. I'll read it anyway could be that there is something that could be useful – Cesare Jun 13 '15 at 19:11

I've solved using Selenium Web Driver and OpenLayers 2.13.

For those that could be interested you can find some code examples here

https://github.com/cesaregerbino/TestSeleniumWebDriverOpenLayers (in italian)

The examples are the follow:

  • InterActiveZoomIn
  • MeasureAreaOpenLayers
  • IdentifyOpenLayers
  • GetFeatureInfoWMS
  • EditingOpenLayers
  • AreaProject

and, for each, there is the code and the buildfile.

You can find also a short video that shown the result.

I hope that this stuff could be useful.....

| improve this answer | |
  • 1
    From a quick look at your code, it seems there is no automated test outcome verification. In other words a tester has to sit in front of the screen to verify correct behavior, right? – a1an Jul 26 '16 at 14:33
  • Yes. Note that my code is only a "sample code" useful to show the principles.In a "real" code you can implement all the behaviours you like: in my code I just write something in my cmd console (and note that all the tests are ok ....), but I could implement something like send an email to someone, write the results of each action in a database, ecc... – Cesare Jul 26 '16 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.