Headless Browser setup for Microsoft Windows
Summarize
Summary of Headless Browser setup for Microsoft Windows
The ServiceNow® Headless Browser for Automated Test Framework (ATF) enables automated testing by eliminating the need to manually open a browser. This setup guide focuses on configuring the Headless Browser on Microsoft Windows, specifically Windows Server 2019 (v10.0.17763.737), which is the only supported Windows version for this feature. Note that the Headless Browser is considered a legacy option; ServiceNow recommends using the ATF Test Generator and Cloud Runner for improved ease of use and experience. However, on-premise instances must continue with Headless Browser as Cloud Runner is not available for them.
Show less
Prerequisites
- MFA must be disabled on your ServiceNow instance.
- Required roles: admin on the ServiceNow instance and local administrator on the Windows host.
- Host operating system must be Windows Server 2019 version 10.0.17763.737.
- Installed software on the Windows server:
- Docker
- Java keytool (via Chocolatey)
- OpenSSL (via Chocolatey)
- Two-way network communication between the ServiceNow instance URL and the Windows server must be established, allowing inbound access on port 2376 (or a custom Docker port) from the instance IP ranges.
Setup Steps
The setup consists of seven main steps plus verification:
- Install Docker: Set up Docker on the Windows server to support Headless Browser operations.
- Generate Certificates: Create TLS/SSL certificates to secure the Docker REST API and enable authenticated HTTP requests.
- Configure Docker Server: Configure Docker to authenticate all incoming requests securely.
- Create Docker Image and Containers: Pull the necessary Docker image from the Public Registry and create containers.
- Add Secrets to Docker: Use Docker Secrets to securely store the ServiceNow user password for executing tests.
- Set up ServiceNow Instance: Configure your ServiceNow instance to support the Headless Browser operations.
- Configure Automated Test Framework (ATF): Set relevant ATF properties to integrate with the Headless Browser.
Verification
After completing the setup steps, verify that the Headless Browser is functioning correctly within ATF on your Windows server to ensure successful automated test execution.
The ServiceNow® Headless Browser for Automated Test Framework (ATF) provides automation so you can skip having to manually open a browser during testing. The Headless Browser setup is available in both Linux and Microsoft Windows. This topic covers the setup for Windows.
There are several sequential procedures to follow in the one-time setup. Below are the instructions for the Microsoft Windows setup.
Prerequisites
- Make sure that the following programs are installed on your Windows server:
- Docker: Install Docker for Headless Browser setup for Microsoft Windows
- Java keytool: Chocolatey tool for javaruntime
- OpenSSL: Chocolatey tool for openssl
- Two-way communication
- There must be two-way communication between the instance URL and your server.
- Find the IP address of your server and get your hostname. You can use one or both of them, but you need at least one. Make sure the address or hostname are visible from your ServiceNow instance.
- See My IP Address to find the IP address ranges of your instance. You can then configure your server to allow inbound access to all of the indicated IP addresses/ranges.
- Use Port 2376 or your own default port for this procedure. Make sure your server's firewall rules allow inbound requests on this port from the IP addresses you get from the instance.
Note:If you don't have a hostname and are connecting via the IP address, you can enter the IP address and put "localhost" in the Hostname environment variable. - To learn more, see Use TLS (HTTPS) to protect the Docker daemon socket.
Steps to set up the Headless Browser for Windows
Follow these seven steps (plus verification) to set up the Headless Browser for Windows.