Recipe for exporting HAR files for load tests #2556
githubble01
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All!
I've noticed an increasing interest in (re-)running scenarios as load test. For instance, Testable.io is allegedly able to do this, see https://docs.testable.io/getting-started/serenity.html.
So I'm looking for a way to have Serenity produce HAR files that can be subsequently used in load tests using for instance Gatling, see https://www.james-willett.com/gatling-load-testing-complete-guide/.
I think this could be accomplished using
BeforeAWebdriverScenario
andAfterAWebdriverScenario
. The pseudo code below (based on browsermob-proxy ) creates one HAR file per testOutcome, making them easy to manage and run separately in Gatlin.In an attempt to implement this recipe myself I failed miserably :(. Adding the capability in
BeforeAWebdriverScenario
went well, but I couldn't find a way to pass theBrowserMobProxy
instance to theAfterAWebdriverScenario
so I could write thehar
to file.Simply misusing the capabilites
capabilities.setCapability("MOBProxy", mobProxy );
inBeforeAWebdriverScenario
and then doingBrowserMobProxy proxy = (BrowserMobProxy)RemoteDriver.of(driver).getCapabilities().getCapability("MOBProxy");
in theAfterAWebdriverScenario
does not work.First I tried with browsermob-proxy and then with serenity-browsermob-plugin .
I have also tried other approaches, such as #1656. The challenge of extracting the har file after a test outcome remains the same.
Any thoughts on how a har-export-recipe would look like?
Related to:
BR
Georg
Beta Was this translation helpful? Give feedback.
All reactions