The Test wms:wmsops-getmap-each-style test generates GetMap requests that appear to have always the same layer, and in turn each style in the capabilities document, instead of matching the style with the layers that do contain it.
For example:
http://localhost:8080/geoserver/wms?SERVICE=WMS&&StYlEs=cite_named_places&BbOx=-2.0,-1.0,2.0,6.0&SrS=EPSG%3A4326&LaYeRs=cite%3ABasicPolygons&WiDtH=100&VeRsIoN=1.1.1&FoRmAt=image%2Fpng&HeIgHt=100&ReQuEsT=GetMap
http://localhost:8080/geoserver/wms?SERVICE=WMS&&StYlEs=cite_road_segments&BbOx=-2.0,-1.0,2.0,6.0&SrS=EPSG%3A4326&LaYeRs=cite%3ABasicPolygons&WiDtH=100&VeRsIoN=1.1.1&FoRmAt=image%2Fpng&HeIgHt=100&ReQuEsT=GetMap
Neither of those styles is associated to BasicPolygons, and GeoServer will refuse to answer those requests because the styles refer to attributes not available in the BasicPolygons feature type.
This is happening on TeamEngine 4.0.3, deployed locally in Tomcat 7, using the r3 WMS 1.1.1 tests
Capabilities document attached for reference.
The ctl file seems to be trying to associate each style to a layer that contains it, but it seems it's failing to do so correctly.
The problem appears to be in this expression:
The position() of the element being tested (Layer) is 1 only for the first layer, but the test won't work for the other layers.
Simply removing that extra check makes the test pass:
Last edit: Andrea Aime 2013-11-23
I see Louis Bermudez merged this change in the WMS 1.1.1 trunk version of the tests, so I guess this one can be closed?