How to get baseline and versions of specific Test Plan, Test case and Requirement
Hello Everyone,
I would like to know the OSLC API or reportable rest API to fetch baseline or versions of Test plan ,Test cases and Requirement, based upon identifier or title of Artifacts.
Kindly help at the earliest.
Thanks and Regards,
Jyoti
One answer
Hi Jyoti
For Reportable Rest you'll have to know the configuration URI then use the QM reportable REST API providing that configuration as parameter oslc_config.context. See https://jazz.net/wiki/bin/view/Main/RqmApi#Resources_and_their_Supported_Op
For OSLC the TL;DR version is: it's very similar to the way you find stuff in DOORS Next.
You'll have to locate the QM project in the oslc catalog, get the default component creation factory which will give you the components, and get from the component URI to retrieve URLs for configurations in the component - this is pretty much the same discovery sequence as for DOORS Next.
Presumably you'll scan the configurations of the component to find the one with the name you want, and find its configuration URI - again this is basically the same as for DNG.
Or it should work to provide a global configuration URI rather than local - to find the GC URI you can use GCM API - documentation is provided on your server in web pages below https://SERVER:PORT/gc/doc
One difference from DN where there's only one query capability across all resources, is that EWM/RQM has separate query capability for TestCaseQuery (for test cases) and TestPlanQuery (for test plans), i.e. two queries needed - you can find these in the services.xml for the component, making sure to specify the configuration in the request.
Then provide the configuration URI as a parameter oslc_configuration.context, or as a header Configuration-Context and use OSLC Query e.g. oslc.where=dcterms:title="Title Of Thing" (fully encoded, of course) to find the test plans/test cases in that configuration and for each result URI retrieve the RDF again using the same configuration URI. The OSLC query works the same as for DOORS Next, although the detail of the format of the query results is likely to be different from DN.
Good Luck!
Ian
Comments
I referred the url- "https://jazz.net/gc/doc/scenario?id=QueryConfigurations",but not getting how to fetch latest baseline of Test case ,Test plan and requirements based upon Identifier or title of Test case ,Test plan and requirements.
Request URL:-GET query-base?oslc.where=dcterms%3Atitle%3D%22%25preamplifier%25%22"
In this what is query-base.
I have also tried another query:-https://seu03cg4520:9443/gc/configuration/5,where 5 is test case id,in this I am able to get baseline Name, but not understanding how it will work ,if Test case and Test plan is having same id, it is also not filtering based upon project Area.
Kindly guide me by providing simple oslc query for fetching baseline based upon some filtered condition.
Thanks ,
Jyoti
That scenario describes how to query global configurations in the GCM application using an OSLC query. GCM knows nothing about ETM artifacts.
To query ETM artifacts using an OSLC Query (https://docs.oasis-open-projects.org/oslc-op/query/v3.0/ps01/oslc-query.html), you use an OSLC query capability from ETM's OSLC Service Provider Catalog. To limit the query results to the versions selected by a configuration context, do either of:
- Include a Configuration-Context header whose value is the URI of a configuration.
- Add a oslc_config.context query parameter to the request URI whose value is the URI encoded URI of a configuration.
Comments
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 06 '21, 9:42 a.m.Note that as detailed in Ian's answer, you need to have both an identifier for the artifact (Test Plan, Test Case, Requirement), and an identifier for a configuration (stream, baseline), in order to fetch a specific version of that artifact (namely, the version of that artifact selected by the given configuration).
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 09 '21, 3:51 p.m.You should clarify both what your are trying to do, and why you are trying to do it.
jyoti mishra
Aug 10 '21, 4:40 a.m.I am trying to fetch the latest version/Baseline of a given test plan, test case or requirements. Once fetched, automatically link Testcase with requirements .Please let me know how we can fetch latest baseline of given test case/test plan, where GC applied.
jyoti mishra
Aug 10 '21, 4:41 a.m.jyoti mishra
Aug 10 '21, 4:51 a.m.I tried below query for Requirement, but not getting expected response:-
Geoffrey Clemm
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Aug 10 '21, 11:02 a.m.ELM supports multiple streams, so there is no single "latest version" ... each stream has its own latest version. That is why you have to specify which stream you are interested in, in order to get the latest version (for that stream).