Skip to content
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

Generate test clients for stress testing #1910

Open
wilsonmar opened this issue Jan 17, 2016 · 8 comments
Open

Generate test clients for stress testing #1910

wilsonmar opened this issue Jan 17, 2016 · 8 comments

Comments

@wilsonmar
Copy link

Client code currently generated by swagger-codegen is meant for manual invocation.

It would be a revolution in agility if, instead of waiting for test code to be written manually, that immediately after a change in swagger specs, for performance benchmarks be obtained based on generated client test code and test runs.

Provide an example tutorial of how to use swagger-codegen to automatically create and run performance tests. Perhaps use testing frameworks such as JMeter, Gatlin, LoadRunner, etc.

@wing328
Copy link
Contributor

wing328 commented Jan 18, 2016

@wilsonmar thanks for the feedback. There's a client template for JMeter and you can find it in https://editor.swagger.io under "Generate Client". Would that meet your requirement ?

@wing328
Copy link
Contributor

wing328 commented Feb 2, 2016

@wilsonmar did you have a chance to try the JMeter API client? Would that meet your requirement?

@wing328 wing328 added this to the v2.1.6 milestone Feb 2, 2016
@wilsonmar
Copy link
Author

@WIND328 Sorry, missed your earlier email.
The trick with generation of code is the customizations people want to have.
In the case of test clients, different people may want different features
in the client generated.
Also, the difference between a UI-based client and client for testing is
that no manual clicking is expected. I'll email you so we can discuss 1:1.
I've been designing a set of options that people can select before doing
the gen.
/ Wilson

On Tue, Feb 2, 2016 at 8:32 AM, wing328 notifications@github.com wrote:

@wilsonmar https://github.com/wilsonmar did you have a chance to try
the JMeter API client? Would that meet your requirement?


Reply to this email directly or view it on GitHub
#1910 (comment)
.

@foragerr
Copy link
Contributor

@wing328 The JMeter API does not use basePath correctly. Will raise a new issue for this.

@foragerr
Copy link
Contributor

@wilsonmar Generating a .c file for LoadRunner with web_custom_request() is trivial. But do you have any thoughts about generating an entire valid LoadRunner script?

@wilsonmar
Copy link
Author

@rage. I am so glad you asked. Yes. I have a LoadRunner API load test
script at
https://github.com/wilsonmar/LoadRunner/tree/master/gapi-lr-starter
(It's not for load testing Google, but as a template for a script that
calculates JWT tokens based on .p12 and JSON auth certificates).
As its README says, the script also makes use of HP's Virtual Table Service
and other useful features.

There are TODO steps in the script to note where customization would be
useful.

I also have a tutorial in a Word file explaining not just its coding but
also
how to obtain a Service Account from Google (again an example).

I am currently working on a JavaScript language version of the script.

BTW, this use of Swagger is a key part a whole approach (step-by-step
tutorial)
for using open-source software in performance testing I'm proposing at
http://github.com/wilsonmar/oss-perf

However, we may want to start off with something smaller like
the generator that creates a LoadRunner script from an Excel spreadsheet
http://www.wilsonmar.com/lrxls2vu.htm

On Thu, Feb 11, 2016 at 11:15 PM, RaGe notifications@github.com wrote:

@wilsonmar https://github.com/wilsonmar Generating a .c file for
LoadRunner with web_custom_request() is trivial. But do you have any
thoughts about generating an entire valid LoadRunner script?


Reply to this email directly or view it on GitHub
#1910 (comment)
.

@foragerr
Copy link
Contributor

@wilsonmar I looked at your excel macro script generation, you're still only generating only the .c file. I was asking about the remaining LR script files that forms the whole runnable script. Doing only .c files means there will be a manual step in copy pasting code into a LoadRunner script which is less than ideal IMO.

Nonetheless, I'm working on templates for a .c file with web_custom_request wrapped in lr_transaction. I should have something ready soon.

@wilsonmar
Copy link
Author

Did I mention that I'm familiar with those extra files?
My secret sauce for creating the other files is described in this diagram I
created several years ago:
http://wilsonmar.com/1loadrun.htm#LRArch

But we need to talk - please email me at wilsonmar@gmail.com. I'm also on
skype as wilsonmar4.

On Fri, Feb 12, 2016 at 11:53 AM, RaGe notifications@github.com wrote:

@wilsonmar https://github.com/wilsonmar I looked at your excel macro
script generation, you're still only generating only the .c file. I was
asking about the remaining LR script files that forms the whole runnable
script. Doing only .c files means there will be a manual step in copy
pasting code into a LoadRunner script which is less than ideal IMO.

Nonetheless, I'm working on templates for a .c file with
web_custom_request wrapped in lr_transaction. I should have something ready
soon.


Reply to this email directly or view it on GitHub
#1910 (comment)
.

@wing328 wing328 modified the milestones: Future, v2.1.6 Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants