Replies: 4 comments 3 replies
-
Hi, good question! I have never used the JUnit request element from JMeter. I would like to know more on how are you using existing JUnit tests in combination with JMeter, to give you a good advice on how to proceed. Without additional details, you may use jsr223 sampler with java lambda code to easily invoke any java code, but at the expense of portability for execution in remote engines (like BlazeMeter). Here we are discussing some options to be able to run lambdas in remote engines. Another possibility is using test element wrapper to use existing JUnit Request feature, but I think it would not be as seamless as using just java code. You may optionally implement a JMeter DSL extension, and contribute it to the tool, but I would like to know before more context on motivation, and review if aren't there any simpler solutions for that scenario. Regards |
Beta Was this translation helpful? Give feedback.
-
Hi, The reason, or actually the goal, is to "reuse" existing integration tests for performance testing. Anyway, I'm thinking about refactoring our ITs and extract the main logic to separate classes and use them on both sides (ITs and performance tests). I guess, that I have to select the "test element wrapper" approach mentioned above to achieve this, right? I would be interested to implement a sampler to execute JUnit 5 tests... |
Beta Was this translation helpful? Give feedback.
-
...hm, btw, the example on how to build own custom sampler based on test element wrapper does not match the actual implementation (i'm using the latest version 1.12) and the class hierarchy is different. is there an example implementation? |
Beta Was this translation helpful? Give feedback.
-
...never mind, i've implemented a custom sampler for executing JUnit 5 test cases (but in a different way as described in test element wrapper) and it works for me |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I want to call existing JUnit tests with JMeter DSL like in JMeter GUI with JUnit Request sampler.
Do I need to implement such (I guess new) sampler or do I have to use a jmx test plan and use it in the DSL?
Any other idea?
Thanks!
P.
Beta Was this translation helpful? Give feedback.
All reactions