- Description
- Requirements
- Installing
- VM Configuration
- Desktop Tests
- Builder Tests
- Sending Messages to Telegram
- Report Portal Connection
- Downloading Virtual Machines
- Package URL Checker
A project for running tests inside VirtualBox virtual machines.
- Python 3.12
- VirtualBox 7.1.6
- Python package manager: uv
-
Install the
uvpackage manager:pip install uv
-
Downloading or create VirtualBox virtual machines for testing.
-
Set up VM Configuration:
- Make sure to specify the name of your network adapter.
-
(Optional) Set up Sending Messages to Telegram
-
(Optional) Set up Report Portal Connection
- cpus (optional): Number of virtual CPUs allocated to the VM.
- memory (optional): Amount of RAM in megabytes.
- audio (optional):
Set to
falseto disable audio devices and reduce overhead. - nested_virtualization (optional): Enables nested virtualization, allowing the VM to run other virtual machines.
- speculative_execution_control (optional): Enables protection against speculative execution vulnerabilities (e.g., Spectre, Meltdown).
- connect_type (optional):
Network connection type (e.g.,
bridged). - adapter_name (required): Name of the host network interface to bridge with. Required for proper network connectivity.
- branch (optional):
Git branch to download the script from (default:
master). - token_file (optional):
File name containing the Telegram token,
located in the
~/.telegramdirectory (default:token). - chat_id_file (optional):
File name containing the Telegram chat ID,
located in the
~/.telegramdirectory (default:chat). - password (optional): Password for the virtual machine user.
- hosts (required): List of virtual machine names to run tests on.
uv run inv desktop-test--versionor-v(required): Specifies the version of DesktopEditor.--headlessor-h(optional): Runs virtual machines in the background (headless mode).--processesor-p(optional): Number of threads to run tests in multithreaded mode (default:1).--nameor-n(optional): Name of a specific virtual machine to selectively run tests.--connect-portalor-c(optional): Enables report upload to Report Portal.--telegramor-t(optional): Send the report to Telegram.
- dep_test_branch (optional):
Git branch from which the
dep_testscript will be downloaded (default:master). - build_tools_branch (optional):
Git branch for downloading
build_toolsscripts (default:master). - office_js_api_branch (optional):
Git branch for downloading
office_js_apiscripts (default:master). - document_builder_samples (optional):
Git branch for downloading
document_builder_samples(default:master). - token_file (optional):
File name containing the Telegram token,
located in the
~/.telegramfolder (default:token). - chat_id_file (optional):
File name containing the Telegram chat ID,
located in the
~/.telegramfolder (default:chat). - password (optional): Password for the virtual machine user.
- hosts (required): Array of virtual machine names to run the tests on.
uv run inv builder-test--versionor-v(required): Specifies the version of DocBuilder.--headlessor-h(optional): Runs virtual machines in the background (headless mode).--processesor-p(optional): Amount threads to run tests in multithreaded mode (default:1).--nameor-n(optional): Name of the virtual machine to selectively run tests.--connect-portalor-c(optional): Enables report upload to Report Portal.--telegramor-t(optional): Send the report to Telegram.
To enable Telegram notifications (e.g. script termination reports),
you need to create the following files in the ~/.telegram directory:
tokenโ contains the Telegram bot token.chatโ contains the Telegram chat ID (channel or user).
To send messages via a proxy, create an additional file at
~/.telegram/proxy.json with the following content:
{
"login": "",
"password": "",
"ip": "",
"port": ""
}To enable integration with Report Portal,
you need to create a configuration file at the following path:
~/.report_portal/config.json
The file should have the following structure:
{
"endpoint": "https://reports.<your-host>.com",
"api_key": "your_api_key"
}By default, S3Wrapper will look for your
AWS credentials in the ~/.s3 directory:
~/.s3/key- contains your AWS Access Key ID~/.s3/private_key- contains your AWS Secret Access Key
To automatically download virtual machine .zip images from your configured S3 bucket, you can use the download-os task.
uv run inv download-os--coresor-c(optional) Amount threads to run tests in multithreaded mode.
- bucket_name (required): The name of the S3 bucket that contains VM image archives (.zip files).
- region (required): AWS region where the S3 bucket is located.
- download_dir (optional):
Local directory path where downloaded images should be saved.
(default location:
Project_dir/downloads)
PackageURLChecker is a utility for validating the existence of software package URLs (builder, desktop, etc.) based on version.
Run the URL checker using:
uv run inv check-package --version 9.0.0.123--versionor-v(required): Specifies the version of pakages.
--name or -n (optional):
Specifies a particular category to check (e.g. core, builder, desktop).