Client for publishing resources directly into HIT MU Tools
<dependency>
<groupId>gov.nist.hit.resources.deploy</groupId>
<artifactId>hit-resource-client</artifactId>
<version>${version}</version>
</dependency>You can create a new instance of the ResourceClient class using the ResourceClientFactory
ResourceClient client = ResourceClientFactory.createResourceClientWithDefault(host, user, pwd);Where :
- host : URL of the api access point
- user : Username of the deployer on the tool server
- password : Password of the deployer on the tool server
public boolean validCredentials()Retuns TRUE if the credentials used to create a ResourceClient instance are correct. (user registred in remote server) Return FALSE if the credentials used to create a ResourceClient instance are incorrect. (user not found in remote server)
All methods take as parameter an instance of RequestModel class which is a POJO with two attributes :
- Id : Id of the containing object if any
- Url : Url of the ziped resource [Always Required]
The methods result is an instance of ResponseEntity<String>
###1. Add or Update TestPlan
public ResponseEntity<String> addOrUpdateTestPlan(RequestModel m)- Required : RequestModel.url
###2. Add TestCaseGroup To TestPlan
public ResponseEntity<String> addTestCaseGroupToPlan(RequestModel m)- Required : RequestModel.url
- Required : RequestModel.id ID of the TestPlan where the TestCaseGroup should be added
###3. Add TestCaseGroup To TestCaseGroup
public ResponseEntity<String> addTestCaseGroupToGroup(RequestModel m)- Required : RequestModel.url
- Required : RequestModel.id ID of the TestCaseGroup where the TestCaseGroup should be added
###4. Update TestCaseGroup
public ResponseEntity<String> updateTestCaseGroup(RequestModel m)- Required : RequestModel.url
###5. Add TestCase to TestCaseGroup
public ResponseEntity<String> addTestCaseToGroup(RequestModel m)- Required : RequestModel.url
- Required : RequestModel.id ID of the TestCaseGroup where the TestCase should be added
###6. Add TestCase to TestPlan
public ResponseEntity<String> addTestCaseToPlan(RequestModel m)- Required : RequestModel.url
- Required : RequestModel.id ID of the TestPlan where the TestCase should be added
###7. Update TestCase
public ResponseEntity<String> updateTestCase(RequestModel m)- Required : RequestModel.url
###8. Add or Update TestStep
public ResponseEntity<String> addOrUpdateTestStep(RequestModel m)- Required : RequestModel.url
- Required if it's a new TestStep : RequestModel.id ID of the TestCase where the new TestStep should be added
###9. Add or Update Context Free TestCase
public ResponseEntity<String> addOrUpdateCFTestCase(RequestModel m)- Required : RequestModel.url
- Required if CF TestCase is new and should be added to a TestCase : RequestModel.id ID of the CF TestCase where the new CF TestCase should be added
###10. Add or Update Integration Profile
public ResponseEntity<String> addOrUpdateProfile(RequestModel m)- Required : RequestModel.url
###11. Add or Update Constraints File
public ResponseEntity<String> addOrUpdateConstraints(RequestModel m)- Required : RequestModel.url
###12. Add or Update Value Set Library File
public ResponseEntity<String> addOrUpdateValueSet(RequestModel m)- Required : RequestModel.url
The main class is located in gov.nist.hit.resources.deploy.client.App
- First generate a JAR file from the project using App class as entry point
- You can then launch the deployer from the command line using java -jar [jar_name]
- To launch the jar you must specify the host, username and password using arguments -h, -u, -p
- If you need help using the launcher you can use -help argument to get indications on the usage
- Once the deployer is launched, a list of commands reflecting the API methods will be shown
- Refer to Methods Documentation to know what arguments are required for each command
- You can use -help on a command to get indication on how to specify arguments
Launching the deployer
./deployer.jar -h [host] -u [username] -p [password]====== Welcome to HIT Resource Deployer ======
To exit enter 'q'
List of possible commands :
- addOrUpdateTestPlan
- addOrUpdateTestStep
- addOrUpdateCFTestCase
- addOrUpdateProfile
- addOrUpdateConstraint
- addOrUpdateValueSet
- updateTestCase
- updateTestGroup
- addTestCaseP
- addTestCaseG
- addTestGroupP
- addTestGroupG
>
Actions :
- Type 'q' to quit the deployer
- Type command name followed by arguments to execute command
- Type 'help' for indications on how to use commands
> help
usage: <command>
-i,--id <arg> id of the container in case of addition
-z,--zip <arg> url of the zip folder containing resource