-
Notifications
You must be signed in to change notification settings - Fork 186
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
Record suite info in test summary yaml. #949
base: master
Are you sure you want to change the base?
Changes from all commits
54f9bee
fd0c097
3985e78
74e4363
efb5d76
c272a9a
34c1787
50003aa
0684828
f9bce18
ce91462
929cfe8
4b432ed
47408b0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,3 +95,38 @@ def setup_suite(self, config): | |
def teardown_suite(self): | ||
"""Function used to add post tests cleanup tasks (optional).""" | ||
pass | ||
|
||
# Optional interfaces that users can override to record customized suite | ||
# information to test summary. | ||
|
||
def get_suite_name(self): | ||
"""Override to return a customized suite name (optional). | ||
|
||
Use suite class name by default. | ||
|
||
Returns: | ||
A string that indicates the suite name. | ||
""" | ||
return self.__class__.__name__ | ||
|
||
def get_run_identifier(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is "run identifier"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for key run context that will be displayed as part of the title in our result viewer. Through this we can include info like the phone brand and phone model. |
||
"""Override to record identifier describing the key run context (optional). | ||
|
||
Users can include test runtime info as this method will be called after all | ||
test classes are executed. | ||
|
||
Returns: | ||
A string that indicates key run context information. | ||
""" | ||
return None | ||
|
||
def get_suite_info(self): | ||
"""Override to record user defined extra info to test summary (optional). | ||
|
||
Users can include test runtime info as this method will be called after all | ||
test classes are executed. | ||
|
||
Returns: | ||
A dict of suite information. Keys and values must be serializable. | ||
""" | ||
return {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this just be part of the suite info?
why should it be a separate getter method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test suites can return any custom values in
suite info
, our infra won't parse it and just write it to summary file.So I created separate getter methods for fields that our infra needs to parse.