This branch is specific for developers' development testing purpose, which does not connect report server but supports more workloads automation, bisect automation, running multiple chrome builds at one time, etc..
This is a test automation framework based on Playwright, supports key Web workloads automation testing on Chrome browser across multiple platforms, as well as automatically generating test result and sending test report via mail.
- Platforms: Windows, Linux
- Workloads: Speedometer2, WebXPRT3, Unity3D, JetStream2, WebXPRT2015, BaseMark, Aquarium, TensorFlow local benchmark(WASM/SIMD/WebGL backends)
- Node.js, recommend to use Node.js LTS, current this tool is based on Node.js (12.17.0 LTS).
The automation test mainly takes the following actions:
- Get the system information like CPU, Memory, OS.
- Launch the Chrome browser and read the GPU information and browser version.
- Launch the chrome and run each workload defined in config.json for several times. The test results of all arounds are recorded.
- Choose the middle value among the test arounds and store the device information and all the results of this workload test
to
./results/{platform}/{workload}
directory(If it does not exists, create it). The files are named as{data}_{CPU}_{Browser}.json
. - Generate a single report with summary of test results and send email to configured mail list. If there're any errors occured, send the errors information.
-
Go to this folder
-
npm install
-
Config test plan via config.json:
- Set test target in
workloads
fields, pls. don't edit the workload name while you can change the workload's url and running times viaurl
andrun_times
fields respectively. You can also remove some of these workloads to in order to run single workload testing. - To support both Windows and Linux platforms,
win_chrome_path
andlinux_chrome_path
are introduced. chrome_flags
is used for setting specific chrome flag.mail_dev_notice
field is used for setting mail list who'd like to receive report and the error message when the testing goes into something wrong or receive test report.- If you want to run the test at a specific schedule, you can simply set
useCron
totrue
inmain.js
, then setsched
const to when you need to schedule the test. chromium_builder
field is used for running test automation with specific chromium build from build server and bisect commits automatically. Currently only support for Windows platform. The build server will automatically build chromium at the head of commit id passed by user, then upload chromium build to http://powerbuilder.sh.intel.com/project/chromium_builder/, and then this tool get the corresponding chromium build to run testing at target device.- Single commit: Once you set
enable_chromium_build
totrue
, you must set thecommit_id
to the specific commit id for building chromium, usually you only need to pass the first 7 characters of a normal chromium commit id. The build server's host and port are set inhost
andport
fields by default. - Bisect commits: Set
enable_chromium_build
totrue
,use_bisect
totrue
,commits
fields to what you commits want to bisect with their commit id and commit number,pwd
to password of http://powerbuilder.sh.intel.com/project/chromium_builder/.
- Single commit: Once you set
- Set test target in
-
Run the test: restart the PC and go to this folder again and run:
node main.js
-
Run multiple chrome binaries:
- Create
configs
folder underwebpnp-test-automation
directory. - Put config.json files to
configs
folder and change the configuration as you need. - Run
node main.js multi
- Create
-
Add a new workload If you want to a new workload, you need:
- Update the
workloads
array of config.json. - Provide a workload executor module, place it to
src/workloads/
directory. - Update the
executors
object of the functiongenWorkloadsResults
insrc/run.js
.
- This tool uses playwright v1.0.0, which is only guarantee to support Chromium >= 84.0.4135.0.
- Tester should maintain the cpu_list.json file which is a CPU info lists used for finding matched CPU code name and corresponding competitor's test result.
- Before testing, please restart the test device to make a clean up environment.
- Update the