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.
Attribute | Description |
---|---|
src | String The service definition file or root source folder. |
name | String The name of the service to remove. |
version | String The service version number. |
url | String Required. The TM server URL. |
username | String Required. The TM server login username. |
password | String Required. The TM server login password. |
timeout | String The connection and socket read timeout in seconds. The default value is 30 seconds. |
junitXmlReport | String JUnit XML Report output file. |
proxyFile | String HTTP proxy configuration properties file location. For example, |
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.
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