browserup / browserup-proxy

BrowserUp Proxy is a free utility to watch, test, and manipulate web application network traffic and performance.
https://browserup.com
Apache License 2.0
164 stars 41 forks source link

BrowserUp Proxy can't rerun test. Cant start because is started, cant stop because is stopped?! #320

Open derRichter opened 3 years ago

derRichter commented 3 years ago

We make a test run, an stop the proxy after the run with proxy.stop() or proxy.start() The wen make a new instance private static BrowserUpProxy browserupProxy = new BrowserUpProxyServer();

on proxy.start() we got the error java.lang.IllegalStateException: Proxy server is already started. Not restarting ok we think we check if the proxy is startet with proxy.isStartet() and got true, but we can't stop them!!!???!!!

if (browserupProxy.isStarted()) {

    try {
        browserupProxy.abort();
    }
    catch (Exception quitError) {

        LogError.invoke(LogError, logIdent + "BrowserUpProxy beenden fehlgeschlagen! Stacktrace: "+ ExceptionUtils.getStackTrace(quitError));
    }
}

We got the stupid error Proxy server is already stopped. Cannot re-stop

This is very confusing.

How is the right way to stop the proxy and start a new instance on the same Test-Run in the same Java-VM??

greats