Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to import jmeter in IntelliJ IDEA

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to import jmeter in IntelliJ IDEA? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

1. Download and decompress the jmeter source code

* * address: http://jmeter.apache.org/download_jmeter.cgi, select the zip format under Source to download to the local

Extract to a local directory, such as my directory is D:softwareapache-jmeter-5.0

2. Modify the configuration (important! )

This step must be carried out, otherwise it cannot be imported!

When you enter the extracted directory, you will see two files: eclipse.classpath and eclipse.projecte, modified to .classpath and .projecte, respectively.

Cannot be modified directly under windows, use the cmd command line

Open the cmd command line window, go to the directory of the extracted source code, and execute the following command:

Ren .eclipse.classpath .classpath

Ren .eclipse.project .project

3. Import IDEA

Open IDEA and import the source code.

File-> New-> Project from Existing Sources, select the source directory

Select Import by eclipse project, as follows:

Everything else can be done by default and always Next.

4. Ant download depends on jar package

In the Ant Build on the right side of the window, click +, select build.xml under the source directory, and all relevant information will be displayed in the list on the right.

Double-click the download_jars in the list and automatically download all missing jar packages to the lib directory of the jmeter source directory

5. Update the dependent jar package in the project

When the project is imported for the first time, the dependent jar package is automatically added under dependency, but it is all missing. When we download the jar package with Ant, IDEA will not be updated automatically, but must be updated manually.

Right-click on the project to open Open Module Settings, under the project src, click the protocol folder, then click the Sources button above, and click Apply.

Click Dependencies to delete all jar packets that reported errors

Re-add the newly downloaded jar package: + on the right, select JARs or directories, select the lib directory under the source code directory and several directories under lib, and finally Apply:

6 、 Ant install

After you re-add the jar package, you must execute Ant install.

7. Set the running VM options

The startup class of JMeter is NewDriver, you can find this class first, try to run it, and you will definitely report an error and cannot find the path.

Because the parent directory to be found is the default in the jmeter startup class, the path cannot be found, so you need to manually configure the home path of the jmeter runtime in VM options.

Enter-Djmeter.home=D:myWorkapache-jmeter-5.0 in VM options, as shown below:

At this point, run NewDriver again, and you can start the jmeter interface normally!

After reading the above, have you mastered how to import jmeter into IntelliJ IDEA? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report