I am trying to create TCER and TestResults in RQM through OSLC. I have successfully created TestCase in RQM with same approach. But not able to create TCER and TestResult.
if (client.login() == HttpStatus.SC_OK)
{
//STEP 4: Get the URL of the OSLC QualityManagement catalog
String catalogUrl = helper.getCatalogUrl();
//STEP 5: Find the OSLC Service Provider for the project area we want to work with
String serviceProviderUrl = client.lookupServiceProviderUrl(catalogUrl, projectArea);
//STEP 6: Get the Query Capabilities URL so that we can run some OSLC queries
String queryCapability = client.lookupQueryCapability(serviceProviderUrl, OSLCConstants.OSLC_QM_V2,OSLCConstants.QM_TEST_RESULT_QUERY);
// queryCapability = jazzClient.lookupQueryCapability(serviceProviderUrl, OSLCConstants.OSLC_QM_V2, OSLCConstants.QM_TEST_EXECUTION_RECORD_QUERY);
System.out.println(queryCapability.isEmpty());
OslcQueryParameters queryParams = new OslcQueryParameters();
// queryCapability = jazzClient.lookupQueryCapability(serviceProviderUrl, OSLCConstants.OSLC_QM_V2, OSLCConstants.QM_TEST_EXECUTION_RECORD_QUERY);
System.out.println(queryCapability.isEmpty());
TestResult testResult = new TestResult();
testResult.setTitle("summary");
testResult.setStatus("state_id");
testResult.setProducedByTestExecutionRecord(new Link());
//testResult.setReportsOnTestCase(" ");
//Get the Creation Factory URL for test cases so that we can create a test case
String testcaseCreation = client.lookupCreationFactory(
serviceProviderUrl, OSLCConstants.OSLC_QM_V2,
testResult.getRdfTypes()[0].toString());
//Create the test case
ClientResponse creationResponse = client.createResource(
testcaseCreation, testResult,
OslcMediaType.APPLICATION_RDF_XML);
if (creationResponse.getStatusCode() != HttpStatus.SC_CREATED) {
System.err.println("ERROR: Could not create the test case (status " + creationResponse.getStatusCode() + ")\n");
System.err.println(creationResponse.getEntity(String.class));
System.exit(1);
}
creationResponse.consumeContent();
String testcaseLocation = creationResponse.getHeaders().getFirst(HttpHeaders.LOCATION);
System.out.println("Test Case created at location " + testcaseLocation);
//Get the test case from the service provider and update its title property
}