运行 gatling 项目时出错 "object gatling is not a member of package io import io.gatling.app.Gatling"
Getting error while runnign gatling project "object gatling is not a member of package io import io.gatling.app.Gatling"
我正在尝试 运行 从浏览器记录为 har 脚本的测试并导入到 Intellij 中的项目 IDE。当我 运行ning 项目时出现错误:
object gatling is not a member of package io import io.gatling.app.Gatling
下面附上截图。
任何线索都会有所帮助。
如我对您问题的评论所述,您需要将 Gatling 包添加到 pom.xml
文件中的 Maven 构建配置中。 Maven 上的 IntelliJ Idea 帮助页面有添加 Maven 包的说明:
Add a new Maven module to an existing project
You can add a Maven module to the project in which you are already
working.
- In the Project tool window, right-click the project folder and select
New | Module.
- Alternatively, from the main menu, select File |
New | Module to open the New Module wizard.
If you used main menu to add a module then the process of adding a module is the same as Creating a new Maven project.
If you are adding sub modules by right-clicking the root folder then the process of adding a new module is shorter.
- You need to specify the name of your module in the Name field.
The rest of the information is added automatically and you can use either the default settings or change them according to your preferences.
我正在尝试 运行 从浏览器记录为 har 脚本的测试并导入到 Intellij 中的项目 IDE。当我 运行ning 项目时出现错误:
object gatling is not a member of package io import io.gatling.app.Gatling
下面附上截图。
任何线索都会有所帮助。
如我对您问题的评论所述,您需要将 Gatling 包添加到 pom.xml
文件中的 Maven 构建配置中。 Maven 上的 IntelliJ Idea 帮助页面有添加 Maven 包的说明:
Add a new Maven module to an existing project
You can add a Maven module to the project in which you are already working.
- In the Project tool window, right-click the project folder and select New | Module.
- Alternatively, from the main menu, select File | New | Module to open the New Module wizard.
If you used main menu to add a module then the process of adding a module is the same as Creating a new Maven project.
If you are adding sub modules by right-clicking the root folder then the process of adding a new module is shorter.
- You need to specify the name of your module in the Name field. The rest of the information is added automatically and you can use either the default settings or change them according to your preferences.