HP UFT API – A Brief History

History has many cunning passages, contrived corridors and issues –T.S. ELIOT, Gerontion

UFT API Confusion

I just wanted to take some time to briefly go over the history of HP UFT API. One of the reasons UFT API testing can be a little confusing is that if you’ve done a little research on HP UFT API testing, or are trying to get started, you may not know where to start because of its history.

[Read more…]

UFT API – The Top 3 WSDL Import Issues

Top 3 UFT API WSDL issues

Here are the three most common issues you may encounter when importing WSDLs in UFT API

  • You can’t even import the WSDL in UFT
  • You can import the WSDL, but get funky issues when trying to drag its methods on the canvas area
  • Everything works fine until your run it and get “Structural Validation fails” errors

UFT unable to import your WSDL

Sometimes there may be a real issue with the WSDL you are trying to work with. The first thing I always do, before working with a WSDL, is try opening it up in a browser. If you can’t even do that, then it is a WSDL issue not a UFT issue. Also Yaron Navesh gave a great tip in this post comments section: “What I’ve seen many times is that people save locally or send in email a WSDL file without noticing that the WSDL references other WSDL/Schema files (“import” or “include” tags). It is always recommended to consume the WSDL from a live system (in any environment) but otherwise it is important to copy all dependent files and edit the WSDL (and files) to resolve references.

If it opens in a browser, but not in UFT, the next step to try is to enable the Fuzzy feature in UFT. To use the Fuzzy option:

  • Navigate to your HP\Unified Functional Testing\addins\ServiceTest\WSImportTechnology directory:

  • Open up the WSImportTechnology.addin file (You may want to make a backup of this file before modifying it)
  • You need to add the following importGeneralProperties = “[useFuzzy,true]” to these nodes:

<TechnologyImporter id=”HP.ST.WEBSERVISES” …
<TechnologyImporter id=”HP.ST.WEBSERVISESFROMURL” …
<TechnologyImporter id=”HP.ST.WEBSERVISESUPDATE” …

  • Save the modified WSImportTechnology.addin file
  • Restart UFT and try to import the problematic WSDL back into your UFT API test

The Fuzzy feature option will try to resolve any issues when UFT tries to compile the WSDL. Fuzzy knows how to fix common errors listed in its defined list. If the WSDL still cannot be imported you can open a ticket with HP, as they might be able to add the error to the Fuzzy list.

Issues when trying to drag your WSDL’s methods on the canvas area

This one is usually caused by older buggy versions of UFT or Service Test so make sure you are always using the latest patches. You will be surprised at how much grief you can save yourself by keeping up on the regular UFT patch releases. Be sure to check out my blog often for the latest HP patch releases.

Structural Validation fails

This message can be annoying and usually this simple fix gets rid of any “Structural Validation fails” errors when you try running your API script.

Under the WSDL operations that you are using on the canvas area go to each one’s Properties and uncheck the Validate structure checkbox option:

Running your test without this option will often times resolve the runtime validation errors.

More UFT API Automation Awesomeness

For more UFT API Automation Awesomeness, tips, tricks and how-tos, check out my new book The UFT API Testing Manifesto – A step-by-step, hands-on testing guide for the masses –now available on Amazon.com!

Don’t own a Kindle? No Problem — you can still read my UFT API book!

I’m aware that some of you have had trouble accessing my books in the past. The truth is that you don’t need a Kindle! There are a variety of free ways you can read a Kindle eBook:

In short, it’s really simple to read Amazon Kindle books, no matter what type of device you use to access the Internet.