Luxoft / Twister

Twister Test Automation Framework
http://www.twistertesting.com/
Apache License 2.0
38 stars 21 forks source link

getConfig() unable to retrieve nested configurations #94

Closed CJHoffmann closed 11 years ago

CJHoffmann commented 11 years ago

If the config path specified in the getConfig() function contains other configuration elements, an exception is thrown by getConfig.

getconfig01

getconfig02

TC1 has config1 with nested configurations in XCONN - TC fails TC2 has config2 with no nested configurations - TC passes

CLI Log

User: choffman ; EP: EP-1001 ; host: 127.0.0.1:8000 EP debug: Setup done, waiting for START signal. Debug: CE returned status running for EP-1001. EP debug: Received start signal from CE! TC debug: TestCaseRunner started with User: choffman ; EP: EP-1001. Downloading library TscCommonLib.py ... TC debug: Connected Central Engine, running tests!

===== ===== ===== ===== ===== Starting suite 101 - test01 ===== ===== ===== ===== =====

<<< START filename: 1001:/home/choffman/testdir/testcases/cjh01/testConfig.py >>>

Get Fac1 = FW4100ES_PR2/SLOT01/PORT01/FACILITY01 Get Fac2 = FW4100ES_PR2/SLOT03/PORT01/FACILITY01 Get Xconn = Exception: Traceback (most recent call last): File "/home/choffman/twister//client/executionprocess/TestCaseRunner.py", line 554, in run result = current_runner._eval(str_to_execute, globs, args) File "/home/choffman/twister/client/executionprocess/TestCaseRunnerClasses.py", line 262, in _eval execfile(fpath, globs_copy) File "/home/choffman/twister/.twister_cache/EP-1001/testConfig.py", line 46, in print 'Get Xconn =', getConfig(CONFIG[0],'Xconn') File "/home/choffman/twister/.twister_cache/EP-1001/ce_libs/TscCommonLib.py", line 108, in getConfig return self.ce_proxy.getConfig(self.userName, cfg_path, var_path) File "/usr/local/lib/python2.7/xmlrpclib.py", line 1224, in call return self.send(self.name, args) File "/usr/local/lib/python2.7/xmlrpclib.py", line 1578, in request verbose=self.verbose File "/usr/local/lib/python2.7/xmlrpclib.py", line 1264, in request return self.single_request(host, handler, request_body, verbose) File "/usr/local/lib/python2.7/xmlrpclib.py", line 1297, in single_request return self.parse_response(response) File "/usr/local/lib/python2.7/xmlrpclib.py", line 1473, in parse_response return u.close() File "/usr/local/lib/python2.7/xmlrpclib.py", line 793, in close raise Fault(**self._stack[0]) Fault: <Fault 1: 'cannot marshal None unless allow_none is enabled'>

File /home/choffman/testdir/testcases/cjh01/testConfig.py execution CRASHED. <<<

Test statistics: Start time 2013-09-23 15:26:49 -- End time 2013-09-23 15:26:49 -- 0.19 sec.

<<< END filename: 1001:/home/choffman/testdir/testcases/cjh01/testConfig.py >>>

<<< START filename: 1002:/home/choffman/testdir/testcases/cjh01/testConfig.py >>>

Get Fac1 = FW4100ES_PR2/SLOT01/PORT01/FACILITY01 Get Fac2 = FW4100ES_PR2/SLOT03/PORT01/FACILITY01 Get Xconn = {'TO': 'Fac1:1', 'RATE': 'STS3C', 'FROM': 'Fac2:1', 'DIR': '2WAY'}

File /home/choffman/testdir/testcases/cjh01/testConfig.py returned PASS. <<<

Test statistics: Start time 2013-09-23 15:26:49 -- End time 2013-09-23 15:26:49 -- 0.03 sec.

<<< END filename: 1002:/home/choffman/testdir/testcases/cjh01/testConfig.py >>>

===== ===== ===== ===== . . . All tests done . . . ===== ===== ===== =====

EP debug: Successful run!

bogdanpopescu commented 11 years ago

@CJHoffmann The issue is generated because Xconn / level2 / param1 has empty value. We'll fix this, but in the meantime you can populate a value for the parameter. git_issue

CJHoffmann commented 11 years ago

I no longer is this issue