The Google Benchmarking project comprises Python scripts designed to execute various use cases and scenarios on a computing system. Additionally, certain scripts are tailored to conduct measurements, including time measurements, pertinent to these use cases. This project is compatible with both ChromeOS and Windows operating systems, ensuring versatility across different computing environments.
Furthermore, the automation code within the project supports two major web browsers for the Windows operating system: Google Chrome and Microsoft Edge. This enables users to conduct benchmarking and automation tasks seamlessly across these browsers, enhancing the project's utility and applicability in a broader range of scenarios.
Python and pip installed on the local machine. [Python Installation Steps]
Installation of required Python packages using the provided requirements file.
Installation of required Chrome Driver for Google Chrome browser. [Google Chrome Driver Installation Steps]
Installation of required Edge Driver for Microsoft Edge browser. [Microsoft Edge Driver Installation Steps]
For running native apps on Windows we need to have the following:
constant.py
file, for example: C:\Program Files\Microsoft Office\root\Office16\EXCEL.exe
ScreenTip style
option equal to Don't show ScreenTips
by navigate to File menu -> Options -> General -> ScreenTip style. Add the testing email and password that will be shared with you in .env file.
To run the code on Windows. You need to add the project to environment paths:
PYTHONPATH
with the absolute path of the project on your local machine as its value.https://www.python.org/ftp/python/3.12.0/python-3.12.0-amd64.exe
Add python.exe to PATH
.Customize installation
and ensure that all the options are selected (the default), then press Next
.Install Python 3.12 for all users
and then press the Install
button.Close
button.python --version
in the command prompt; it should return Python 3.12.0
.To install the Chrome driver. You can follow the installation link below:
https://googlechromelabs.github.io/chrome-for-testing/
Install the compatible version with your Google Chrome browser. You can check your Google Chrome browser by opening the browser: Help -> About Google Chrome
Extract the compressed file then move the executable file to your Local Disk (C:) C:\chromedriver.exe
.
To install the Edge driver. You can follow the installation link below:
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
Install the compatible version with your Microsoft Edge browser. You can check your Microsoft Edge browser by opening the browser: Help and feedback -> About Microsoft Edge
Extract the compressed file then move the executable file to your Local Disk (C:) C:\msedgedriver.exe
.
https://github.com/microsoft/WinAppDriver/releases/download/v1.2.1/WindowsApplicationDriver_1.2.1.msi
WinAppDriver.exe
.WinAppDriver.exe
to run it.https://www.chromium.org/chromium-os/developer-library/guides/development/developer-guide/#installing-chromiumos-on-your-device
https://www.chromium.org/chromium-os/developer-library/guides/debugging/debug-buttons/
PYTHONPATH
should have absolute path to the project on your local machine.export PATH="$HOME/.local/bin:/usr/bin:$PATH" export PATH=$PATH:/usr/local/bin export PYTHONPATH="<absolute path to the project>"
source ~/.bashrc
after adding them.python3 --version
and to install pip use this command python3 -m ensurepip
python3 -m pip install -r requirements.txt
/usr/local/chromedriver/chromedriver
root
) Add --remote-debugging-port=9222
at the end of /etc/chrome_dev.conf.chronos
) Run netstat -al | grep 9222
and make sure localhost
is listening.pip install -r requirements.txt
python automated_use_cases\excel\excel_google_web.py
Microsoft Edge
instead of the default behavior that will open Google Chrome from Windows terminal:python automated_use_cases\load_cnn\load_cnn.py edge
python3 automated_use_cases/excel/excel_google_web.py
Microsoft Edge
instead of the default behavior that will open Google Chrome from ChromeOS terminal:python3 automated_use_cases/load_cnn/load_cnn.py edge
We can run a single test for each command, with the test script names provided in the list below:
Windows and ChromeOS platform:
Windows platform: