Testing Multiple Operating Systems
Configuring Operating Systems in TestDriver GitHub Action
Overview
The TestDriver GitHub Action allows you to run tests on multiple operating systems, enabling cross-platform compatibility testing. By configuring the os
parameter, you can specify the operating system for your test environment. This flexibility ensures that your application behaves consistently across platforms.
Supported operating systems
The following operating systems are currently supported:
OS | Version | Instance Type | Architecture | Notes |
---|---|---|---|---|
windows | Windows Server 2022 Base | t2.large | 64-bit (x86) | Available to all users. |
mac | macOS Sonoma | mac1.metal | x86_64_mac | Available to Enterprise users. |
linux | Ubuntu 20.04 LTS | t2.large | 64-bit (x86) | Default for most workflows. |
Configuring the operating system
To specify the operating system, use the os
parameter in the GitHub Action configuration. For example:
Example: Running a test on Windows
Example: Running a test on macOS
Example: Running a test on Linux
Prerun scripts and OS-specific commands
Prerun scripts are executed on the specified operating system. The scripting language depends on the OS:
- Windows: Use PowerShell.
- macOS: Use Bash.
- Linux: Use Bash.
Example: Installing browsers based on OS
The following example demonstrates how to install Google Chrome or Firefox on Windows, macOS, and Linux using a prerun script:
Testing multiple operating systems and browsers
You can use the GitHub matrix strategy to test your application across multiple operating systems and browsers. This ensures comprehensive coverage for your tests.
Example: Matrix strategy for OS and browser testing
Full workflow example
Notes
- macOS Availability: macOS testing is only available to Enterprise customers.
- Prerun Scripts: Ensure your prerun scripts are compatible with the specified operating system.
- Cross-Platform Testing: Use the matrix strategy to test across multiple OS and browser combinations for maximum coverage.
- Linux Default: Linux is the default operating system for most workflows and is ideal for lightweight, fast testing.