Do we need to use JMeter Tool for .jmx file generation or write java code using eclipse etc

1.1k Views Asked by At

I am an intermediate in JMeter, using JMeter tool for performance and load testing. I learnt JMeter using the online tutorials. I happen to see few threads where people writing the java code for creating the .jmx file(JMeter script file). I am confused whether to learn scripting using java or jmeter tool

As an industry standard of performance testing using JMeter, what is preferred, writing the script file using java or generating using the JMeter tool?

How to use TestPlanCheck batch file to check the .jmx file?

What would be the output if my file is correct.

When I tried to check the file, in command prompt I got the below message.

DEBUG   2015-06-12 12:17:32.858 [kg.apc.j] (): Orig jmeter home dir: D:\Performa
nceTest\apache-jmeter-2.13\apache-jmeter-2.13\lib\ext
DEBUG   2015-06-12 12:17:33.027 [kg.apc.j] (): Final jmeter home dir: D:\Perform
anceTest\apache-jmeter-2.13\apache-jmeter-2.13
INFO    2015-06-12 12:17:33.045 [jmeter.u] (): Setting Locale to en_US
INFO    2015-06-12 12:17:33.431 [kg.apc.j] (): Loading user properties from: D:\
PerformanceTest\apache-jmeter-2.13\apache-jmeter-2.13\bin\user.properties
INFO    2015-06-12 12:17:33.455 [kg.apc.j] (): Loading system properties from: D
:\PerformanceTest\apache-jmeter-2.13\apache-jmeter-2.13\bin\system.properties
ERROR: java.lang.IllegalArgumentException: Unknown option: xxxx_Inpu
t.jmx
*** Problem's technical details go below ***
Home directory was detected as: D:\PerformanceTest\apache-jmeter-2.13\apache-jme
ter-2.13\lib\ext
Exception in thread "main" java.lang.IllegalArgumentException: Unknown option: xxxx_Input.jmx
        at kg.apc.cmdtools.TestPlanCheckTool.processParams(TestPlanCheckTool.jav
a:91)
        at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:63)
        at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:23)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:174)
1

There are 1 best solutions below

0
On BEST ANSWER

It is recommended to use JMeter GUI to create .jmx Test Plan. Once you develop test script there are following options to execute it:

  1. Command-line non-GUI mode
  2. JMeter Ant task
  3. JMeter Maven Plugin
  4. Continuous integration systems plugins, i.e. for Bamboo or Jenkins
  5. Option to run JMeter form Java code

See 5 Ways To Launch a JMeter Test without Using the JMeter GUI guide for detailed description of all above methods, hopefully it'll help you to choose the right option.