Running recorder without a UI

Has there been any investigation into running the recorder without the UI?

The use case here is that I’m looking to automate Simulation generation based off Geb (Selenium) scenarios. The product I work on is written in AngularJS and I fear that the Gatling simulations will become out of sync with the actual requests made by the Simulation - so if I could run Geb through GatlingHttpProxy, I could then create the simulations automatically and stay up-to-date, or at least be notified when requests have changed to make manual updates.

I’m not looking for it to be written for me, just looking to bounce this idea off the group and maybe work through how it could become feasible.

Thanks!

The tricky thing is how to trigger the Recorder to stop.
Any idea?

I was thinking of controlling this through a Gradle plugin. It would start the recorder prior to running Geb, and on completion stop the recorder.

Sure, you could do that to. I think we would have to refactor a bit, I realize UI and proxy stuff are tightly coupled, which is bad bad bad.
@Pierre, WDYT?

It’s a bit less coupled since the last refactoring but, as Stéphane said, the Recorder would need some refactoring to run in headless mode.
But low coupling is always nice anyway :wink:

FTW, I ended up refactoring the GatlingRecorder, which is called by my Geb tests on setup/teardown to control start/stopping recording. Unforuntately, I’m shutting down the proxy after each test class - I need to figure out how to only shut it down once the tests are complete.

I also overwrote the RecorderController and axed all cases where the UI is used. Everything else was able to remain the same.

If we work through all of the problems and the code I’ve written gets cleaned up, would this be something you’d be interested in merging into the main repository?

CONFIDENTIAL COMMUNICATION:
This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

Of course, contributions are always welcome !
Don’t hesitate to make a PR, we can then work through the problems you encountered.

If you’re OK with it, I’d like to refactor first the RecorderController, to remove that tight coupling between the controller and the UI.
IMO, it would be easier then to plug in the “headless mode” you wrote.

Cheers,

Pierre

Absolutely. RecorderController can be first. Is this something that you’re looking to put on your own roadmap to direct, or derive from whatever I come up with?

CONFIDENTIAL COMMUNICATION:
This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

If you’re okay with it, i’d like this refactoring to direct your contribution, because :

  • adding another way to interact with the Recorder will inevitably leads to this refactoring to do it as cleanly as possible
  • Basically, i’d like to come to a design where you would have to fill a few gaps, and boom, it’s done :wink:

I believe that refactoring the Recorder beforehand would save both us some trouble !
I would start working on it right away, you wouldn’t have to come back in 6 months, it’s a promise :wink:
WDYT ?

Pierre,

That sounds great to me - I’m all for less trouble! Are we looking at 1.x and/or 2.0 as the target for this refactor?

CONFIDENTIAL COMMUNICATION:
This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.

2.0 will be the target, as there is already some refactoring made on 2.0 branch (which include looser coupling between some components which is, after all, all this new refactoring would be about ;)) and the codebase changed greatly (about 40%).
Backporting it would mean a LOT of fun :slight_smile:

Okay. There shouldn’t be a problem for me to update our suite to 2.0. :slight_smile:

CONFIDENTIAL COMMUNICATION:
This email may contain confidential or legally privileged material, and is for the sole use of the intended recipient. Use or distribution by an unintended recipient is prohibited, and may be a violation of law. If you believe that you received this email in error, please do not read, forward, print or copy this email or any attachments.  Please delete the email and all attachments, and inform the sender that you have deleted the email and all attachments. Thank you.