You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The details of the element's description are within the reason statement, making it very hard to decipher. For example, an element-not-match reason looks like:
.../EarlGrey/Tests/FunctionalTests/Sources/FTRAccessibilityTest.m:33: error: -[FTRAccessibilityTest testAccessibilityValues] : Exception: Assertion 'assertWithMatcher: matcherForSufficientlyVisible(>=0.750000)' was not found
The reason statement appears twice.
In the "Complete Error" statement, it is possible that there is error nested inside on another error. And currently, only the description for the outermost error is shown.
To improve the error output, the proposal is to update the error in the following order:
Exception Name:...
Exception Reason: ...
Exception with Action: ... [Details of the Exception in JSON format]
Exception Details: Error Trace: ... [Error Trace of the Exception in JSON format]
Bundle ID: ...
Screenshots:...
Window hierarchy:...
Advantages are:
Details of the error will decoupled with the reason. For example, a swipe action error will have this description:
Exception Name: AssertionFailedException
Exception Reason: An action failed. Please refer to the error trace below.
Exception with Action: {
"ActionName" : "Swipe Up for duration 0.1",
"ElementMatcher" : "((respondsToSelector(isAccessibilityElement) && isAccessibilityElement) && accessibilityLabel(\"Window swipes start here\"))"
}
Error trace will allow you to view error-inside-error with ease.
Exception Details: Error Trace: [
{
"Description" : "Cannot swipe on view (V), as it has no window and it isn't a window itself.",
"Note" : {
"V" : "<UILabel: 0x7fe7cb608590; frame = (43 333; 234 55); text = 'Window swipes start here'; clipsToBounds = YES; opaque = NO; autoresize = RM+BM; userInteractionEnabled = NO; layer = <_UILabelLayer: 0x60000028f320>>"
},
"Domain" : "com.google.earlgrey.SyntheticEventInjectionErrorDomain",
"Code" : "0",
"File Name" : "GREYSwipeAction.m",
"Function Name" : "-[GREYSwipeAction perform:error:]",
"Line" : "111",
"TestCase Class" : "FTRGestureTest",
"TestCase Method" : "testSwipeOnWindow"
}
]
The organization of the output will be crispy...
Recovery suggestions will be added to an exception if there is any.
The text was updated successfully, but these errors were encountered:
The current error logging in EarlGrey is organized as:
Reason: ...
Bundle ID:...
Stack trace:...
Exception Name:...
Reason:... (AGAIN!)
Complete Error:...
Screenshots:...
Window hierarchy:...
The problem with the outputs are:
The reason statement appears twice.
In the "Complete Error" statement, it is possible that there is error nested inside on another error. And currently, only the description for the outermost error is shown.
To improve the error output, the proposal is to update the error in the following order:
Exception Name:...
Exception Reason: ...
Exception with Action: ... [Details of the Exception in JSON format]
Exception Details: Error Trace: ... [Error Trace of the Exception in JSON format]
Bundle ID: ...
Screenshots:...
Window hierarchy:...
Advantages are:
The organization of the output will be crispy...
Recovery suggestions will be added to an exception if there is any.
The text was updated successfully, but these errors were encountered: