HPE Software Products: Service Test
Share |

How to add json tags dynamically in input request and validate dynamic responseusing C# event codeOpen in a New Window

Hi All,

Iam very new to API testing. Can any one help me how to programmatically insert the values in to tag.

1. How to programatically insert the values in the tag in the below sample request. I want to update the value of  Number tag to 154 programatically?

{

"requestParam": "UPDATE",

  "Data": [
{
"Action": "A",
"Number": "1234",
"FormId": "124"
}
]

 }

 

 

 

How to validate response whcih has dynamic array values using custom code feature in UFT API 12.52Open in a New Window

How to validate response whcih has dynamic array values using custom code feature in UFT API 12.52
we have a requirement to validate a response which will be dynamic array as below. I have to validate the elements of array against expected value using custom code.
 
 
 
{"LdaHeader":{"rsTotalTm":0,"serverSqlTime":200},"responseLevel":1,"responseDesc":"Fetch successfully","activiltyList":[{"userId":"","activityCd":"DEHS","activityDataDesc":"Determine FM ","activityLocationCd":"AC","activityTmstp":1486681714942},{"userId":"","activityCd":"COMPG","activityDataDesc":"Save PGAs for Commodities","activityLocationCd":"CA","activityTmstp":1486681714259},{"userId":"5043016","activityCd":"KLT","activityDataDesc":"Keying Complete Line Count: 1 Lines","activityLocationCd":"","activityTmstp":1486681701968},{"userId":"","activityCd":"DETS","activityDataDesc":"Determine CMM ","activityLocationCd":"CA","activityTmstp":1486680492705},{"userId":"","activityCd":"COMPGA","activityDataDesc":"Save Commodities","activityLocationCd":"CA","activityTmstp":1486680492157},{"userId":"VSF","activityCd":"BKR","activityDataDesc":"Process Message","activityLocationCd":"CA","activityTmstp":1486680485274},{"userId":"","activityCd":"CANBK","activityDataDesc":"Process Message","activityLocationCd":"","activityTmstp":1486680480978},{"userId":"test","activityCd":"MDU","activityDataDesc":"Update","activityLocationCd":"","activityTmstp":1486680476633},{"userId":"","activityCd":"DEHS","activityDataDesc":"Determine ","activityLocationCd":"CA","activityTmstp":1486680463550},{"userId":"","activityCd":"DEHS","activityDataDesc":"Determine ","activityLocationCd":"CA","activityTmstp":1486680462893},{"userId":"","activityCd":"OGA","activityDataDesc":"OGD ","activityLocationCd":"CA","activityTmstp":1486680462347},{"userId":"","activityCd":"COMP","activityDataDesc":"Save commodity","activityLocationCd":"CA","activityTmstp":1486680462104},{"userId":"TEST","activityCd":"MDU","activityDataDesc":"Update","activityLocationCd":"","activityTmstp":1486680441408},{"userId":"VISA","activityCd":"MDESA","activityDataDesc":"Test MD Add Received","activityLocationCd":"","activityTmstp":1486680434987}]}

 

Receive message from a Message Queue.Open in a New Window

Hello All,

I am having difficulty in receiving the message from a Queue. Below is the steps followed.

  • Send a message to a Queue Q1 using ' jms_send_message_queue'
  • Receive a mesasge from different Queue Q2 using ' jms_receive_message_queue'. 

I am able to send the message to a queue succesfully but while receiving the message, getting the following error. Failed to receive a message from "Q2' due to the following exception : java.lang.Exception: Failed to receive JMS message
java.lang.Exception: Failed to receive JMS message

If anyone have come across this issue and solved it, please share me the details.

Thanks,

Nagesh(Private Info Removed)

 

Unable to edit the Client certificate pathOpen in a New Window

I am trying to add path for the client certificate but under security tab is not editable.

Please advise how can i edit it

 

 

 

Retrieving numbers from DataSource as string, they come in as exponentialOpen in a New Window

My XLS sheet has 790527915 stored as text format.

My Data Source table shows the number (790527915) stored as text, though I import the Excel sheet every time I run it with the new test data..

At run-time, when I "GetValue" from the data source (below), I get "7.90528e+008" as a string text.

            string paramValue;
            paramValue = GetDataSource(dataSheetName).GetValue(templateRow,paramName).ToString();

I'm sure it's something stupid. I didn't have this problem in QTP, but this API Test side of UFT is driving me crazy!

--Jan

 

 

HP UFT 12.01. getting error message "Cannot load the JSON from the file: SchemaSet is invalid"Open in a New Window

HP UFT 12.01.

When loading JSON, getting error message "Cannot load the JSON from the file: SchemaSet is invalid". Using Rest-Get service.

JSON is valid, saved the json file in .json extension(utf-8).

Please share if you have any solution or workaround for this error message. Thank you.

 

Paramertizing an sql statement in my database data source in uftOpen in a New Window

is there a way to parameratize my sql statement in my database data source?

i am using an ODBC connection.

 

 

The request was aborted: Could not create SSL/TLS secure channel.Open in a New Window

Hello,

 

I'm testing a REST serivce and sending a POST / JSON to a 'https' url.

For each server behind the F5 load balancer the test runs successfully.

When running the test at the F5 I'm getting the error listed in the subject. 

Would anyone have some ideas to get me pointed in the right direction? 

 

Thanks,

QA Automator

 

HP API Test unable to connect to FTPOpen in a New Window

Hello there,

I am new to the whole HP API Test environment (and automation in general) and am currently working on a proof-of-concept for my team to automate the upload/download of files using FTP. 

My goal for this test is to perform both uploading and downloading of files from a Unix server. The way we were doing previously is by using FileZilla client and port 22 (sftp).

I used the out of the box FTP features that HP API provides but it doesn't work. I have provided all the relevant connection information and login credentials and it hits me with "server committed a protocol violation" error message. I am able to connect to this server using FileZilla client with the exact same user credentials and am able to perform uploading/downloading of files. 

What am I missing here? do I have to configure something in order for me to use this feature? Appreciate your feedback on this.

 

 

Cheers,

Arvind

 

UFT 12.02 API Tests error appears after adding new activityOpen in a New Window

I was busy creating an API test that validates data inputted into a Hive database.

When I added a Condition (Flow Control) activity, I got the following error in the output tab:

Start
Name cannot begin with the '>' character, hexadecimal value 0x3E. Line 6, position 26.
End

 

HP Service testOpen in a New Window

Hi,

While opening project I have created in HP service test I am getting error message ,”Project file could not be loaded,Root element is missing,//Location/Project.csproj”. Does anyone come across this issue ?

Regards,

Anusha

 

ADM Help Center - the movie!Open in a New Window

Join our journey to the ADM Help Center! Discover how we can help you develop amazing apps.
Watch our movie: https://youtu.be/QMz_9P4iE6o 

 

Throwing "The system cannot find the path specified. "Open in a New Window

Copy pasted a project to a different location, then mapped the datasheet to currently available location in the script. But throwing "The system cannot find the path specified. ", unable to fix this issue. Copy pasting was never issue for some of the projects.

Attaching the report screenshot for reference.

Thanks

 

Regular expressions in C# event handlers of UFT 12.54Open in a New Window

Hello,

A question re REST API tests in UFT 12.54 . Does C# in event handlers like OnBeforeExecuteStepEvent support regular expressions? In code like:

var sUrl = this.RESTActivityV211.Url.Replace(<regular expression>, <target string>);

the regex does not get interpreted. HP's C# documentations are rather scarce in this respect.

Hans.

 

How to export SSL certificate, file with .pfx extnOpen in a New Window

Trying to export SSL certificate, tried multiple options available in the tool, but unable to find the right option to export the same.

 

Is there a way to refresh the data sheet after updateOpen in a New Window

An Excel is added as a data source using link to the original file option. After updating the excel with project open on UFT workspace, is there an option to refresh so that the updates reflect on the project immediately.

Currenly the project is closed & opened for the updates to reflect.

 

How to pass different XML request for the same operationOpen in a New Window

I'm trying to pass different XML requests for the same operation, in the same step. The operation has optional fields, XML request for each scenario is only passed with one or 2 fields.

Note: Passing empty tags will throw error.

 

Insert row in Excel message Step 'Process XML Files' : Row 2 does not exist in the ‘test.xlsxOpen in a New Window

I am trying to insert a row into an Excel Spreadsheet and i am getting a message that the row does not exist.

I am reading an xml document and writing to an excel spreadsheet.

 // Process element if Found
                if (currNodeList.Count >= 1) { 
                // Iterate through all nodes that were returned with the query
                    foreach (XmlNode node in currNodeList) {
                         k = k + 1;                    
                        Context.UserLogger.Info(currentElementName + "  Node List Count:  " + 
                                                currNodeList.Count + "  Inner Text:  " + node.InnerText);
                         GetDataSource("Output MasterList Data !'DATA CAPTURED$'").SetValue(k, currentElementName, node.InnerText);                                             
                     

 

Unable to connect ALM 12.50 from UFT 12.54Open in a New Window

I have following installed on my machine

1.) UFT 12.54 

2.) ALM 12.50

Both the above are trial versions

1. I have installed ALM plugin in UFT

2.I have installed TDConect.exe

Now when I try to connect to alm from uft after entering alm server name as - https://almalm1250saastrial.saas.hpe.com/qcbin

User name and password for ALM and click on connect, I get following error :

"The connection to the specified ALM server failed. Make sure that the server machine is available."

I have attached the error screen.

Please help me.. Thank you for all your help in advance.

- Abhay

 

Rename checkpoint name using custom codingOpen in a New Window

Is there a way to rename the checkpoint name in the results when using custom code?

Contact Us

Vivit Worldwide
P.O. Box 18510
Boulder, CO 80308

Email: info@vivit-worldwide.org

Mission

Vivit's mission is to serve
the Hewlett Packard
Enterprise User
Community through
Advocacy, Community,
and Education.