class GTest(object): ROBOT_LIBRARY_SCOPE = "TEST CASE" counter = 0 def __init__(self): GTest.counter += 1 def count(self): return self.counter, id(self) |
*** Settings *** Documentation Suite description Library GTest.py *** Test Cases *** Test title [Tags] DEBUG @{res} count log many @{res} Test title2 [Tags] DEBUG @{res} count log many @{res} |
class GTest(object): ROBOT_LIBRARY_SCOPE = "TEST SUITE" counter = 0 def __init__(self): GTest.counter += 1 def count(self): return self.counter, id(self) |
*** Settings *** Documentation Suite description Library GTest.py *** Test Cases *** Test title [Tags] DEBUG @{res} count log many @{res} Test title2 [Tags] DEBUG @{res} count log many @{res} |
class GTest(object): ROBOT_LIBRARY_SCOPE = "GLOBAL" counter = 0 def __init__(self): GTest.counter += 1 def count(self): return self.counter, id(self) |
class GTest(object): ROBOT_LIBRARY_SCOPE = "GLOBAL" counter = 0 def __init__(self, *args): self.args = args GTest.counter += 1 def count(self): return self.counter, id(self) |
*** Settings *** Documentation Suite description Library GTest.py suite1 login1 *** Test Cases *** Test title [Tags] DEBUG @{res} count log many @{res} Test title2 [Tags] DEBUG @{res} count log many @{res} |
*** Settings *** Documentation Suite description Library GTest.py login2 suite2 *** Test Cases *** Test title [Tags] DEBUG @{res} count log many @{res} Test title2 [Tags] DEBUG @{res} count log many @{res} |
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |