Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Absent Member.. yyerokhin Absent Member..
Absent Member..

API test template

My goal is to create a large number of API tests. I'm using UTF to design/create and ALM to manage them. The workflow is the same for all of them, but parameters are different. I'm looking for a easiest way to do that.

Most obvious solutuion is to have one test, that is driven by data table. But this option doesn't work for me as different iterations should be mapped to different requirements. So it would be still different tests.

I created a test in UTF that can be used as a template with set of input parameters. I was able to copy/paste this test in ALM to create more such tests. Input parameters are displayed fine in Parameters tab. But when I execute these tests, input parameters are blank, not even default value is used.

Is there a way to set input parameters for UFT created API test within ALM and hopefully with minimal actions?

Thanks in advance

1 Reply
Ernstsson Absent Member.
Absent Member.

Re: API test template


Crap I had written a long answer but it got lost since I needed to register. Anyway, I have written a framework around API test in UFT where my thought behind it was

a) get around all the limitations I found using API test
b) be able to create a clean report file that anyone can understand
c) make it possible for anyone to create tests without having to know UFT

So to be able to do this I used a GUI test as template test that will be copied to create new API test. There are several reasons for using a GUI test the main ones are

1) Its possible to customize the report
2) Its possible to integrate with ALM in a much much easier way

Since I use one template test that is copied I dont want to end up in maintenance hell so I use function libraries (basicly the template only calls a function). 

As for test data I have there sources:

1) Global where stuff like environment url, username,password etc are stored
2) Attached to each test set/test I have test specific data which tells my template script what I actually want to test
3) And lastly my template looks at a custom field on the test set to determine which environment to run. This is vital to make sure that you can have the same test in several testsets scheduled to run without having to modify your excel each time

All in all this gives me this nice report that I think anyone can understand. You can expand/collapse all environments that are running, or iterations. And when you have a verification you get a nice expected/actual printout. Much nicer than getting Action Iteration 1, 2,etc I would say

All this being said, its not something you setup during coffee break but a good framework is a good investment. 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.