≡ Menu
Joe Colantonio – Selenium-UFT-QTP-SoapUI-ALM-LoadRunner & more

HP Service Test 11 – How to test a webservice Video

This is a 5 minute video of me showing how to test a web service using HP’s Service Test 11. This is my first attempt at a video post. Feedback – always appreciated!

44 comments… add one

  • Malay December 19, 2010, 7:51 pm

    Hi Joe,

    Nice to see the video on we services testing.I have office 2010,and I am having exporting tests from xcel to QC as it does nto support any addins,any thoughts !

    • Joe Colantonio December 20, 2010, 9:58 pm

      @Malay: Hi Malay – I’ve been using office 2008 so I have not seen this issue yet. If you can try to get your company to upgrade to Quality Center 11 it does have add-in support for Office 2010. Thanks for checking out the video — Cheers Joe

  • Q March 10, 2011, 1:57 am

    Hi Joe,

    Thanks so much for the video! I actually used 9.0 when I was testing and this is so different I was lost when I installed it. After your video I have a clear idea of what to do in a short amount of time. Thanks again!

    • Joe Colantonio March 10, 2011, 11:38 am

      @Q: I’m glad it helped! Thanks for checking by blog out :)

  • Roopak March 14, 2011, 8:38 pm

    Hi Joe,

    Currently we are using HP Service test 9.5 and in a few months time we will be using the new version i.e, HP Service test 11. I was wondering how different is the new ST with the old one. But now after watching the demo video, I understood the concept. Thanks for your fantastic video.

    I have one query. In HP ST 9.5, instead of checkpoints, I can use user defined codes such as lr_xml_getvalues to do the checking and also for reporting I can use codes such as lr_output_string, can we have that options available in newer version. I know the new version is totally different from loadrunner vugen but what I want to know is whether I can write codes in HP ST 11. And if so, can you please let me know the place where we can write that.

    Thanks in Advance, Waiting for your valuable comments.

    • Joe Colantonio March 14, 2011, 9:02 pm

      @Roopak: Hi Roopak – The lr_xml_getvalues equivalent in ST11 would be to use XPath (A query language used to identify a set of nodes within a XML document).
      The XPath Checkpoint option is located under the Checkpoints section in ST11. For lr_output_message, in ST11, under Toolbox\Miscellaneous folder
      there is a “Report Message” activity. The Report message will allow you to send a custom message to the ST report or a log file.

      If you need to create your own functions in ST11 there is also a “Custom Code” activity that allows you to write custom C# code.
      The documentation on this is pretty slim but I’ve been using it without any issue. Hope this helps. Let me know
      if you have any another question or any suggestion for future ST videos.

      Cheers,

      Joe

  • John March 24, 2011, 6:59 am

    Hi Joe !

    The demo was very helpful to understad how service test works.
    I am new to web services testing, can you point me to any good resources where I can learn how to test services in general ? then I can see how to leverage automation.

    Another question, does service test integrate with Quality center ?

    Cheers,
    John

    • Joe Colantonio March 24, 2011, 4:10 pm

      John » HI John – that’s a good question – in general the same approach you use for normal functional testing would be the same for web service except unlike most application web services don’t have GUI user interfaces.
      I think the biggest hurdle for me to learn how to test web services was understanding the underlining technology that makes up web services like WSDLs. SOAP, SAO, XML. I found the web site w3school really helpful in learning about
      web services (http://www.w3schools.com/webservices/default.asp) and XML (http://www.w3schools.com/xml/default.asp). Another resource I found very helpful is the book “SOA for the Business Developer: Concepts, BPEL” by Ben Margolis

      Yes – Service Test 11.10 integrates with Quality Center just like QTP does. Also Service Test integrates with QTP.

      Thanks for your question!
      Cheers,
      Joe

  • John March 25, 2011, 6:02 am

    Hi Joe !

    Thanks for the links and clarifying.

    Have subscribed now to new content from your site :)

    Cheers,
    John

  • Pallab May 12, 2011, 9:04 pm

    Hi Joe,

    I just wanted to know how we can change the end-point url automatically by scripting in HPST. I just need to run the script in different enviromnets and I want the script to take care of the change in end-point url.

    • Joe Colantonio May 20, 2011, 10:40 am

      Pallab » Hi Pallab – I understand your issue, but I actually haven’t had to test the same web service against different env yet. I’m looking in to it now – if you find out before me please let me know. Cool Joe

    • Joe Colantonio June 14, 2011, 6:27 pm

      Pallab » Hi Pallab – sorry for the late response (this was in my spam folder for some reason). If you have not figured this out yet this is what to do. In ST click on your web service in the canvas area. Under property sheet click on the ‘general’ icon. Under general there is a property named ‘Endpoint Address’. You can point that to a data source to automate using it against different environments. Hope this helps!

  • Vijay July 23, 2011, 5:29 pm

    Hi Joe,

    Currently I am using Webservice add-in for QTP automation , and I facing an issue while running the webservice–stating “The call failed. Exception from System. The system couldnt be resolved ‘Null’ …”
    May i know if you can help on this, where the issue is.


    Vijay

    • Joe Colantonio July 23, 2011, 7:12 pm

      Vijay » Hi Vija – I have not seen this error before. It sounds like a required field is not being passed in the web service request. Have you tried running in a free open-source tool like soapUI? That will help narrow down the issue to either QTP or an issue specific to your webservice. Cheer~Joe

  • Susu August 9, 2011, 6:31 am

    Hi Joe,
    I am new one for ST, your video is very good, do you know which book to introduct detail ST, thanks a lot.

    • Joe Colantonio August 10, 2011, 9:46 am

      Susu » Hi Susa – Unfortunately there are no books that I know of that cover Service Test. What I’ve been doing is using some C# books to help with
      ST custom code function. Also the HP Service Test tutorial is a good resource to get started with. Cheers~Joe

      • Susu August 15, 2011, 7:32 am

        your suggesting is good ,Thanks Joe

  • Susu August 15, 2011, 7:33 am

    I have problem, can you help me.

    Not effective about SetVariableValue

    Steps:
    1) Define two User Variables: reUserVar and reUserVar1 in the Profile.
    2) I drag ConcatenateStrings Activity into the testflow, and set its Prefix to relate reUserVar, its Suffix to relate to reUserVar1:
    //auto-generated
    ConcatenateStringsActivity4.Prefix = @”{ENV:UserVar}”;
    ConcatenateStringsActivity4.Suffix = @”{ENV:UserVar1}”;

    3) Define ConcatenateStringsActivity4_OnBeforeExecuteStepEvent:
    var activity = ((HP.ST.Ext.BasicActivities.ConcatenateStringsActivity)(args.Activity));
    activity.Context.TestProfile.SetVariableValue(“UserVar”,”Hello,”);
    activity.Context.TestProfile.SetVariableValue(“UserVar1″,”World!”);

    4) Check report: Prefix and Suffix are “”

  • Susu August 15, 2011, 8:10 am

    Hi Joe
    your VIDEO is very usesful and looking forward to your Video about Call Java Class.

  • Naresh November 11, 2011, 6:43 am

    Hello Joe, Thank for the video it was really good!
    Do you have any video which can show integration between Service Test 11.0 and QC11. Can you please share the video or related information, if you have. Thanks in advance!

    • Joe Colantonio November 18, 2011, 1:18 pm

      Naresh » Thanks Naresh – I’m glad you liked the video. For the ST 11 & QC video is there anything specific you would like to see – or just how to run ST from QC? Cheers~Joe

  • Naveen December 7, 2011, 4:50 am

    Hi Joe,

    A good Intro video on how to test webservices using HP ST 11.
    Do yo have any frequently used C# custom code snippets for HP ST 11.How will you do a checkpoint validation using Customcode activity?

    Thanks
    Naveen

    • Joe Colantonio January 13, 2012, 1:46 pm

      Naveen » Hi Naveen – if you use the args object there is a Checkpoint and Assert objects that allows you to create custom checkpoints. The appendix in Service Test User Guide (pg. 518 ST 11.20) has the exact steps to follow.Cheers~Joe

  • Naveen February 7, 2012, 9:05 pm

    Hi GREAT video !

    Would really appreciate if you could make a video on the Xpath validation using the new service test tool !

    Thanks in advance !

    Naveen.

    • Joe Colantonio February 9, 2012, 1:27 pm

      Naveen » Thanks Naveen! I will try to create a Xpath video soon! Thanks for the blog idea!!Cheers~Joe

  • Sachin March 24, 2012, 9:10 am

    Hi Joe,

    I am using ST 11.10, there I am facing issue while connecting to QC 10. Below are the details of what steps I followed:
    1. As suggested in User Guide I have made ALM/QC connection.
    2. Imported Test case to QC 10
    3. Tried to Run it.

    But I am getting below error:
    “Not able to open command object, contact your site administrator…….”
    Please provide me solution for this.

    Thanks !

    • Joe Colantonio March 30, 2012, 1:11 pm

      Sachin » Hi Sachin – First it is highly recommended that you upgrade to ST 11.20 and install Patch SOAST_00067. This has resolved a bunch of issues for me. Let me know if this helps. Cheers~Joe

  • Naresh April 16, 2012, 10:23 am

    Thanks Joe for the video.I am able successfully replay the example you showed in the video.I want you to post more videos on service test for web services testing.

    • Joe Colantonio April 16, 2012, 7:22 pm

      Naresh » Cool– Glad to hear Naresh! I will try to post more on ST.

  • Thomas April 19, 2012, 10:54 am

    Hi Joe,

    Thanks for the videio , very useful.. Is there a way we can output the webservice output to the data table excel sheet)

    thanks

    Thomas

  • Naresh April 20, 2012, 9:12 am

    Hi Joe,

    I want to test a real time web service rather than a sample flight application. When i load a real time web service like “http://www.konakart.com/konakart/services/KKWebServiceEng?wsdl “, HP service test is throwing an error saying “Unable to connect remote server”. Can you please help me out on this?

    • Joe Colantonio April 23, 2012, 2:25 pm

      Naresh » If you manually open a browser and enter http://www.konakart.com/konakart/services/KKWebServiceEng?wsdl are you able to see the WSDL? When do you get this error? What operation/method of this WSDL are you trying to use and what values are you passing? I’m able import the WSDL in Service Test 11.20.

  • Naresh April 23, 2012, 11:50 am

    Hi Joe,

    I am able to solve the issue.After installing 11.20, i am able to load the wsdl files. Earlier i was working on 11.00.

    Cheers

  • Sushil August 6, 2012, 3:59 pm

    Hi Joe,

    Could you please let me know how we can automatically create checkpoints for number of elements returned from database (Select Data).

    For ex. Database query returns 5 rows. Now I want the webservice call to automatically create checkpoints for all 5 elements returned from the DB query.

    Thanks in advance.

    Best Regards,

    Sushil

    • Joe Colantonio August 14, 2012, 7:01 pm

      Sushil » When you run a Select Data operation in ST you can also specify Checkpoints for the expected row/columns. For example in the Property Sheet of the Select Data click on the ‘Generate Ouput’ button. Next look under the checkpoints section your Result Table should have the 5 rows returned by your query. Expand each row will show you all the columns returned for that row. Check the column name you want to verify and enter the Expected Value. You can do this for all 5 rows. Does this answer your question?

      • Sushil August 23, 2012, 3:24 pm

        Thanks Joe.

  • Ramyaa Seetharaman August 22, 2012, 11:25 am

    Hi Joe,

    I have status blocks with a set of tags status code, status and status desc. returned a number of times in my response xml. I would like to validate the presence of a specific combination of these tag (ex.) status code = 16,status = error, ststusdesc = operation invalid. How can I validate this combination in a array of the status block?

    Thanks in advance.

    Regards,
    Ramyaa Seetharaman.

  • Santosh September 6, 2012, 2:19 pm

    Can we integrate ST 11 with QTP 10 ?

    Please update……………..

  • sahi October 26, 2012, 7:00 am

    Hi,
    I am using HPST(11.2). I am new to this tool. When i tried executing some wsdl’s in response i am getting an error as :”Structural CheckPoint failed : Trying to get XmlNode for Xpath: /*[local-name(.)='Envelope'][1], XmlNode was null”. As per my understanding i have given all proper inputs,Can you please help me out

    • Joe Colantonio November 14, 2012, 4:00 pm

      sahi » Hi – did you figure this out yet? Under the property sheet for your service operation, under checkpoints, make sure that the “Validate structure’ is not checked. Also are you seeing this bahavior when running from QC 10? I know that the latest ST path 7 resolved a QC 10 misreporting the same error for ST test. Either way make sure that you also have the latest ST path installed

  • Rajiv November 12, 2012, 10:23 am

    Hi Joe,
    Thanks, for the nice tutorial to test the wsdl webservice, by fallowing your tutorial, I had created a test in HPST to verify the information returned by the web service & I was able to verify the data by putting the check point in the script but when I try to see it result viewer, which gets launched after test passed, it is not showing the details information as your test result in which you were able to drill down to check point leve, in my test it just say that the test is passed.

    Please help me to understand, is there any setting in HPST to enable to see the result in detailed level in result view

    FYI.. I am using HPST 11.2.1723

    Thanks,
    Rajiv

    • Joe Colantonio November 14, 2012, 4:03 pm

      Rajiv » Hi Rajiv – not sure why this is happening. If you go into HP Result Viewer and click on View>Restore Layout do you see the expected results?

Leave a Comment

css.php