JMeter - Could not find the TestPlan class

后端 未结 7 869
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-02 02:44

I have a simple flume setup with a HTTP souce and a sink that writes the POST request payload to a file. (This complete setup is on a Linux machine).

After that my t

相关标签:
7条回答
  • 2021-01-02 03:12

    I had the same problem today with JMeter 2.13. When I saved it using this entry from the menu I received a jmx file that was accepted in non-GUI mode:

    0 讨论(0)
  • 2021-01-02 03:14

    Use bin/jmeter instead of your command line:

    • http://jmeter.apache.org/usermanual/get-started.html
    0 讨论(0)
  • 2021-01-02 03:15

    Possible you incorrect save your test plan. Try to open your flume_http_test.jmx i guess it contains only http request element without test plan element. Try to save your test with test plan element selected. http://joxi.ru/E2pvg4GSeLblrY

    0 讨论(0)
  • 2021-01-02 03:17

    User @Marged's suggestion to do a "Save As" on the .jmx worked for me as well. I kdiff'd the .jmx before and after the "Save As" to show the exact changes that make this work. See image below. Actually, I got it to work by only adding the 2nd change in the image. Specifically, I added the following line as the last child tag of the .jmx's <ThreadGroup>.

    <boolProp name="ThreadGroup.same_user_on_next_iteration">true</boolProp>
    

    0 讨论(0)
  • 2021-01-02 03:21

    In testplan.jmx file contains:

    <?xml version="1.0" encoding="UTF-8"?>
    <jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13 r1665067">
      <hashTree>
        <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
        ...
        </TestPlan>
    

    That contains predefined variables. But sometimes when you save your testplan.jmx like "Save as" this section can be missed. For my case, answer from @Marged help me: "File > Save test plan as..."

    0 讨论(0)
  • 2021-01-02 03:27

    I too had the same error message. After creating the Test Plan and successful trial run on a Windows machine in GUI mode, I uploaded the JMX file to a Linux server to run in Command line mode.

    After much searching and messing around I found that it was because I left the Test Plan name of the script to the default "Test Plan"!? When I changed it to "My Test Plan", for example, then saved and uploaded to the Linux server it ran successfully.

    0 讨论(0)
提交回复
热议问题