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 without manually opening a browser. This setup is available for both Linux and Microsoft Windows, with this content focusing on the Windows setup. Note that the Headless Browser is a legacy feature; ServiceNow recommends using the ATF Test Generator and Cloud Runner for a streamlined experience, although Cloud Runner is not available for on-premise instances. On-premise users must continue using the Headless Browser option.
Show less
Prerequisites
- Instance requirements: Multi-Factor Authentication (MFA) must be disabled.
- User roles: Admin role on the ServiceNow instance and local administrator on the Windows host machine.
- Supported OS: Only Windows Server 2019 v10.0.17763.737 is supported. Other versions require a Linux host instead.
- Required software: Docker, Java keytool (installable via Chocolatey), and OpenSSL (installable via Chocolatey).
- Network configuration: Two-way communication between the ServiceNow instance and the Windows server is mandatory. At least one of the server’s IP address or hostname must be accessible from the instance.
- Firewall: Allow inbound access on port 2376 (or a custom port) from ServiceNow IP ranges.
Setup Steps
The setup involves seven sequential steps plus verification:
- Install Docker: Prepare Docker on the Windows server to support Headless Browser containers.
- Generate TLS/SSL certificates: Secure the Docker REST API and authenticate HTTP requests.
- Configure Docker Server: Set Docker to authenticate all incoming requests.
- Create Docker image and containers: Pull the Headless Browser Docker image from the Public Registry and create containers.
- Add Docker secrets: Store the ServiceNow user password securely in Docker Secrets for test execution authentication.
- Configure the ServiceNow instance: Prepare the instance to support Headless Browser functionality.
- Configure ATF properties: Set Automated Test Framework properties to enable Headless Browser usage.
- Verify setup: Confirm all configurations and communications are functioning correctly to ensure the Headless Browser is operational.
Practical Impact for ServiceNow Customers
By completing this setup, customers running on-premise ServiceNow instances with Windows Server 2019 can automate UI testing without manual browser interaction, enhancing test efficiency and reliability. The process requires careful network and security configurations to enable secure Docker container operations and seamless communication with the ServiceNow instance. Customers using cloud instances are encouraged to adopt Cloud Runner instead for a simpler, modern approach.
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.