Comments (6)
One disadvantage of the suggested approach is that the precondition tests must be associated with a <test>
tag (conformance class). That is, each precondition may be run (unnecessarily) multiple times rather than just once at the beginning of the test run. It might be better to add the preconditions to a mandatory conformance class and set a flag which is then read to determine whether other conformance classes are run or skipped.
from ets-wfs20.
Maybe call it: preconditions conformance class.
from ets-wfs20.
That would be one approach, but the problem of signalling an unsatisfied precondition between conformance classes remains. Since there is always at least one mandatory conformance class, including the preconditions there makes sense. For example:
<test name="Conformance Level 1">
<packages>
<package name="org.opengis.cite.abc10.level1" />
</packages>
<classes>
<class name="org.opengis.cite.abc10.SuitePreconditions" />
</classes>
</test>
If a test method in SuitePreconditions
detects that a precondition is not satisfied, then a suite attribute is set like so:
testContext.getSuite().setAttribute("preconditions-ok", Boolean.FALSE);
A @BeforeTest method defined for some other conformance class can then check the suite attribute:
Boolean preconditionsOk = (Boolean) testContext.getSuite().getAttribute("preconditions-ok");
Assert.assertTrue(preconditionsOk, "One or more test suite preconditions not satisfied.");
All tests in this conformance class are skipped if any precondition was not satisfied, and the failing test in the mandatory conformance class will indicate what the problem was.
Note: In the test suite definition, the suite/@configfailurepolicy attribute must have the value "skip".
from ets-wfs20.
Maybe, instead of packaging the preconditions as a conformance class, make them part of the most basic mandatory conformance class.
from ets-wfs20.
The advantage of breaking out the preconditions into a separate <test>
group is to make them more visible in the report. And it emphasizes that these checks do not actually correspond to a conformance class defined in some base specification.
<test name="Preconditions">
<classes>
<class name="org.example.testng.demo.SuitePreconditions"/>
</classes>
</test>
If a precondition is not satisfied, it is added to the value of the "failed-preconditions" attribute, and this is checked in subsequent BeforeTest methods in other conformance classes.
@BeforeTest
public void checkPreconditions(ITestContext context) {
Object failedPreconditions = context.getSuite().getAttribute("failed-preconditions");
if (null != failedPreconditions) {
throw new SkipException("One or more preconditions not satisfied: " + failedPreconditions);
}
}
The preconditions--and their descriptions--become much more visible in the report, thus eliminating a potential source of confusion regarding skipped tests.
from ets-wfs20.
How can differentiate these "Preconditions" from a conformance class. Both from a user interface point of view and a program parsing the results?
from ets-wfs20.
Related Issues (20)
- Method selectRandomFeatureIdentifiers can come into an endless loop HOT 1
- NullPointerException when running v1.38 of the WFS compliance test HOT 8
- WFS 2.0 Test - Temporal filter (AfterTests) in US Theme HOT 5
- SR WFS Test - Reports invalid Geometry Operand HOT 4
- GE WFS Test - non Specific BBOX Test - Unexpected Results HOT 4
- GE WFS 2.0 Test - invalid Geometry Operand - java.lang.RuntimeException: Could not create envelope for feature type HOT 3
- HY - intersectsCurve test seems to produce invalid gml:posList HOT 8
- Test "Intersects Polygon" sends invalid geometry HOT 3
- INSPIRE WFS service fails for Temporal and Spatial Filter HOT 11
- Enable support of WFS 2.0.2 and FES 2.0.2 HOT 3
- Could not resolve geotoolkit dependency HOT 2
- Is ImplementsSorting must be TRUE for WFS or INSPIRE download service? HOT 4
- Update dependency ets-gml32 to latest version HOT 4
- Upgrade to TEAM Engine v5.5.2 fails HOT 5
- Direct WFS 2.0 Test - Spatial Filter (invalid Geometry Operand) HOT 1
- WFS fails for bboxWithDefaultExtent and nonSpecificBBOX HOT 8
- Config.xml example file is missing the config tag HOT 2
- Basic WFS getFeaturesByType validation failing - unclear why HOT 3
- aio JAR CLI does not work with acceptMediaType application/zip HOT 1
- Different results between official, beta and IDE on version 1.40 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ets-wfs20.