Global JSON File

The Global JSON file (global.json) is a configuration file that contains settings that determines how AIQ operates and interacts with applications under test.

The global.json file is located in the ..\aiq_distribution\NetworkProxy\config directory.

Many of these configuration settings are set in the various Test Options dialogs in the AIQ user interface. Changing a setting there will update the global.json file.

See the following topics on setting test options in AIQ:

If you need to make any manual changes, you can edit the file directly in Notepad++ or similar editors. AIQ must be restarted after editing the global.json file for any changes to take effect.

Be very careful when making any changes to the global.json file. The settings in this file directly affect the behavior of AIQ.

General Settings

The "general" section contains a variety of configuration settings. Below are some examples of those settings. For ease of reading, the "general" are broken into several subsections in this topic.

Copy
    "general": {
        "printURLsInjectedJS": false,
        "createFilesResponses": false,
        "enableProxyAtOSLevel": false,
        "interactive": false,
        "incognitoMode": true,
        "visualAccessor": false,
        "readSocketRetries": 0,
        "stepTimeOutMiliSeconds": 120000,
        "printURLs": false,
        "xpathSearch": false,
        "overrideProxy": {
            "server": "127.0.0.1",
            "portHttps": 9998,
            "password": "",
            "excludeDomains": "127.0.0.1,localhost,www.staticDomain.com,*.wildcardDomain.com",
            "urlPac": "",
            "portHttp": 9998,
            "enabled": false,
            "username": ""
        },
        "connectionTimeout": 60000,
        "minBrowserStartDelay": 1000,
        "apiEnabled": true,
        "negotiate": {
            "password": "PASSWORD",
            "domain": "",
            "workstation": "",
            "enabled": false,
            "username": "USERNAME"
        },
  • "printURLsInjectedJS" - ???

  • "createFilesResponses" - ???

  • "enableProxyAtOSLevel" - If set to true, enable the system level proxy and will not to use the browser level proxy.

  • "interactive" - ???

  • "incognitoMode" - Determines if Incognito Mode is enabled.

  • "visualAccessor" - Determines if Visual Accesors will be used in test scripts.

  • "readSocketRetries" - To read the values, retires given for socket connection.

  • "stepTimeOutMiliSeconds" - The time in milliseconds (ms) in which a step times out. By default this is set to 90000 ms (90 seconds).

  • "printURLs" - ???

  • "xpathSearch" - Determines if XPath Search is enabled.

  • "overrideProxy" - ???

  • "connectionTimeout" - The time in milliseconds (ms) in which a request from AIQ to the application server will time out. By default this is set to 60000 ms (60 seconds).

  • "minBrowserStartDelay" - The time in milliseconds (ms) before a browser launches. By default this is set to 1000 ms (1 second).

  • "apiEnabled" - ???

  • "negotiate" - ???

Copy
        "aiAccessorPreferences":false,
        "debug": false,
        "displayNums": true,
        "consoleLog": false,
        "setDownload": [
            "application/pdf",
            "image/jpeg",
            "image/apng",
            "image/webp",
            "text/xml",
            "image/png",
            "application/xml",
            "video/mp4"
        ],
  • "aiAccessorPreferences" - Determines if the Accessor Preferences AI Engine will be used. See Accessor Preferences AI Engine for more information on this option.

  • "debug" and "consoleLog" - Setting them to true will display all the stack-trace and error logs. Setting them to false will disable all the logging.

  • "displayNums" - Determines if line numbers are displayed in Test Designer (Classic).

  • "setDownload" - Determines the types of files that can be downloaded. You can edit the list to add more entries if there are any additional file types that you need to download from the application under test.

    By default it contains the following types:

    • "application/pdf"
    • "image/jpeg"
    • "image/apng"
    • "image/webp"
    • "text/xml"
    • "image/png"
    • "application/xml"
    • "video/mp4"
Copy
        "proxy": {
            "httpPort": 9090,
            "httpsPort": 9091,
            "enabled": true
        },
        "useOSProxy": false,
        "ntlm": {
            "password": "yourpassword",
            "domain": "https://yourdomain.com",
            "workstation": "https://yourdomain.com",
            "enabled": false,
            "username": "yourusername"
        },
        "inject": true,
        "compatibility": false,
        "autoScrollLogs": true,
        "setFindOnlyEnabled": true,
        "forcedShadowDom": false
    },
  • "proxy" - The ports that Test Designer uses by default are mentioned here.

  • "useOSProxy" - Determines if the proxy settings in the OS will be used rather than the "proxy" settings.

  • "ntlm" - If the app under test uses any ntlm authentication, the creds, and other details are to be provided here.

  • "basic auth" - If the app under test uses any basic authentication, the details should be provided here.

  • "inject" - Set to true by default, it injects all the Test Designer scripts to take the application under test to record.

  • "compatibility" - To be set to true when working with IE and to set jquery compatibility.

  • "autoScrollLogs" - Determines if logs auto scroll. This setting only applies to Web Designer (Classic). Logs autoscroll by default in the Web Designer interface.

  • "SetFindOnlyEnabled" - Option to find an element only if it is enabled on a page.

  • "forcedShadowDom" - A global setting. This option can also be set in the Test Options dialogs. See About Shadow DOM Settings for information on how the two settings interact.

Accessor Preferences

The "edit" section contains the accessor preferences order and priority that you set in the Test Options dialog in Web Designer, Test Designer (Classic) and Mobile Designer.

Copy
    "edit": {
        "mobileAccessorList": [
            "SmartTags",
            "AccessibilityId",
            "Id",
            "Predicate",
            "ClassChain",
            "XPathAccessibilityId",
            "XPathId",
            "XPath",
            "XPathText",
            "XPathIndex",
            "XPathContains",
            "XPathClass",
            "XPathAbsolute",
            "Image",
            "image",
            "text",
            "Custom",
            "XY",
            "Unknown"
        ],
        "accessorList": [
            "SmartTag",
            "Parent",
            "AttrTitle",
            "XPathId",
            "AttrClass",
            "XPathName",
            "Id",
            "AttrName",
            "AttrValue",
            "AttrAlt",
            "AttrHref",
            "Src",
            "Text",
            "XPath",
            "XPathClass",
            "XPathText",
            "AbsoluteXPath",
            "RelativeXPath",
            "TableXPath",
            "Attribute",
            "Image",
            "JQuery",
            "Index"
        ]
    },

 

Reviewer question - what is the difference between excluded and blocked domains in a practical sense in AIQ?

Excluded Domains

The "exclude" section contains all the domains that will be excluded during test recording playback.

This is a sample from the global.json file.

Copy
            "exclude": {
                "urls": [],
                "domains": [
                    "*googletagmanager.com",
                    "*labs.iadvize.com",
                    "firefox.settings.services.mozilla.com",
                    "firefox-settings-attachments.cdn.mozilla.net",
                    "location.services.mozilla.com",
                    "shavar.services.mozilla.com",
                    "tracking-protection.cdn.mozilla.net",
                    "content-signature-2.cdn.mozilla.net",
                ]

 

The above sample has been edited for length. The default global.json file contains more excluded domains.

Blocked Domains

The "block" section contains all the domains that need to be blocked during test recording playback.

This is a sample from the global.json file.

Copy
            "block": {
                "urls": [
                    "*/baselogin4.js",
                    "*/LoginMarketingSurveyResponse.js"
                ],
                "domains": [
                    "*eloqua.com",
                    "*doubleclick.net",
                    "*adsafeprotected.com",
                    "*postrelease.com",
                    "*script.crazyegg.com",
                    "*seal.websecurity.norton.com",
                    "*s7.addthis.com",
                    "*seal.digicert.com",
                    "*v1.addthis.com",
                    "*v1.addthisedge.com",
                    "*google-analytics.com"
                ]

Repository Configurations

These sections contains the configuration settings for your chosen repository types. See Repositories for links to the information on configuring various types of repositories.

This is a sample of how an Amazon S3 repository configuration appears in the global.json file.

Copy
    "aws": {
        "s3": {
            "secretKey": "SECRETKEY",
            "secret": "",
            "enabled": false,
            "key": "KEY"
        }
    },

 

Platform

The "platforms" section contains platform and OS related settings and paths including command line options. There are separate sections for Linux, Windows, and Mac OS.

There are options for various browsers and mobile devices. See the Browser Options section for examples of browser options.

Copy
    "platforms": {
        "linux": {
            "browsers": [
                {
                    "paths": [
                        "/usr/bin/google-chrome-stable",
                        "/usr/bin/google-chrome",
                        "/usr/bin/chromium-browser"
                    ],
                    "name": "ChromeSystemProfile",
                    "options": [
                        {
                            "name": "disable-web-security",
                            "value": "false"
                        },
                        {
                            "name": "ignore-certificate-errors",
                            "value": "false"
                        }
                    ]
                },


    [SESCTIONS DELETED]

                {
                    "groupName": "mobile",
                    "paths": [
                        "C:/Program Files/Google/Chrome/Application/chrome.exe",
                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
                    ],
                    "name": "iPad",
                    "options": [
                        {
                            "name": "window-size",
                            "value": "784,944"
                        },
                        {
                            "name": "window-sizeOriginal",
                            "value": "768,812"
                        },
                        {
                            "name": "disable-web-security",
                            "value": "false"
                        },
                        {
                            "name": "experimentalDS3",
                            "value": "--force-device-scale-factor=1"
                        }
                    ],
                    "userAgent": "iPad"
                },
                


    [SESCTIONS DELETED]


    },

The above sample has been edited for length. This sample shows the sections for Google Chrome on Linux and an iPad configuration for mobile testing. The default global.json file contains many more platform configurations.

Browser Options

This section shows command line options that have been set for Google Chrome. Note than you can set different options for different instances of a browser. The following sample shows different settings for Google Chrome, Google Chrome System Profile, and Google Chrome Headless browsers.

Copy
        "windows": {
            "browsers": [

                {
                    "paths": [
                        "C:/Program Files/Google/Chrome/Application/chrome.exe",
                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
                    ],
                    "name": "Chrome",
                    "options": [
                        {
                            "name": "disable-web-security",
                            "value": "false"
                        },
                        {
                            "name": "ignore-certificate-errors",
                            "value": "false"
                        },
                        {
                            "name": "disable-extensions",
                            "value": "true"
                        }
                    ]
                },
                {
                    "paths": [
                        "C:/Program Files/Google/Chrome/Application/chrome.exe",
                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
                    ],
                    "name": "ChromeSystemProfile",
                    "options": [
                        {
                            "name": "disable-web-security",
                            "value": "false"
                        },
                        {
                            "name": "ignore-certificate-errors",
                            "value": "false"
                        }
                    ]
                },
                {
                    "paths": [
                        "C:/Program Files/Google/Chrome/Application/chrome.exe",
                        "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
                    ],
                    "name": "ChromeHeadless",
                    "options": [
                        {
                            "name": "no-sandbox",
                            "value": "true"
                        },
                        {
                            "name": "ignore-certificate-errors",
                            "value": "true"
                        },
                        {
                            "name": "disable-extensions",
                            "value": "false"
                        },
                        {
                            "name": "disable-web-security",
                            "value": "false"
                        },
                        {
                            "name": "disable-gpu",
                            "value": "true"
                        },
                        {
                            "name": "experimentalDS3",
                            "value": "--disk-cache-size=1||--window-size=1920,1080||--force-device-scale-factor=1.0"
                        }
                    ]
                },

For example, Google Chrome command line options include:

  • --new-window
  • --start-maximized
  • --disable-popup-blocking
  • --no-first-run
  • --disable-translate
  • --disable-extensions
  • --proxy-server=<scheme>=<uri>[:<port>][;...] | <uri>[:<port>] | "direct://"
  • --no-sandbox
  • --ignore-certificate-errors-spki-list

Refer to the browser specific documentation for information on command line settings.