TestCafe Proxy Settings with disableNativeAutomation
Use TestCafe’s request proxy and bypass settings in its supported automation mode, with the destination application configured separately.
TestCafe’s upstream proxy setting is unavailable in Native Automation mode. For a project using that setting, its configuration can explicitly select the supported mode:
{
"disableNativeAutomation": true,
"proxy": "proxy.example:8080",
"proxyBypass": "localhost,*.internal.example"
}
Merge this fragment into the existing TestCafe configuration file. The application URL remains the application URL; proxy identifies the intermediary used by TestCafe’s request path. For permitted public-site tests using the unauthenticated form, the HTTP proxy list supplies candidate host and port values.
The command-line equivalents are --proxy and --proxy-bypass. For a documented authenticated form, the proxy string can contain username:password@host:port. Supply real account data through the test environment’s intended credential handling.
Bypass patterns use TestCafe’s supported syntax. A request matching one can go direct even though another request in the same test uses the intermediary.
Keep the automation mode with a proxy report. Changing the proxy address cannot make an unsupported mode consume that setting. Likewise, a proxy option is not a hook for inspecting arbitrary request internals; TestCafe exposes separate request-hook APIs for that purpose.