Posted on 26 February 2018

Micro Focus Application Lifecycle Management’s (ALM) workflow is one of its most powerful features, allowing you to extend ALM’s capabilities and integrate with third-party solutions.

JDS recently helped a client leverage this capability by integrating with a Test Data Management (TDM) solution to improve their Testing Lifecycle. The client wanted the ability to reserve data through ALM and import data into Micro Focus Unified Functional Test (UFT) scripts to run automated tests, where previously a manual import of test data was required at each test cycle. The new automated workflow prevented testers from using each other’s test data at the same time, and therefore potentially invalidating test results. The end result was a time saving of 20% from test data orchestration.

Below is a high-level overview of the workflow that was created within ALM.

A tester would first press a Reserve button in ALM to reserve data for a test, thus not allowing other testers to also use this data during this period. Subsequently, when the automated test was executed via UFT, the reserved test data was retrieved.

This tech tip focuses on implementing the Reservation function.

The first step in this process is creating a Reserve button. This is straightforward.

  1. Click on the cog, and then “Customize”. 
  2. Click on “Workflow” and then “Script Editor”.
  3. Click on “Toolbar Button Editor”, where we can create a new button.
  4. For the command bar, choose “TestLab”.
  5. Click “Add” to add a new button. Then, provide the button the following details:
  6. Click Apply.
  7. Close all the windows until you are back to the main ALM page. Then, browse to the Test Lab. You will see the new button created.

Next, you need to provide the Reservation code to the button.

  1. Click on the cog, and then “Customize”.
  2. Click on “Workflow”, and then “Script Editor”.
  3. Under Project Scripts > Test Lab Module Script, we put in the ReserveData code. Below is an example:
Sub ReserveData()

sUrl="http://x.x.x.x/api.php"

strPostData="{" &_

chr(34) & "user_id" & chr(34) & ":" & chr(34) & User.UserName & chr(34) & "," &_

chr(34) & "domain_id" & chr(34) & ":" & chr(34) & TDConnection.DomainName & chr(34) & ","  &_

chr(34) & "project_id" & chr(34) & ":" & chr(34) & TDConnection.ProjectName & chr(34) & ","  &_

chr(34) & "test_instance_id" & chr(34) & ":" & chr(34) & strTestInstanceID & chr(34) & "," &_

chr(34) & "action" & chr(34) & ":" & chr(34) & "reserve" & chr(34) &_

"}"

 

objPostData = Stream_StringToBinary(strPostData,"us-ascii")

 

set oHTTP = CreateObject("Microsoft.XMLHTTP")

oHTTP.open "POST",sUrl,false

oHTTP.setRequestHeader "Content-Type", "application/json"

oHTTP.setRequestHeader "Content-Length", Len(strPostData)

oHTTP.send strPostData

End Sub

The code above passes our TDM solution unique identifiers such as username, domain name, project name, and test instance ID to uniquely assign test data. The TDM API will dictate what parameters you will need to supply to reserve data. Similar code would then need to be implemented as part of your Automation Framework to retrieve the data for use by UFT to the automated solution described.

Conclusion

There are so many possibilities with ALM’s workflow for integration and automation! JDS is a Micro Focus Platinum Partner and implementation specialist with nearly 15 years of experience. Find out more on our Micro Focus partner page, and get in touch today to learn how we can help your business.

Our team on the case

Focus. Work hard. Stay positive. It always seems impossible until it’s done.

Daniel Tam

Account Manager

Length of Time at JDS

10 years

Skills

I am an experienced Account Manager, with a strong capability for problem-solving and creating the solutions that best match each customer’s unique requirements. I have a demonstrated technical capability across numerous disciplines, including:

  • Performance testing
  • Application performance monitoring (‘APM’)
  • IT Service Management (ITIL 3 certified)
  • CMDB, automation and orchestration

Workplace Passion

I have a strong passion for understanding our customers’ unique requirements and helping to create solutions that best solve both their technical and business needs.

Our Micro Focus stories

Leave a Reply