Automated excecution of testcases

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

dwangoac
TestLink user
Posts: 3
Joined: Mon Nov 30, 2009 10:21 pm

Post by dwangoac »

AnneGaelle wrote:...I may be able to produce (on Monday) a documented example in java or python, explaining how to use the methods of TestLink API...
Hi Anne - have you been able to get anything documented? I'm especially interested in how to do this with Python (we're using a modified version of PyUnitTest but any documentation would be very helpful).

Thanks in advance,

A.C.
******
angelus
TestLink user
Posts: 9
Joined: Wed Aug 12, 2009 3:07 pm
Location: Montreal, Quebec

Post by angelus »

Hi, I am also interested by the integration between TestLink and Selenium RC. My company is using Selenium and we would like to import test case results in TestLink. Please let me know as soon as you get something working.
Thanks
bmahe
TestLink user
Posts: 3
Joined: Fri Jan 15, 2010 3:25 am
Location: San Francisco

Post by bmahe »

I don't know if this is sill needed or if this is going to help, but in order to make the "Execute and Save Results" button work, you could try to:
  • Create and assign some speciffic custom fields to let TestLink know which xmlrpc server to contact. See function getXMLServerParams() in cfield_mgr.class.php. They should be "tc_server_port", "tc_server_host" or "tc_server_path" for test cases or "server_port", "server_host" or "server_path" otherwise. Apparently, TestLink will either use the combination (host, port) OR path which will be considered as the full path to your xmlrpc server entry point. If these information are not available for the target test case, it will look recursively at the parent node.
  • Here is a simple xmlrpc server in python I have used for my tests

    Code: Select all

    #!/usr/bin/python
    from SimpleXMLRPCServer import SimpleXMLRPCServer
    from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
    from random import random
    
    # Restrict to a particular path.
    class RequestHandler(SimpleXMLRPCRequestHandler):
        rpc_paths = ('/TL',)
    
    # Create server
    server = SimpleXMLRPCServer(("localhost", 8000),
                                requestHandler=RequestHandler)
    server.register_introspection_functions()
    
    
    
    
    def executeTest(testCaseName, testCaseId):
    	print "Request incoming!"
    
    	if random() < 0.5:
    		return ['p', "Executed from remote server"]
    	else:
    		return ['f', "Your test has horribly failed"]
    
    
    server.register_function(executeTest, "ExecuteTest")
    
    # Run the server's main loop
    server.serve_forever()
    
    
NB: This was tested against a 1.8 version
NB2: I had to modify some code (ex: $build_id, $user_id and $tplan_id were not defined in do_remote_execution in execSetResults.php) to make it work
beamwidth
TestLink user
Posts: 1
Joined: Fri May 21, 2010 9:02 am

Re: Automated excecution of testcases

Post by beamwidth »

Hi,


I'm a user of testlink even im facing the same issue of integrating selenium RC with testlink :( .I would be glad anne if send the code asap,it will help other such user who are facing this same issues.please do the needful.


Regards,
Beamwidth
frankil
TestLink user
Posts: 1
Joined: Thu Jun 03, 2010 5:28 pm

Re: Automated excecution of testcases

Post by frankil »

Hi,
I want to build another system which directly interacts with TL MYSQL database. Any suggestions.
Locked