Mailingliste - Einträge 2005


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qftestJUI] calling a method of a class


  • Subject: [qftestJUI] calling a method of a class
  • From: farraige@?.pl
  • Date: Thu, 30 Jun 2005 13:45:12 +0200

Hi,

I have the following problem.
The setup node of my Test-suite contains the following SUT script:

import myresolver
import testresult

infoModelAlignmentResult = testresult.TestResult("InfoModelAlignment")
rc.setGlobal("IMTestResult", infoModelAlignmentResult)

I set here a global variable named IMTestResult which is an instance
of the class testresult.TestResult.

Now I would like to call one of methods of this class in another
node of the test-suite. I do the following:

IMTestResult.addSuccess(...)

Then I get the following error:

NameError: IMTestResult

Then I tried to modify the script a bit:

rc.lookup("IMTestResult").addSuccess

I got the error:
AttributeError: 'string' object has no attribute 'addSuccess'

How can I call a given method (via Jython script) of given class
(testresult.TestResult)instance defined as global variable in a
setup node of a test-suite?

Thank you in advance for hints.

Best Regards,
Sylwia



Videos Downloads Dokumentation Kaufen Gratis Testen