≡ 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!

45 comments… add one

  • Malay

    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

      @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

    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

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

  • Roopak

    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

      @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

    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

      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

    Hi Joe !

    Thanks for the links and clarifying.

    Have subscribed now to new content from your site :)

    Cheers,
    John

  • Pallab

    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

      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

      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

    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

      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

    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

      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

        your suggesting is good ,Thanks Joe

  • Susu

    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

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

  • Naresh

    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

      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

    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

      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

    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

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

  • Sachin

    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

      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

    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

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

  • Thomas

    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

    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?

  • Naresh

    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

    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

    • 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?

  • Ramyaa Seetharaman

    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

    Can we integrate ST 11 with QTP 10 ?

    Please update……………..

  • sahi

    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

    • 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

    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

    • 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?

  • Kusum

    Can we test Bus service request and response using UFT?

Leave a Comment