Dynamic data source: How to check whether data exists?
Many use cases, where we need to check, whether the data exists, e.g.
- Get all TCRs of a Test Plan (TCRs might be in trash -> they are in the Test Plan but when requesting them, RPE/PUB crashes with "none of the known protocols succeeded"
I have tried around a lot but did not find an answer yet.
Currently, I'm getting the feed and ask, if TCR is in feed. BUT: automated tests lead to 500k TCRs in project. From performance perspective, asking for existence via feed is not feasible.
Anyone knows, how to test within RPE, whether any ETM source exists?
Something like _sessionInfo.getDatasourceProperty("data", "status code", "") -> 200, 404, 500 ... would be cool.
-> How to reproduce:
- Request "https://server:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/project/executionresult/urn:com.ibm.rqm:executionresult:NOTEXISTS"
- Get executionresult in container
- Print title
- -> In container: CRRPE1064I Error in engine, None of the known protocols succeeded.
3 answers
Thomas,
First of all if You want to filter You should use feed data schema and not full.
Do not get all the TCERs in the project because it is kill for the report and ETM itself.
With feed schema You can use filtering the same as you have in REST APIs.
<feedUrl>?fields=feed/entry/content/testplan[(href='https://...')]/*
Be aware the ETM has different Reportable API from DNG which has some additional advantages.
You will get empty feed is data does not exist. More in this article:
.
Comments
Hi Bartosz. I found another solution, see comment below.
I need that for every single artifact type in ETM, i.e.
- Test Plans
- Tets Suites
- TCRs
- ... anything that can be requested.
For many of the types, needed feed filters do not exists (e.g., I often do not have a Test Plan, only a list of 3.000 TCRs collected from DOORS Classic)