fxbird | 20 May 2011 05:25
Picon
Favicon

How to write unit test for rpc invoking?

 In my project , I use xmlrpc to make rpc to the remote request, but I don't know how to write unit test to check if
the rpc request has been really made and run successfully. Anyone has such experience?

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    xml-rpc-digest <at> yahoogroups.com 
    xml-rpc-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
    xml-rpc-unsubscribe <at> yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

fgmarand | 20 May 2011 08:12
Picon
Gravatar

Re: How to write unit test for rpc invoking?

It completely depends on what you are using to invoke XML-RPC, but you could take a look at the XML-RPC unit
tests in Drupal:

http://drupalcode.org/project/examples.git/blob/refs/heads/7.x-1.x:/xmlrpc_example/xmlrpc_example.test

--- In xml-rpc <at> yahoogroups.com, "fxbird" <fxbird <at> ...> wrote:
>
>  In my project , I use xmlrpc to make rpc to the remote request, but I don't know how to write unit test to check
if the rpc request has been really made and run successfully. Anyone has such experience?
>

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    xml-rpc-digest <at> yahoogroups.com 
    xml-rpc-fullfeatured <at> yahoogroups.com

<*> To unsubscribe from this group, send an email to:
(Continue reading)

fgmarand | 20 May 2011 08:14
Picon
Gravatar

Re: How to write unit test for rpc invoking?

Also, we have tests in Drupal core:

The test themselves:
  http://drupalcode.org/project/drupal.git/blob/refs/heads/7.x:/modules/simpletest/tests/xmlrpc.test

The supporting module:
  http://drupalcode.org/project/drupal.git/blob/refs/heads/7.x:/modules/simpletest/tests/xmlrpc_test.module

--- In xml-rpc <at> yahoogroups.com, "fxbird" <fxbird <at> ...> wrote:
>
>  In my project , I use xmlrpc to make rpc to the remote request, but I don't know how to write unit test to check
if the rpc request has been really made and run successfully. Anyone has such experience?
>

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/xml-rpc/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/xml-rpc/join
    (Yahoo! ID required)

<*> To change settings via email:
    xml-rpc-digest <at> yahoogroups.com 
(Continue reading)


Gmane