tabswitchcuj

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: 27 Imported by: 0

Documentation

Overview

Package tabswitchcuj contains the test code for TabSwitchCUJ. The test is extracted into this package to be shared between TabSwitchCUJRecorder and TabSwitchCUJ.

Steps to update the test:

  1. Make changes in this package.
  2. "tast run $IP ui.TabSwitchCujRecorder" to record the contents. Look for the recorded wpr archive in /tmp/tab_switch_cuj.wprgo.
  3. Update the recorded wpr archive to cloud storage under gs://chromiumos-test-assets-public/tast/cros/ui/ It is recommended to add a date suffix to make it easier to change.
  4. Update "tab_switch_cuj.wprgo.external" file under ui/data.
  5. "tast run $IP ui.TabSwitchCuj" locally to make sure tests works with the new recorded contents.
  6. Submit the changes here with updated external data reference.

Package tabswitchcuj contains the test code for TabSwitchCUJ. The test is extracted into this package to be shared between TabSwitchCUJRecorder and TabSwitchCUJ.

Index

Constants

View Source
const (
	// WPRArchiveName is used as the external file name of the wpr archive for
	// TabSwitchCuj and as the output filename under "/tmp" for
	// TabSwitchCujRecorder.
	WPRArchiveName = "tab_switch_cuj.wprgo"
)

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, s *testing.State)

Run runs the TabSwitchCUJ test. It is invoked by TabSwitchCujRecorder to record web contents via WPR and invoked by TabSwitchCUJ to exercise the tests from the recorded contents.

func Run2

func Run2(ctx context.Context, s *testing.State, cr *chrome.Chrome, caseLevel Level, isTablet bool, lFixtVal lacrosfixt.FixtValue)

Run2 runs the TabSwitchCUJ test. It is invoked by TabSwitchCujRecorder2 to record web contents via WPR and invoked by TabSwitchCUJ2 to execute the tests from the recorded contents. Additional actions will be executed in each tab.

Types

type Level

type Level uint8

Level indicate how intensive of this test case is going to execute.

const (
	Basic Level = iota
	Plus
	Premium
	Record
)

Level indicate how intensive of this test case is going to execute.

Basic is the level to use to run this case in basic level Plus is the level to use to run this case in plus level Premium is the level to use to run this case in basic level Record is the level to use to run this case in *record mode*

type TabSwitchParam

type TabSwitchParam struct {
	BrowserType browser.Type // Chrome type.
	Tracing     bool         // Whether to turn on tracing.
	Validation  bool         // Whether to add extra cpu loads before collecting metrics.
}

TabSwitchParam holds parameters of tab switch cuj test variations.

Jump to

Keyboard shortcuts

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