Gauge test execution commandline

1,070 views
Skip to first unread message

cher...@gmail.com

unread,
Apr 13, 2016, 5:57:52 AM4/13/16
to getgauge
I tried to go to the gauge project directory. and ran "gauge --xxx.spec" . this didn't work. what's the  command line for execution of specification without tag?
is there any thing similar with cucumber test runner?

Kashish Munjal

unread,
Apr 13, 2016, 6:11:17 AM4/13/16
to getg...@googlegroups.com
The command to run specs is "gauge {path_to_spec_file/dir}"

Examples: 
  • gauge specs/
  • gauge specs/xxx.spec
Refer docs, for more info.

On Wed, Apr 13, 2016 at 3:27 PM, <cher...@gmail.com> wrote:
I tried to go to the gauge project directory. and ran "gauge --xxx.spec" . this didn't work. what's the  command line for execution of specification without tag?
is there any thing similar with cucumber test runner?

--
You received this message because you are subscribed to the Google Groups "getgauge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getgauge+u...@googlegroups.com.
To post to this group, send email to getg...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/getgauge/da9262e3-b18d-4329-b93f-7414d80dc97b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Kashish Munjal

cher...@gmail.com

unread,
Apr 14, 2016, 2:38:35 AM4/14/16
to getgauge

Hi,

Thanks for response.
I tried above command, it works now. But i ran into another issue. I set up the project with InteliJ. and my test specifications can be ran on IntelliJ but occured below errors when i use  gauge command to run. could you please help to take a look? and give some suggestion? My test cases have been pushed to github in case you need that. https://github.com/gtycherry/gaugeTest.git




在 2016年4月13日星期三 UTC+8下午6:11:17,kashishm写道:

Kashish Munjal

unread,
Apr 14, 2016, 2:48:51 AM4/14/16
to getg...@googlegroups.com
I think you are using maven. mvn test will run gauge specs. Please refer the docs, for more info on gauge integration with maven.


For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Kashish Munjal

cher...@gmail.com

unread,
Apr 14, 2016, 3:33:57 AM4/14/16
to getgauge
there is one error not captured in the screenshot is :

[INFO] process /usr/bin/javac with pid 13314 quit unexpectedly. exit status 1


[CRITICAL] Failed to start gauge API: Runner exited with error: exit status 1


在 2016年4月13日星期三 UTC+8下午6:11:17,kashishm写道:
The command to run specs is "gauge {path_to_spec_file/dir}"

Mahendra Kariya

unread,
Apr 14, 2016, 5:41:12 AM4/14/16
to getgauge
Hi,

This is by design. Screenshot is only captured when some step in the Gauge test suite fails.

The error you have mentioned here is about javac process getting killed suddenly. Since, no Gauge tests should be running during the code compilation phase, we don't see value in taking a screenshot for this error.



cher...@gmail.com

unread,
Apr 14, 2016, 11:11:53 PM4/14/16
to getgauge
Hi Kashish,

Thanks for response. I tried "mvn test" and "mvn gauge:execute -DspecsDir=specs" but met errors as below:




在 2016年4月14日星期四 UTC+8下午2:48:51,kashishm写道:

Kashish Munjal

unread,
Apr 15, 2016, 1:32:25 AM4/15/16
to getg...@googlegroups.com
Could you please update the gauge-maven-plugin to 1.1.0 and gauge-java to 0.3.4 in pom.xml and then try running specs.


For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Kashish Munjal

cher...@gmail.com

unread,
Apr 15, 2016, 1:55:03 AM4/15/16
to getgauge
Hi,

I tried what you suggested as below. it seems this doesn't help.



在 2016年4月15日星期五 UTC+8下午1:32:25,kashishm写道:

Kashish Munjal

unread,
Apr 15, 2016, 2:06:58 AM4/15/16
to getg...@googlegroups.com
Is it happening on the same Github project that you shared?
I tried running that project on my machine and it works fine.

Could you please make sure that you are using the latest version of maven?

Try removing target folder from the project and run mvn clean install after that.



For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Kashish Munjal

cher...@gmail.com

unread,
Apr 15, 2016, 5:48:31 AM4/15/16
to getgauge
Hi ,
 Thanks for your suggestion. The issue has been resolved after i upgrade my maven to the latest version. 

Here i still have 2 questions. Could you please help to clarify?

1. What is the difference between the gauge execution command and maven test command. I mean the different usage for "gauge - specs" and "mvn test"? what kind of situation i can use gauge self command?

2. Why the command "gauge --list-templates" can't be ran from my side? And what's the difference for set up project by IDE plugin and by command "gauge --init java_maven_selenium" ?

在 2016年4月15日星期五 UTC+8下午2:06:58,kashishm写道:

cher...@gmail.com

unread,
Apr 15, 2016, 5:49:30 AM4/15/16
to getgauge
BTW, i found the target folder is automatically generated even i remove it. What is this folder used for?


在 2016年4月15日星期五 UTC+8下午2:06:58,kashishm写道:
Is it happening on the same Github project that you shared?

Mahendra Kariya

unread,
Apr 16, 2016, 10:25:37 AM4/16/16
to getgauge
1. What is the difference between the gauge execution command and maven test command. I mean the different usage for "gauge - specs" and "mvn test"? what kind of situation i can use gauge self command?

If the user is using some build tool like Maven or Gradle, we recommend them to use "mvn test" or "mvn gauge:execute" or "gradle gauge", depending on the use case. This is because Gauge hands over the responsibility of setting the correct classpath to maven or gradle, in case the user is using it.

However, if the user doesn't want to use any build tool, Gauge will take on all the responsibilities. For such projects, we recommend using the command "gauge specs".

 
2. Why the command "gauge --list-templates" can't be ran from my side?

This command should ideally work for everyone. Could you please let us know the issue that you are facing while using this command?
 
And what's the difference for set up project by IDE plugin and by command "gauge --init java_maven_selenium" ?

When user runs "gauge --init java_maven_selenium",  Gauge creates a new mvn project from the Gauge selenium archetype. You can create a new project from this archetype in IntelliJ as well (Gauge documentation has more details). There is no difference. The only difference is that running "gauge --init" command is to create a new project from command line. Whereas IDE provides a nice GUI.

Please note that while creating the project from IDE, it is important to mention the correct archetype.





Mahendra Kariya

unread,
Apr 16, 2016, 10:29:03 AM4/16/16
to getgauge

On Fri, Apr 15, 2016 at 3:19 PM, <cher...@gmail.com> wrote:
BTW, i found the target folder is automatically generated even i remove it. What is this folder used for?

Maven stores all the compiled files in the target folder. On running "mvn clean", the target folder is deleted so that all the generated class files from the previous build are deleted. When you run the command "mvn test", the java files are recompiled and put in the target folder.

This is also the expected behavior. You can read more about the standard Maven project structure on its website.

 

cher...@gmail.com

unread,
Apr 17, 2016, 10:46:40 PM4/17/16
to getgauge
Hi, 

Much appreciation  for your clarification. 

For command "gauge --list-templates" , i create a new folder, and cd to that directory. Then used list templates command, but information 'flag provided but not defined: --list-templates' came up.

tried " gauge --init java_maven_selenium" command, below error occurred. "[CRITICAL] Failed to initialize. Failed to install plugin java_maven_selenium . Invalid plugin : Could not download java_maven_selenium-install.json file. File does not exist. "



在 2016年4月16日星期六 UTC+8下午10:25:37,Mahendra Kariya写道:

Mahendra Kariya

unread,
Apr 17, 2016, 11:55:33 PM4/17/16
to getgauge
On Mon, Apr 18, 2016 at 8:16 AM, <cher...@gmail.com> wrote:
For command "gauge --list-templates" , i create a new folder, and cd to that directory. Then used list templates command, but information 'flag provided but not defined: --list-templates' came up.

I just cross checked. The command "gauge --list-templates" is working fine. Could you please ensure that you are on the latest version of Gauge?
 
tried " gauge --init java_maven_selenium" command, below error occurred. "[CRITICAL] Failed to initialize. Failed to install plugin java_maven_selenium . Invalid plugin : Could not download java_maven_selenium-install.json file. File does not exist. "

The error should also have the HTTP status code. Could you please let us know the entire error message?

Please note that both these commands require internet access. If you are not connected to the internet, these commands will fail. If you are behind a proxy, please configure Gauge to use your proxy settings



cher...@gmail.com

unread,
Apr 18, 2016, 4:02:48 AM4/18/16
to getgauge
Is there any command i can use on MAC to upgrade installed Gauge directly? Per guidance here, there is no such a command line.

在 2016年4月18日星期一 UTC+8上午11:55:33,Mahendra Kariya写道:

Kashish Munjal

unread,
Apr 18, 2016, 4:09:04 AM4/18/16
to getg...@googlegroups.com
If you have installed Gauge using brew then you can run brew upgrade gauge. For more info, refer docs.

--
You received this message because you are subscribed to the Google Groups "getgauge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getgauge+u...@googlegroups.com.
To post to this group, send email to getg...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Thanks,
Kashish Munjal

cher...@gmail.com

unread,
Apr 18, 2016, 4:18:31 AM4/18/16
to getgauge
Thanks, it works for me now with the gauge project template after i upgrade gauge to the latest version.

在 2016年4月18日星期一 UTC+8下午4:09:04,kashishm写道:

Mahendra Kariya

unread,
Apr 18, 2016, 4:22:52 AM4/18/16
to getgauge
Glad to know it worked for you! :)
Reply all
Reply to author
Forward
0 new messages