Last updated: Apr 02, 2019 16:07
When utilizing ReportiumExportUtils, for example as described here for downloading PDF reports:
PDF Download after Test execution
Download Summary PDF Report for a Job, in Java
It may be needed to define Proxy to connect to the DigitalZoom API, if working behind one.
It is not sufficient to define it as for the RemoteWebDriver as described here: Using Java RemoteWebDriver with proxy
Step-by-step guide
In the ReportiumExportUtils :
Add following lines:
//replace with the actual proxy host and port private static final String PROXY_H = "<proxy_host>"; private static final String PROXY_P = "<proxy_port>"; private static final String PROXY_HOST = System.getProperty("https.proxyHost", PROXY_H); private static final String PROXY_PORT = System.getProperty("https.proxyPort", PROXY_P);
right after:
private static final String PERFECTO_SECURITY_TOKEN = "MY_CONTINUOUS_QUALITY_LAB_SECURITY_TOKEN";
Then, add:
//need to import org.apache.http.HttpHost; private static HttpHost proxyHost = new HttpHost(PROXY_HOST, Integer.parseInt(PROXY_PORT));
right before:
private static HttpClient httpClient = HttpClientBuilder.create()
And, add following method:
.setProxy(proxyHost)
to:
private static HttpClient httpClient = HttpClientBuilder.create()
Related articles
PDF Download after Test execution
Download Summary PDF Report for a Job, in Java