Quality Center / ALM Practitioners Forum
cancel

HP QC ALM - REST API - bug get all tests from testplan?

Highlighted
Sacroulis
Frequent Visitor.

HP QC ALM - REST API - bug get all tests from testplan?

Hello,

I'm trying to get all tests from a folder but for a reason i don't get all of them.

Here is my request : /rest/domains/DOMAIN/projects/PROJECT/tests?query=PARENT_ID

I only get some tests but not all. Is it a bug or maybe there is another way to get all tests ?

My QC version is : 12.21

Thank you !

 

2 REPLIES
Sacroulis
Frequent Visitor.

Re: HP QC ALM - REST API - bug get all tests from testplan?

Here is the solution : /rest/domains/DOMAIN/projects/PROJECT/tests?query=PARENT_ID&page-size=X&start-index=Y

By default, page-size=100 that's why I don't get all tests.

X is the number of how many tests you can see at same page. Y is the number of how many tests you will "skip".

 

 

hristo_kacarov
Micro Focus Expert

Re: HP QC ALM - REST API - bug get all tests from testplan?

Your finding about default page size is correct, indeed. You can also specify a bigger number so you dont have to add it on each query by defining a new site parameter in ALM Site admin:
Parameter: REST_API_DEFAULT_PAGE_SIZE
Description: The number of entities per page returned by default with each GET operation on a collection using the REST API (unless the API consumer specifies a different page size for retrieval). The default is 100 entities.
Default value: 100
Min value: 1
Max value: 9223372036854775807