2

I am trying to use browsermob-proxy to generate multiple HAR files parallelly.

My configuration is launching two instances of same spec.js, and each instance launches one IE browser with different port, and generates one har file.

However, the generated data is merged into one file.

For example, if each HAR file is supposed to have 5 requests, then one file has 10 requests, and the other has 0 request.

With Chrome, and Firefox, it is OK. Both browsers generate a different file respectively. Only IE merges the result into one file.

Each instance makes their own proxy to start with different port in its beforeEach function.

beforeEach(function (done) {
            ...
    browser.controlFlow().execute(function () {
        var proxy = new Proxy();

        browser.params.proxy = proxy;
        Q.ninvoke(proxy, 'start', port) // make this port to be called dynamically
            .then(
                function (data) {
                    console.log('data', data);
                }, 
                function () {
                    console.log('start failed');
                });
        });

        browser.controlFlow().execute(function () {
            browser.params.proxy.startHAR( port, 'test', done);
        });
        }
    );

});

Any advice would be appreciated.

alecxe
  • 414,977
  • 106
  • 935
  • 1,083
Totoro78
  • 33
  • 4

0 Answers0