It's all about the answers!

Ask a question

How to fetch the RQM Test data from multiple components using OSLC API?

Karthikeyan P (214) | asked Feb 02, 1:30 a.m.

 I am trying to fetch the testcases/testresults data from RQM using the OSLC API. But I can get the data only for one particular component. I cannot get data from the other components in the project area. I am using the below steps for fetching the data.

1. Fetch the root services document

2. Fetch the list of service providers

3. Fetch the list of services

4. Fetch the testcases using the query capability url

5. Fetch the testresults modified after a particular date using the test results query

But the data is being fetched only from one component. 

Accepted answer

permanent link
David Honey (1.7k17) | answered Feb 02, 6:29 a.m.
edited Feb 02, 11:26 a.m.
I think the issue is that you are not specifying a configuration context in your request to the OSLC query base. See

For example, just now I tried a GET on the query base for a query capabilities for test cases in a project area that has multiple components. If I do not specify a configuration context, I think ETM uses the default configuration for the default component. I see test cases from that one ETM configuration. But if I add a Configuration-Context header set to the ETM stream I am interested in, I see the test cases from that stream. I can repeat for a different ETM stream (and component), and I see test cases from that other stream. I also tried specifying a global configuration, but it appears that ETM chooses the first local ETM configuration in that GC hierarchy.

So I think you will need to perform one query for each ETM configuration that you are interested in.
Karthikeyan P selected this answer as the correct answer

One other answer

permanent link
David Honey (1.7k17) | answered Feb 02, 5:11 a.m.

In most ELM applications, the service provider is specific to a project area, and if it declares any query capabilities, they will only return artifacts for that project area. If you want to query artifacts from multiple project areas, you will need to discover the query capabilities for each project area of interest and query each in turn.

Karthikeyan P commented Feb 02, 5:26 a.m.

 Hi David,

I want to query artifacts from multiple components within a single project area. I have a project area which has two components. One component has 7000 test cases another component has 300 test cases. While using the project area test case query capability, OSLC API is returning only the 7000 cases in the first component. But I would like to have data from both the components.

Karthikeyan P

Ralph Schoon commented Feb 02, 5:38 a.m.

You likely get the data for the default component. You will have to first find the components and somehow provide the configuration for that. I have not looked at the OSSLC API for ETM so much, so I can't tell how to get the components. I think they should be discoverable as well.

Your answer

Register or to post your answer.