Skip to content

Commit

Permalink
Merge pull request opengeospatial#27 from opengeospatial/develop
Browse files Browse the repository at this point in the history
Remove SERVICE_URL parameter and update changelog.adoc
  • Loading branch information
ghobona authored Jan 13, 2023
2 parents 8de1251 + b3ec635 commit 589d6c4
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/opengis/cite/wps20/CommonFixture.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ public void initCommonFixture(ITestContext testContext) {
if (null != obj) {
this.client = Client.class.cast(obj);
}
obj = testContext.getSuite().getAttribute(SuiteAttribute.TEST_SUBJECT.getName());
/*obj = testContext.getSuite().getAttribute(SuiteAttribute.TEST_SUBJECT.getName());
if (null == obj) {
throw new SkipException("Test subject not found in ITestContext.");
}
}*/

/* Define SERVICE_URL parameter */
Object ServiceUrlObj = testContext.getSuite().getAttribute(SuiteAttribute.SERVICE_URL.getName());
Expand Down
17 changes: 9 additions & 8 deletions src/main/java/org/opengis/cite/wps20/SuiteFixtureListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void onFinish(ISuite suite) {
void processSuiteParameters(ISuite suite) {
Map<String, String> params = suite.getXmlSuite().getParameters();
TestSuiteLogger.log(Level.CONFIG, "Suite parameters\n" + params.toString());
String iutParam = params.get(TestRunArg.IUT.toString());
/*String iutParam = params.get(TestRunArg.IUT.toString());
if ((null == iutParam) || iutParam.isEmpty()) {
throw new IllegalArgumentException("Required test run parameter not found: " + TestRunArg.IUT.toString());
}
Expand All @@ -77,16 +77,16 @@ void processSuiteParameters(ISuite suite) {
} catch (Exception x) {
throw new RuntimeException("Failed to parse resource retrieved from " + iutRef, x);
}
suite.setAttribute(SuiteAttribute.TEST_SUBJECT.getName(), iutDoc);
suite.setAttribute(SuiteAttribute.TEST_SUBJECT.getName(), iutDoc);*/

/* Define SERVICE_URL parameter */
String ServiceUrlParam = params.get(TestRunArg.SERVICE_URL.toString());
String ServiceUrlParam = params.get(TestRunArg.IUT.toString());
if ((null == ServiceUrlParam) || ServiceUrlParam.isEmpty()) {
throw new IllegalArgumentException(
"Required test run parameter not found: " + TestRunArg.SERVICE_URL.toString());
"Required test run parameter not found: " + TestRunArg.IUT.toString());
}
String ServiceUrlRefString = params.get(TestRunArg.SERVICE_URL.toString());
suite.setAttribute(SuiteAttribute.SERVICE_URL.getName(), URI.create(ServiceUrlRefString));
//mapping TestRunArg.IUT to SuiteAttribute.SERVICE_URL
suite.setAttribute(SuiteAttribute.SERVICE_URL.getName(), URI.create(ServiceUrlParam));

/* Define SERVICE_URL parameter */
String EchoProcessIdParam = params.get(TestRunArg.ECHO_PROCESS_ID.toString());
Expand Down Expand Up @@ -136,8 +136,9 @@ void processSuiteParameters(ISuite suite) {

if (TestSuiteLogger.isLoggable(Level.FINE)) {
StringBuilder logMsg = new StringBuilder("Parsed resource retrieved from ");
logMsg.append(iutRef).append("\n");
logMsg.append(XMLUtils.writeNodeToString(iutDoc));
//logMsg.append(iutRef).append("\n");
//logMsg.append(XMLUtils.writeNodeToString(iutDoc));
logMsg.append(ServiceUrlParam).append("\n");
TestSuiteLogger.log(Level.FINE, logMsg.toString());
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/org/opengis/cite/wps20/TestRunArg.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ public enum TestRunArg {
* metadata about it.
*/
IUT,
SERVICE_URL,
ECHO_PROCESS_ID,
ECHO_PROCESS_ID
/*SERVICE_URL,
GC_XML_URI,
DP_XML_URI,
EX_SNC_XML_URI,
EX_ANC_XML_URI,
EX_ATO_XML_URI;
EX_ATO_XML_URI*/
;

@Override
public String toString() {
Expand Down
16 changes: 6 additions & 10 deletions src/main/scripts/ctl/wps20-suite.ctl
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,21 @@
<li>Synchronous WPS</li>
<li>Asynchronous WPS</li>
</ul>
<p>To quality for Compliance certification, a product has to:</p>
<ul>
<li>Pass both the Basic and Synchronous WPS tests, or</li>
<li>Pass both the Basic and Asynchronous WPS tests</li>
</ul>
</div>
<fieldset style="background:#ccffff">
<legend style="font-family: sans-serif; color: #000099;
background-color:#F0F8FF; border-style: solid;
border-width: medium; padding:4px">Implementation under test</legend>
<p>
<label for="uri">
<h4 style="margin-bottom: 0.5em">Location of IUT (absolute http: or file: URI)</h4>
<h4 style="margin-bottom: 0.5em">Location of IUT (absolute http: URI)</h4>
</label>
<input id="uri" name="uri" size="128" type="text" value="https://geoprocessing.demo.52north.org/javaps/service" />
</p>
<p>
<label for="service_url">
<h4 style="margin-bottom: 0.5em">Endpoint for testing WPS Service</h4>
</label>
<input id="service_url" name="service_url" size="128" type="text" value="https://geoprocessing.demo.52north.org/javaps/service" />
</p>
<p>
<label for="echo_process_id">
Expand Down Expand Up @@ -105,9 +104,6 @@
<xsl:value-of select="normalize-space($form-data/values/value[@key='uri'])"/>
</entry>
<entry key="ICS"><xsl:value-of select="$form-data/values/value[@key='level']"/></entry>
<entry key="SERVICE_URL">
<xsl:value-of select="normalize-space($form-data/values/value[@key='service_url'])"/>
</entry>
<entry key="ECHO_PROCESS_ID">
<xsl:value-of select="normalize-space($form-data/values/value[@key='echo_process_id'])"/>
</entry>
Expand Down
5 changes: 5 additions & 0 deletions src/site/asciidoc/changelog.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
= Release Notes
== 0.3 (2023-01-16)
* [#26](https://github.com/opengeospatial/ets-wps20/issues/26) Enhance documentation by description of basic conformance classes
* [#21](https://github.com/opengeospatial/ets-wps20/issues/21) Organise the packages into separate Conformance Classes
* [#9](https://github.com/opengeospatial/ets-wps20/issues/9) Remove SERVICE_URL parameter
* [#8](https://github.com/opengeospatial/ets-wps20/issues/8) Separate the tests into different java packages

== 0.2 (2022-11-23)
* [#23](https://github.com/opengeospatial/ets-wps20/issues/23) Update documentation for v0.2
Expand Down
5 changes: 5 additions & 0 deletions src/site/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Support for the following conformance classes is tested:
* Synchronous WPS
* Asynchronous WPS

To quality for Compliance certification, a product has to:

* Pass both the Basic and Synchronous WPS tests, or
* Pass both the Basic and Asynchronous WPS tests

== Test requirements

The documents listed below stipulate requirements that must be satisfied by a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import static org.mockito.Mockito.when;

import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
Expand Down Expand Up @@ -59,14 +60,14 @@ public void processIUTParameter() throws URISyntaxException {
URL url = this.getClass().getResource("/atom-feed.xml");
Map<String, String> params = new HashMap<String, String>();
params.put(TestRunArg.IUT.toString(), url.toURI().toString());
params.put(TestRunArg.SERVICE_URL.toString(), url.toURI().toString());
//params.put(TestRunArg.SERVICE_URL.toString(), url.toURI().toString());
params.put(TestRunArg.ECHO_PROCESS_ID.toString(), url.toURI().toString());
when(xmlSuite.getParameters()).thenReturn(params);
SuiteFixtureListener iut = new SuiteFixtureListener();
iut.onStart(suite);
verify(suite).setAttribute(
Matchers.eq(SuiteAttribute.TEST_SUBJ_FILE.getName()),
Matchers.isA(File.class));
Matchers.eq(SuiteAttribute.SERVICE_URL.getName()),
Matchers.isA(URI.class));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ public void loadDefaultTestRunProperties()

@Test
public void doTestRun() throws Exception {
URL testSubject = getClass().getResource("/atom-feed-2.xml");
this.testRunProps.setProperty(TestRunArg.IUT.toString(), testSubject
.toURI().toString());
//URL testSubject = getClass().getResource("/atom-feed-2.xml");
//this.testRunProps.setProperty(TestRunArg.IUT.toString(), testSubject
// .toURI().toString());
ByteArrayOutputStream outStream = new ByteArrayOutputStream(1024);
this.testRunProps.storeToXML(outStream, "Integration test");
Document testRunArgs = docBuilder.parse(new ByteArrayInputStream(
Expand Down

0 comments on commit 589d6c4

Please sign in to comment.