Bolte IT Consulting
Connect to HP ALM via Java using REST API
Connecting to HP ALM via Java is a bit of a cumbersome task when you have never worked with a REST API before.
It is for certain not as easy as connecting to a database using a connector provided by any vendor.
Using the HP ALM REST API Examples in version 11.52
In order to use the HP ALM REST API Examples in Eclipse you will have to apply changes to some classes and even rewrite some of the tests.
I like to have simple examples, which are not hard to understand for beginners. In contrary HP provides you with an examples section, which is not easy to understand or use due to missing explanations as well as overall complexity.
First you should understand what is happening in the background when you will use the little API HP provided. The following article might help to give you an idea.
Connect to HP ALM via browser using REST API
Anyhow, let's start by setting up an example eclipse project.
Prepare HP ALM REST example project in eclipse
Create a new Java Project in eclipse called "almConnector" (or whatever you like - it does not matter).
In the src directory of this new eclipse project create three new packages.
- alm
- infrastructure
- test
Now go to the HP ALM REST API reference in your ALM documentation library.
To do so when looged into a HP ALM project choose Help -> Documentation Library from the top menu bar.
- Hits: 45721
HP ALM Quality Center Dashboard Excel History Report
Whenever you are interested in ALM Quality Center audit history you have various choices of getting the information.
One way of extracting history information from the database is using the Excel reporting functionality of the HP ALM Quality Center Dashboard.
First create a new Excel Report in the Analysis View of the Dashboard (see documentation library of HP ALM on details how to create such a report).
In the tab Configuration you will find the Query Builder, which allows querying the underlying database server of ALM Quality Center using SQL.
This is a nice feature, if you have to apply more complex analysis. Especially analysis on history information will require accessing audit tables either through the HP ALM OTA API or through SQL or both.
- Hits: 13506
Split and Transpose Strings
Splitting Strings is a trivial task. Using SQL unfortunately it is not so easy to do. Recently I had to split long concatenated strings from one field in an Oracle database.
Luckily I was not the only one facing this challenge and found helpful information on the internet.
Below an example that did the trick for me.
The resultset of above query will look like the following picture.
- Hits: 15776
Connect to HP ALM via browser using REST API
Currently I am playing with the REST API of HP ALM and since some basics are always good before you start automating things, I first wanted to connect to ALM using a web browser.
Authentication
Open a browser and type in the following url, but replace the part {host} with the address to your HP ALM server.
https://{host}/qcbin/authentication-point/authenticate
This will display a simple login dialog, in which you provide your HP ALM user name and the corresponding password.
- Hits: 28189
Reading big Excel files with POI
Hi there.
Recently I was sitting in a bad place again. I had to automate one process step in a workflow, which was entirely based on processing files of different type, layout and size.
I love automating things by developing software, but I hate doing so whenever it is based entirely on file systems.
To make matters worse, I had to process Excel files ... again! Being a very experienced VBA programmer, in which I do take shame, not pride, I knew it will give me trouble.
Since I do not want to code in VBA anymore, I decided to use Java and the Apache POI API.
Started to use the API and was happy. See the following articles for reference.
How to setup an eclipse project to use POI.
Identifying the last row in Excel files can be hard. Depends on what you define as last row ;0).
A high level wrapper class around POI for processing Excel files.
And here the problem ...
- Hits: 21103