Need help for POM file

Hi all,

i need help for POM file specially for gatling-maven-plugin.
I opened an project in Intellij Idea IDE which was working earlier(last year) and was created by other user.
I m facing issue now like when i want to execute my test cases after compiling code, it gives error:
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. → [Help 1]

I am not sure what i am missing. I tried other available goal like test, recorder instead of ‘execute’ but it dont execute mu code.

Also i am not able to find god documentation for this. Can you please help for this. This is urgent.

Regards,
Nidhish.

What’s the maven command you are using?
Best /Mohan

Hi!

Did you look at the demo project?

Cheers!

Hi Sebastian,

I referred that project in morning which was also mentioned on gatling.io/docs/current/extensions/maven_plugin/#maven-plugin
I updated all latest vales as per the POM file mentioned on github, but i am still getting error.

I just opened old code folder in Intellij idea, it already have scala plugin installed. I performed Build project step, compiled code and then run.
I am not sure id some commands need to be executed.
Apologies but i never worked on intellijidea and i am very new to this stuff.
Expecting your guidance.

Hi Mohan,

I am not sure about any command.

I just opened old code folder in Intellij idea, it already have scala plugin installed. I performed Build project step, compiled code and then run.
I am not sure id some commands need to be executed.
Apologies but i never worked on intellijidea and i am very new to this stuff.
Expecting your guidance.

You should execute it from the command prompt/terminal

Use the command at the root directory of the project and execute following command

mvn gatling:test

Here are the steps

https://github.com/gatling/gatling-maven-plugin-demo

It’s time to learn about maven

Best /Mohan

Hi Mohan,

yes I agree I need to learn about Maven. If you can provide me some reference websites, that will be helpful.
Here is update. When i used plugins latest version values in POM file, it gives me error. and when i used old pom file, and ran command from cmd prompt: mvn gatling:test, it worked fine and test ran executed successfully. here is screenshot.
However, after that when i clicked on Run button in Intellij Idea, it still complaining for that goal. Can you please help.

Most likely, you’ve been learning from a very old and unreliable source.
The goal was named “execute” a long time ago in Gatling 2 and was renamed into “test”.

Please check to the official documentation: https://gatling.io/docs/current/extensions/maven_plugin/#running-from-maven-lifecycle

Thanks Stephane,

I tried test goal also before shooting my question in the forum. Even now i tried it but still complaining about it.
AM i using correct phase? earlier it was ‘test’ and its valid now also i think.