Topic
14 replies Latest Post - ‏2012-11-26T18:56:22Z by SystemAdmin
SystemAdmin
SystemAdmin
245 Posts
ACCEPTED ANSWER

Pinned topic How to use datapool to test web services?

‏2007-02-21T21:26:56Z |
Hi,

I have created a test from WSDL, created a datapool into the project. And, I added the datapool into the test.

Now, I clicked into an individual operation under the test but can't find the button 'datapool variable...' in the 'Test Element pane'.

How do I substitute an input data for an operation with the datapool variable?

Thanks.

Cindy
Updated on 2012-11-26T18:56:22Z at 2012-11-26T18:56:22Z by SystemAdmin
  • C.Telep
    C.Telep
    16 Posts
    ACCEPTED ANSWER

    Re: How to use datapool to test web services?

    ‏2007-02-21T22:02:55Z  in response to SystemAdmin
    Hi,

    To use a datapool, select an operation call in the test editor, then in the right-hand side pane, select one of the message field highlighted in green, then click on the value to open a dialog box to edit the value. Finally select the static value, and right-click and choose substitute from datapool variable in the pop-up menu.

    Christophe.
    • SystemAdmin
      SystemAdmin
      245 Posts
      ACCEPTED ANSWER

      Re: How to use datapool to test web services?

      ‏2007-04-10T10:11:58Z  in response to C.Telep
      Hi,
      I am able to associate the variable in the datapool. I have two records in my datapool.When I run the webservices test using the option Run as Performance test, the tool is not prompting me to iterate till the end of the data pool or not.The logs indicates only one call was successfully made.Please help if I am missing any thing overhere in using the data pool for webservice testing.
      • SystemAdmin
        SystemAdmin
        245 Posts
        ACCEPTED ANSWER

        Re: How to use datapool to test web services?

        ‏2007-04-10T15:41:20Z  in response to SystemAdmin
        Hi,

        In fact, I also have the same problem as sadf234234.
        Still missing something to make datapool to work.

        Cindy
        • C.Telep
          C.Telep
          16 Posts
          ACCEPTED ANSWER

          Re: How to use datapool to test web services?

          ‏2007-04-11T07:44:50Z  in response to SystemAdmin
          Hi,

          To use successfully the datapool, you have to create a schedule with a loop that call the test you have created to iterate for each row of the datapool.

          Thanks
          Christophe
          • SystemAdmin
            SystemAdmin
            245 Posts
            ACCEPTED ANSWER

            Re: How to use datapool to test web services?

            ‏2007-04-16T19:58:00Z  in response to C.Telep
            Hi,

            I had created a scedule and created a loop and inserted the test. And, all the variables in the test are substituted from the datapool variables.

            So, I executed the scedule and check the test log which showed that the test was executed twice (that's all I set up the loop for) but both times using the same data. It didn't seem to have gone into the datapool at all. The data used was the ones I supplied during recording from web services explorer.

            Still need help.
            Thanks.

            Cindy
            • McCloud
              McCloud
              4 Posts
              ACCEPTED ANSWER

              Re: How to use datapool to test web services?

              ‏2007-06-04T12:15:47Z  in response to SystemAdmin
              The Datapool will not work when you insert a loop in a schedule and insert the test in that loop. The Datapool is coupled to the test, not to the schedule. What basically happens is that you will execute the test over and over again and because the test does't have a loop, it will use the same values for every test.

              You have to specify a loop in the test, not in the schedule. The loop in the test will now use the Datapool.

              Good luck.
    • X934_Harminder_Singh
      1 Post
      ACCEPTED ANSWER

      Re: How to use datapool to test web services?

      ‏2011-03-04T21:53:15Z  in response to C.Telep
      Hi, I am a newbie and I am trying to use Rational SOA tester the same way you are, but for some reason I am not able to substitute values.

      What I am doing is, I imported a WSDL. The WSDL has various XML calling methods. The method that I am using has a variable field and I need to change the value in order to execute the method whenever required. So what I want to do is to create a data pool so that the method can read from this data pool and assign the values automatically to the variable field.

      I have created the data pool, but the substitution is not happening. It prompts me to substitute from the created data pool and I do so as well, but I believe it is not reading from the data pool. I get the message 'matches found 2', but I see none. After substitution if I execute the method it still takes the default value rather than the substituted.
      • SystemAdmin
        SystemAdmin
        245 Posts
        ACCEPTED ANSWER

        Re: How to use datapool to test web services?

        ‏2011-03-09T11:03:50Z  in response to X934_Harminder_Singh
        Hi Mr Singh,

        does your test suite include loops so that multiple values are picked up from the datapool ?
        Additional question: any chance that 1st first value in your datapool matches what you called the 'default value' (as defined in your test suite) ?

        In all cases, as your use case is very nominal, I suggest you parse the help documentation here :
        http://publib.boulder.ibm.com/infocenter/rpthelp/v8r2m0/index.jsp?topic=/com.ibm.rational.test.lt.doc/topics/cdatapool.html

        Hope this helps.
        Thanks and Regards,

        Stephane Leroy
        L3 Support for RPT extensions (Citrix, SAP, Sockets & SOA)
        R a t i o n a l S o f t w a r e
        IBM Software Group
        • SystemAdmin
          SystemAdmin
          245 Posts
          ACCEPTED ANSWER

          Re: How to use datapool to test web services?

          ‏2011-03-09T15:42:51Z  in response to SystemAdmin
          I created the loop as suggested by McCloud, and I can see the request is using data pool values (pls see attached doc), but where can I see the response?

          Thanks
          Jirong
          • SystemAdmin
            SystemAdmin
            245 Posts
            ACCEPTED ANSWER

            Re: How to use datapool to test web services?

            ‏2011-03-09T16:04:41Z  in response to SystemAdmin
            Mr Hu,

            does your test suite include a web service answer ?
            If not : I'd suggest you click "Update Response..." button and then select "Update Test" button. You'd also need to rerun your test.

            You should see the responses corresponding to a specific test execution in the Test Logs :
            select the "Events" tab and check the "Service Content" wiew.
            It's directly synchronized with the event selected.

            Hope this helps.
            Thanks and Regards,

            Stephane Leroy
            L3 Support for RPT extensions (Citrix, SAP, Sockets & SOA)
            R a t i o n a l S o f t w a r e
            IBM Software Group
            • SystemAdmin
              SystemAdmin
              245 Posts
              ACCEPTED ANSWER

              Re: How to use datapool to test web services?

              ‏2011-03-09T16:23:48Z  in response to SystemAdmin
              Yes, I can see that now.

              One thing don't understand, in the middle Event panel, for each loop, why the variables are already fixed as in the test (request CAD, CNY and response 6.7677), not showing the values from the datapool? It's very confusing at the very beginning. And only after looking into the properties, then you find out the actual value used in request and response.

              Thanks
              Jirong
          • SystemAdmin
            SystemAdmin
            245 Posts
            ACCEPTED ANSWER

            Re: How to use datapool to test web services?

            ‏2011-03-09T16:08:48Z  in response to SystemAdmin
            attach file
            • SystemAdmin
              SystemAdmin
              245 Posts
              ACCEPTED ANSWER

              Re: How to use datapool to test web services?

              ‏2011-03-09T16:31:17Z  in response to SystemAdmin
              As you mention it, it's really a matter of usage habit.
              The tool was designed this way to enable you to navigate directly from a test log event (please check the link in blue called 'element' under "Properties" section) to the corresponding node in the Test Suite.

              Regards,
              Stéphane Leroy
              • SystemAdmin
                SystemAdmin
                245 Posts
                ACCEPTED ANSWER

                Re: How to use datapool to test web services?

                ‏2012-11-26T18:56:22Z  in response to SystemAdmin
                I have the same problem and I have not solved.
                Anyone have any ideas?