Menu

expected output in tests

Help
2004-06-21
2004-06-22
  • Sven Ludwig

    Sven Ludwig - 2004-06-21

    Hello,

    where can I see the expected output of the tests,
    for the case that everything goes well?

    When I execute HelloClient against HelloServer,
    I get a no such method-call, and I wonder if this
    is tested, or if it is an error.

    Thanks,

    Sven

     
    • Sven Ludwig

      Sven Ludwig - 2004-06-21

      Sorry, just saw the expectations
      in the test-code.

      What is generally missing is some
      assertion or check of the results,
      with a final message if something went
      wrong or not, I think.

       
    • adi

      adi - 2004-06-22

      Do something like:
        try
        {
        params[XML_PARAM_1] = encodeToXml(something);
        params[XML_PARAM_2] = encodeToXml(something);
        status = server->execute("ServerMethodName", params, result);
        }
        catch(XmlRpcException& err)
        {
          cout << err.getMessage() << endl;
        }
      And you can print the error.
      The usual errors happen when:
      1. The client calls a method that is not  defined on the server.
      2. You encode/decode parameters to/from XML in the wrong way.

       

Log in to post a comment.