-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maven plugin: support headless execution of recorder's HAR mode #3894
Comments
What are you trying to do exactly? The raw result of an HAR conversion needs to be edited to fix correlation, inject dynamic data... |
Hi Stephane, We've got a bunch of HAR files which are generated from our instrumentation, and are looking to improve the automation in turning them into something Gatling-friendly. As you say, we expect to do a bit of editing on the generated scenarios so we're not looking for total automation, just 'a bit more' automation by filling in the gaps in the Maven plugin. So that we can bulk convert a directory of HAR files to a bunch of Gatling scenarios, which we can then edit as needed. (Rather than point-and-click in the recorder UI for each one.) |
That doesn't look like a good idea to me. Generated source dirs usually look like Anyway, this looks pretty complicated with lots of steps, with some of them not performed by Gatling. |
That's fair, we can leave out that bit of the feature request for now. |
Thoughts on whether there should be a single |
@chriskilding Sorry, I don't follow. |
If we keep a single If we have two targets, each Mojo would only need to take the arguments that the relevant mode requires, and we would not need a mode enum. For example |
Let's go with one single mojo for consistency so we keep on talking about the Recorder in proxy or har mode. |
@chriskilding Any update? |
Is it any update in this headless execution? I can't understand why the recorder allows the conversion with the GUI but there is no way to automate via maven plugin. I have been able to check the documentation and headless mode is documented as stated https://gatling.io/docs/gatling/reference/current/http/recorder/#headless-mode, but maven plugin seems to do not support it, as the output of mvn gatling:help -Ddetail=true -Dgoal=recorder does not show any option. Picking up the recorder.conf file seems to fail there, although I have tried with the following to inject it.
I am really interested in place the e2e tests from cucumber, which can generate HAR files, to use with Gatling. Thanks in advance. |
Executing under load the raw traffic generated from one single user is broken: you're going to test your caches (same database records, application caches, etc) and are going to get super good results that are actually not valid compared to the actual traffic. |
I think I have explained too badly my use case: Unfortunately, I don't see how to execute the headless conversion from HAR files from Maven. Is nothing related to a single user, but to have a base to dynamize it. Otherwise, there is a need to re-code, all the steps on the, for instance, Cucumber pipeline. HAR conversion works under GUI for Gatling recorder, but I can't convert with maven. The injection for dynamic conf files does not work when you use
The base recorder.conf file can be found https://github.com/gatling/gatling/blob/main/gatling-recorder/src/main/resources/recorder-defaults.conf and a copy from it has been introduce in the project, but anyway, it ignores to run on headless via maven execution. Is this a usage problem? I can also see that file named recorder.conf does not get packaged in the target folder. PD: As a reminder, Current mvn plugin options for mojo executer are: gatling:recorder
|
Proposal
I would like the Maven plugin to allow headless execution of the
recorder
target in HAR mode.To that end the following options come to mind:
Add missing properties to
recorder
targetAdd the missing HAR-related properties from ArgsParser to RecorderMojo:
mode
(enum:proxy
orhar
)headless
(boolean)harFilePath
(path)Define different
recorder
targets for proxy mode and HAR modeEach target would have the options that make sense for it.
Questions
This feature also questions a couple of the assumptions made by the existing Maven plugin
recorder
options, which I think are largely designed for the point-and-click proxy mode use case.src/test/scala
, but the usage I'm proposing implies generated code that we may not want to commit. Perhaps we need a convention for Gatling codegen in thetarget
directory (which is not in version control).harFilePath
option support/*
globbing to grab multiple files?Checklist
Make sure these checkboxes are checked before submitting your issue. Thanks you!
The text was updated successfully, but these errors were encountered: