Skip to main content

Version: 23.10

svc-test-remote

The svc-test-remote task runs a service's unit tests on a remote Journey Manager server.

Task Attributes

All attributes are optional unless otherwise indicated.

AttributeDescription
srcString

The service definition file or root source folder.

nameString

The name of the service to remove.

versionString

The service version number.

urlString

Required. The TM server URL.

usernameString

Required. The TM server login username.

passwordString

Required. The TM server login password.

timeoutString

The connection and socket read timeout in seconds. The default value is 30 seconds.

junitXmlReportString

JUnit XML Report output file.

proxyFileString

HTTP proxy configuration properties file location. For example, "./proxy.properties"

TM Security

To use this task, the user specified by username needs an active user account on the TM server with access to the Management Console module.

To be authorized to call the service, the user account also needs the Management Console permission "REST Service Definitions API".

If the user is not a global administrator, only application packages belonging to the organizations assigned to the user will be accessible. For more information, see Security Managers Overview.

Example

The example Ant task below runs the "TrackMe DD" service's unit tests on a remote Journey Manager server.

<svc-test-remote src="src/trackme-dd/service-def.json"
clientCode="mycorp"
url="https://form.mycorp.com/manager/"
username="[email protected]"
password="password"
timeout="60"
junitXmlReport="target/Test-junit.xml" />

Example Ant log output:

test-remote:
[svc-test-remote] Request: POST https://form.mycorp.com/manager/secure/rest/service-definitions/v1/run-unit-test/ HTTP/1.1
[svc-test-remote] JUnit XML Report: C:\projects\transact-services\target\Test-junit.xml
[svc-test-remote] Success: {
[svc-test-remote] "serviceName": "TrackMe DD",
[svc-test-remote] "versionNumber": 2,
[svc-test-remote] "clientCode": "mycorp",
[svc-test-remote] "testStatus": "Success",
[svc-test-remote] "message": "Test succeeded in 32 ms"
[svc-test-remote] }

C:\projects\transact-services\target\Test-junit.xml