It's all about the answers!

Ask a question

How to get baseline and versions of specific Test Plan, Test case and Requirement


jyoti mishra (4518) | asked Aug 06, 4:43 a.m.

 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


Comments
Geoffrey Clemm commented Aug 06, 9:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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 commented Aug 09, 3:51 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should clarify both what your are trying to do, and why you are trying to do it.   


Are you trying to obtain all versions of a given test plan, the latest version of a given test plan, all baselines that contain any version of a given test plan, all baselines that contain the latest version of a given test plan, the latest baseline that contains the latest version of a given test plan, or something else ?

And once you get that version (or those versions or that baseline or those baselines), what are you planning on doing with it?


jyoti mishra commented Aug 10, 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 commented Aug 10, 4:41 a.m.
 I tried below queries  for:-
Test case:-
String oslcSearchByIdentifierQuery = queryCapabilityURI + 
"?oslc.where=" + URLEncoder.encode("oslc:shortId=" + identifier, "UTF8")+
"&oslc_config.context=https%3A%2F%2Fseu03cg4520%3A9443%2Fgc%2Fconfiguration%2F5";



Geoffrey Clemm commented Aug 10, 11:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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).   

showing 5 of 6 show 1 more comments

One answer



permanent link
Ian Barnard (895612) | answered Aug 06, 6:51 a.m.
JAZZ DEVELOPER
edited Aug 06, 11:25 a.m.
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
jyoti mishra commented Aug 09, 6:53 a.m.
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

David Honey commented Aug 09, 8:36 a.m.
JAZZ DEVELOPER
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:
  1. Include a Configuration-Context header whose value is the URI of a configuration.
  2. Add a oslc_config.context query parameter to the request URI whose value is the URI encoded URI of a configuration.
The current working draft of the OSLC Configuration Management 1.0 specification can be found at https://oslc-op.github.io/oslc-specs/specs/config/oslc-config-mgt.html. It describes the use of that header and query parameter.

Your answer


Register or to post your answer.