Go back to all articles

API Micro Focus ALM and Performance Center: Basics for Performance Testing Engineers

Feb 15, 2022
7 min read

In this post, we are sharing our experience of using API Micro Focus ALM in the hope that load testing engineers who use LoadRunner or Performance Center will find it interesting. Working with API is useful for test automation, and/or to prepare for test launch with Jenkins or similar tools. We collected this list of examples and useful functions based on our experience, but you might also find good tips on Micro Focus’s own webpage.

Reading further, you will find a description of the main actions needed when creating an automation tool using the API service Application Lifecycle Management (ALM), which is used primarily to manage LoadRunner projects. The version we used when writing this post was ALM 12.60.

Test Automation

What is test automation?

Automated testing is a method in software testing that leverages automation tools to control the execution of tests instead of a human tester. It then compares actual test results with predicted or expected results. Automated testing offers greater efficiency and faster time-to-market for your projects. In PFLB, we often automate tests using HP ALM or Performance Center to save our clients’ time and money.

Where to use automated tests?

Automated tests are widely used in regression testing, during development, in DevOps, and even in production environments. With mobile test automation, you can quickly scale your tests and boost coverage to accelerate delivery. Of course, no software can operate without an experienced testing engineer, otherwise we wouldn’t have 400+ of them on staff, but automated tests save time of these highly valuable specialists, letting them focus on challenging tasks instead of manually running the tests.

What is HP ALM?

HP ALM (Application lifecycle management) is a web-based tool that helps organizations to manage the application lifecycle right from project planning, requirements gathering, until testing and deployment, which otherwise is a time-consuming task. It enables all the stakeholders, namely, project managers, developers, testers, product owners, and business analysts, to interact and coordinate to achieve the project goals.

You will find some basics of how to use the API service Application Lifecycle Management (ALM) in the next part of the article. We do hope it will help you automate testing for your project.



The full address is formed according to the following formula:

Url + /API_TYPE/rest/domains/ + Domain + /projects/ + Project + …

An example:


Most of the pages can be viewed in both API ALM and API Performance Center (hence, both are mentioned above as API_TYPE).

/qcbin/ – API ALM

Main pages:

  • runs
  • tests
  • test-instances
  • test-folders
  • defects

/LoadTest/ – API Performance Center

Main pages:

  • runs
  • tests
  • testInstances

Except for the syntax in the names of the pages, most of the actions in these two APIs are the same.

Main Pages


Contains data on test runs.


You can request data about a specific test run:

…/runs?query={…} – filtering by query

…/runs/11111 – data on the test run with ID 11111

Actions with a specific running test:

…/runs/11111/Extended – extended data on the run

…/runs/11111/stopNow – stop the running test

If /runs/ contains many tests, a request without a date may return only a partial list.


Contains scripts for the Project.


An example of a request:

…/tests/11111 – data for a script with ID 11111


Contains test instances needed for launch.


An example of a request:

…/test-instances/11111 – data for an instance with ID 11111

Read further to find out how to authorize, which parameters to use, and what operations to apply in ALM.

Authorization in ALM

Sends a GET-request to an address:


With headers:

  • Content-Type: application/json
  • Authorization: Basic [authorization code]

An example of setting headers in Java:

HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setAccept(Arrays.asList(new MediaType[]{MediaType.APPLICATION_JSON}));
httpHeaders.set("Authorization","Basic [authorization code]");

Cookies are selected from the response:

  • LWSSO_COOKIE_KEY – for authorization
  • QCSession – to keep the session alive
  • XSRF_TOKEN – to keep the session alive

Those cookies are attached to further requests to ALM in the Cookie header.

An example of an attached Cookie in Java:

httpHeaders.set("Cookie", almdto.getLWSSO_COOKIE_KEY());
Looking for Performance and Load Testing Provider?
Drop us a line. Most likely, we have already dealt with problems like yours in the previous 300 projects.




  • GET
  • HEAD

It includes the response format. Such a request is equal to using the header Accept.






  • GET for lists.

It brings back particular fields of elements from the list instead of all the fields. You can’t use it for singular elements.

Fields are divided with a comma. Fullstop shows which element of the page is the field related to.


…/tests?fields=id – ID field for all the scripts

…/tests?fields=id,name – ID and name fields for all the scripts

…/tests?fields=id,test-folder.id – ID and test-folder.id fields for all the scripts

…/tests?fields=id,t-fldr.id,t-fldr.name – ID, t-fldr.id and t-fldr.name fields for all the scripts



  • GET
  • POST

Sorts results by a determined parameter. Fields and ascending/descending sorting can be included in the parameter.

Fields are put in squiggle brackets and divided by semicolon. Type of sorting is put in square brackets after the field name. Default sorting type is ascending.

  • [ASC] – ascending
  • [DESC] – descending




…/tests?order-by={id[ASC]} – sort by ID, ascending. 

…/tests?order-by={status[DESC];name[ASC]} – sort by status, descending, and name, ascending.

…/tests?order-by={status;name[ASC]} – sort by status, ascending, and by name, ascending.

Used with fields:


If order-by parameter is not used, default sorting is by ID of the element.



  • GET
  • POST

Used to limit the size of the response or the number of elements used.

Possible values:

  • number of elements on the page
  • max – maximum size possible (2,000 elements by default)


…/tests?page-size=10 – retrieves the first 10 scripts

…/tests?page-size=max – retrieves 2,000 elements max.



  • GET
  • POST

After a question mark, you can use parameter query={…}. Put the field names in squiggle brackets to mention the fields that will be used for filtration.

Formatting for page fields:


Comparison operators: >, <, >=, <=, =, <>

Logical operators: and, or, not

Semicolon is used for separation, equal to logical operator AND. Other logical operators between the fields are not supported. 




Absence of a special sign means an equal mark:


Several parameters in one request are separated by a semicolon:




Example of a query request in Java:

String parametr = "{test-id["" + testId + ""]}";
ResponseEntity<String> response = restTemplate.exchange(urlALM + "/testInstances?query=
String.class, parametr);

Read further to find out what operations can be used in ALM.

Not Experienced in Load Testing?
Leave it to us. We will set it all up once and for all.
Get a quote Drop us a line to find out what our team can do for you.

Operations with Elements



  • POST
  • GET

To view a full list of elements, send POST or GET request with an empty body to the page address. 



– overview of the list of scripts.

To view data on a particular element from the list, add the element ID after the page name.



– overview of script with ID 11111.

For more particular requests, go back to section Parameters above.

Create an element


  • POST

Content (a script, a defect, etc.) in ALM can be created by using POST method to send the code of the element to an xml or json page.



Request body:

<Entity Type=”defect”>
<Field Name=”detected-by”>
<Field Name=”creation-time”>
<Field Name=”severity”>
<Field Name=”name”>
<Value>Some Description</Value>

<Entity Type=”defect”>

You can create several elements at a time this way. It is necessary to include one of the headers to do so:

  • content-type=”application/xml;type=collection”
  • content-type=”application/json;type=collection”




To delete an element, send a request using DELETE method to the element’s address. The adress will be the same as for viewing, but for the method change. 



– delete the script with ID 11111

Parameter used: ids-to-delete

This parameter allows to delete several elements at a time. To do so, use DELETE method to address the whole list, and then mention IDs of elements you want to delete, separated by a comma. 



– delete scripts with IDs 11111, 22222 and 33333.

Parameter used: force-delete-children

This parameter is used to delete child directories when deleting a directory from test-folders.

Possible values:

  • y – yes
  • n – no

If the parameter force-delete-children is not used, child directories are not deleted by default. 


…/test-folders/11111?force-delete-children=y – to delete child directories, where 11111 is an ID of a directory.



  • PUT

You can change an element by using method PUT to send new values for the fields changed in xml or json. 



– change description of the defect with ID 11111.

Request body:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Entity Type="defect">
<Field  Name="description">
<Value>This is new description</Value>

You can use the same way to change several elements at a time. To do so, put the element ID in the xml instead of the address. Include one of the headers, too:

  • content-type=”application/xml;type=collection”
  • content-type=”application/json;type=collection”
Have a Project in Mind?​
We have been working on performance testing projects since 2008.
Drop us a line to find out what our team can do for you.
Get a quote You’ll hear back from our tech account manager in one day if not sooner


Automating performance testing saves either the time of your staff members, or of the contractor who is running the tests. Thus, in both cases, it saves customer’s money. Although there are many tools for test automation, performance testing does not yield effective results without the eye of an experienced engineer. Make sure you have one on your team, or let us know if we can help! Our expertise with 300+ projects and 400+ staff engineers lets us share our knowledge to make your application the best version of itself.

Table of contents
Let us know about your needs
We can provide multiple performance testing services and a lot more than that if the situation needs a far more complex approach.
Get a quote You’ll hear back from our tech account manager in one day if not sooner

Related insights in blog articles

Explore what we’ve learned from these experiences
8 min read

Why Load Testing Is Essential for Ecommerce Businesses

why load testing is essential for ecommerce businesses preview
May 17, 2024

The success of 26 million online retailers depends on the page load time. It significantly impacts the profitability of online services and sales, as customers don’t want to wait over three seconds to make a purchase. To ensure the desired speed, load testing is widely applied. Common Ecommerce Problems That Can Be Solved with Load […]

8 min read

Everything You Should Know about Performance Testing of Microservices

everything you should know about testing microservices preview
May 2, 2024

About 85% of enterprise businesses use microservices. In this article, we will cover the primary specifics of microservices, explain why they need performance testing, and highlight how to make this process efficient. Microservices in a Few Words Microservices (or microservices architecture) refers to a methodology for developing and deploying applications. This approach separates an extensive […]

4 min read

PFLB is Now SOC2 Compliant

pflb is now soc2 compliant preview
Apr 24, 2024

The PFLB team is happy to share the good news. We have passed the SOC 2 compliance accreditation. It means we can assure our clients that our cooperation will be entirely secure. What Is SOC? Introduced by the American Institute of CPAs (AICPA), SOC, or Service Organization Control, is a cybersecurity series of reports made […]

11 min read

How Do Businesses Benefit from Frontend Performance Testing?

how do businesses benefit from frontend performance testing preview
Apr 15, 2024

Crucial bottlenecks are usually backend-related. That’s  why backend performance testing is generally regarded as a must. However, only 1% of companies perform frontend performance testing. They don’t consider that to achieve the best business results, one should combine the two types.  Let’s prove it. We will define their differences, emphasize the importance of conducting backend […]

  • Be the first one to know

    We’ll send you a monthly e-mail with all the useful insights that we will have found and analyzed