Documentation
¶
Overview ¶
Package faillog provides helper functions for dumping UI data on test failures.
Package faillog provides helper functions for dumping UI data on test failures.
Index ¶
- func DumpUITree(ctx context.Context, outDir string, tconn *chrome.TestConn)
- func DumpUITreeOnError(ctx context.Context, outDir string, hasError func() bool, ...)
- func DumpUITreeOnErrorToFile(ctx context.Context, outDir string, hasError func() bool, ...)
- func DumpUITreeToFile(ctx context.Context, outDir string, tconn *chrome.TestConn, fileName string)
- func DumpUITreeWithScreenshotOnError(ctx context.Context, outDir string, hasError func() bool, cr *chrome.Chrome, ...)
- func SaveScreenshotOnError(ctx context.Context, cr *chrome.Chrome, outDir string, hasError func() bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpUITree ¶
DumpUITree Dumps the whole UI tree data to 'ui_tree.txt'.
func DumpUITreeOnError ¶
func DumpUITreeOnError(ctx context.Context, outDir string, hasError func() bool, tconn *chrome.TestConn)
DumpUITreeOnError dumps tree to 'ui_tree.txt', when the test fails. Use DumpUITreeOnErrorToFile, if you want to specify the fileName.
func DumpUITreeOnErrorToFile ¶
func DumpUITreeOnErrorToFile(ctx context.Context, outDir string, hasError func() bool, tconn *chrome.TestConn, fileName string)
DumpUITreeOnErrorToFile checks the given hasError function and dumps the whole UI tree data into a file 'fileName' when the test fails. It does nothing when the test succeeds. TODO(b/201247306): The dump content may not include ARC UI tree due to timing issue.
func DumpUITreeToFile ¶
DumpUITreeToFile Dumps the whole UI tree data into a file 'fileName'.
func DumpUITreeWithScreenshotOnError ¶
func DumpUITreeWithScreenshotOnError(ctx context.Context, outDir string, hasError func() bool, cr *chrome.Chrome, filePrefix string)
DumpUITreeWithScreenshotOnError checks the given hasError function and dumps the whole UI tree data into 'filePrefix'.txt and a screenshot into 'filePrefix'.png when the test fails. It does nothing when the test succeeds.
Types ¶
This section is empty.