-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
question about execution on the group testcases #158
Comments
Apologies, but I don't think I understand your email. Are you trying to
On Mon, Dec 29, 2014 at 5:11 AM, liPaozi [email protected] wrote:
|
Hi Rob! I was using the oft ,and I do not know whether the oft supports to run some special cases from my default cases file as my sanity cases automatically,I found the test group featrue in the main function of the file ./oft, How Can I configure on the special cases class?so I can run the designated cases |
runnig the designated cases,not all cases in the cases file *.py |
Hi all
When I want to choose some cases from multiple testcases directory ,what should I add before the the case subclass ,then the framwork will run the flag cases.
example about my case:
class ceth_ping_test(base_tests.BaseTest):
"""
Type:TEST_CASE
Test ceth ping function
Simply verify by output of ping
"""
def runTest(self):
logging.info("Running " + str(self))
case_name = self.class.name
also whether there will be another could solve the problem I could get the some cases as my sanity cases?I have found the involved code lines as following:
file/testutils.py:
def nonstandard(cls):
"""
Testcase decorator that marks the test as being non-standard.
These tests are not automatically added to the "standard" group.
"""
cls._nonstandard = True
return cls
def disabled(cls):
"""
Testcase decorator that marks the test as being disabled.
These tests are not automatically added to the "standard" group or
their module's group.
"""
cls._disabled = True
return cls
def group(name):
"""
Testcase decorator that adds the test to a group.
"""
def fn(cls):
if not hasattr(cls, "_groups"):
cls._groups = []
cls._groups.append(name)
return cls
return fn
in the oft function load_test_module:
if tests:
for (testname, test) in tests.items():
# Set default annotation values
if not hasattr(test, "_groups"):
test._groups = []
if not hasattr(test, "_nonstandard"):
test._nonstandard = False
if not hasattr(test, "_disabled"):
test._disabled = False
Thanks
Yiting.Li
The text was updated successfully, but these errors were encountered: