Forum Discussion

tbom's avatar
tbom
Contributor
13 years ago

reloading of Webservices

I have a test setup, that uses a webservice to load configuration data for DB access etc. in testcomplete



When I run it on my development machine it works fine. But when I run it on one of our testmachines (using test execute), the webservice fails, as it hasn't been initialized.



If I start testcomple on the testmachine, and refresh the webservice, then it works fine. Also in test execute afterwards



However, this is not an ideal solution, as we deploy the code daily with a fresh snapshot, to our testmachines. And then it needs to refresh the webservice daily on 25+ machines = A hell of a workload.. :) + we need testcomplete on all testmachines, which we would like to avoid.



Is there a way for auto refreshing the webservice references in a project, when loading it in testexecute?



/ Thomas
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Thomas,



    Could you provide more information about your web service: how it is registered in TestComplete, how do you refresh it, what is posted to TestComplete log when the call to web service fails and the relevant piece of test code that fails? Maybe some other additional info that might help to get a better understanding of the problem?
  • tbom's avatar
    tbom
    Contributor
    Hi Alex



     I have added "Webservices" to my project, and added my configuration webservice under the webservices.



    The following is a snippet of my code that uses the webservice (using jScript) :




    envName =



     



    WebServices.EnvList.ReverseEnvNameLookup(ProjectSuite.Variables.OpusDatabase);

     



     


    When running on my development machine it runs fine, no problems. When I move the project to another machine, and starting under test execute, I get the following error : "Microsoft JScript runtime error. Object doesn't support this property or method".



    If I start testcomplete on the other machine, load the project, and then inspect the webservices entry in my project, then it doesn't show which methods my webservice supply. If I then press "Refresh" on the webservice page in testcomplete, the method entry is populated with the methods I can call.



    After I have refreshed the webservice in testcomplete, I can shutdown testcomplete, and run test execute without problems



    So it seems that the "complete" description of the webservice is missing in the project, as it only has the pointer to the webservice in the project, and methods is missing.



    The question then is, how can I refresh this webservice automaticly ?



    / Thomas
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    One more question (which, hopefully, can help Support to answer your question as I haven't met such a problem, sorry) :



    > When I move the project to another machine, and starting under test execute [..]

    Do you open project in TestExecute in local mode (i.e. using "TestExecute c:\path\project.pjs" syntax) or in networked mode (i.e. using TestExecute \\server\share\project.pjs syntax) ?



    P.S. More about networked mode: http://smartbear.com/support/viewarticle/11381/
  • tbom's avatar
    tbom
    Contributor
    Hmm.. it seems that it was our vcs software that played a trick on me! As it wasn't updating the webservice "definition" file in testcomplete, so when we checked it out on another pc, then it was empty..



    It does work now..



    (btw, we use both local and networked startup of the TC project.)