lacrosfaillog

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package lacrosfaillog provides a way to record logs on test failure.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(ctx context.Context, tconn *chrome.TestConn)

Save saves a lacros specific faillog. If the faillog directory already exists then it does nothing. This is to support the use case of adding multiple calls to Save over a test, and only getting the faillog for the first failure. tconn should be the ash-chrome TestConn.

func SaveIf

func SaveIf(ctx context.Context, tconn *chrome.TestConn, hasError func() bool)

SaveIf saves a lacros specific faillog if the hasError closure returns true. The intended use for this is to pass testing.State's HasError to this. tconn should be the ash-chrome TestConn.

func StartRecord

func StartRecord(ctx context.Context, tconn *chrome.TestConn) error

StartRecord starts screen record from keyboard. It clicks Ctrl+Shift+F5 then select to record the whole desktop. The caller should also call StopRecordFromKB to stop the screen recorder, and save the record file. For more, see https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/refs/heads/main/src/chromiumos/tast/local/chrome/uiauto/screen_recorder.go

func StopRecordAndSaveOnError

func StopRecordAndSaveOnError(ctx context.Context, tconn *chrome.TestConn, hasRecordStarted bool, hasError func() bool)

StopRecordAndSaveOnError stops the screen record and saves it under lacros faillog dir if the hasError closure returns true and there is a record started.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL