RunCukesTest prevents the execution of other tests #304

Closed
vitormcruz opened this Issue Apr 21, 2012 · 20 comments

Comments

Projects
None yet
7 participants
@vitormcruz

Tried on IntelliJ. When I have a project with both features and common unit tests, the features get executed, but the other tests don't. If I comment @RunWith(Cucumber.class) from the RunCukes, other tests run as usual.

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Apr 22, 2012

Owner

Can you prove it in a way that doesn't involve random trial and error on our part?

Owner

aslakhellesoy commented Apr 22, 2012

Can you prove it in a way that doesn't involve random trial and error on our part?

@vitormcruz

This comment has been minimized.

Show comment Hide comment
@vitormcruz

vitormcruz Apr 22, 2012

Yes, I cloned cucumber-jvm and reproduced the error in the java-helloworld example, here is the link: https://github.com/vitormcruz/cucumber-jvm/tree/master/examples/java-helloworld

I investigate the problem a little more and cucumber isn't actually preventing JUnit to execute other tests, instead it is (apparently) preventing other tests to report its completion. The error stops from happening if I remove or comment the following snippet of code from RunCukesTest:

@Cucumber.Options(format = {"pretty", "html:target/cucumber"})

This error only happens with test classes that are in a package different than the RunCukesTest. Test classes that are on the same package of the RunCukesTest executes normally.

This was as far as I could get, hope I could help. :)

Yes, I cloned cucumber-jvm and reproduced the error in the java-helloworld example, here is the link: https://github.com/vitormcruz/cucumber-jvm/tree/master/examples/java-helloworld

I investigate the problem a little more and cucumber isn't actually preventing JUnit to execute other tests, instead it is (apparently) preventing other tests to report its completion. The error stops from happening if I remove or comment the following snippet of code from RunCukesTest:

@Cucumber.Options(format = {"pretty", "html:target/cucumber"})

This error only happens with test classes that are in a package different than the RunCukesTest. Test classes that are on the same package of the RunCukesTest executes normally.

This was as far as I could get, hope I could help. :)

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Apr 22, 2012

Owner

It prevents other tests from reporting completion where to? Eclipse? IntelliJ Idea? Maven? Ant? Other?

Owner

aslakhellesoy commented Apr 22, 2012

It prevents other tests from reporting completion where to? Eclipse? IntelliJ Idea? Maven? Ant? Other?

@vitormcruz

This comment has been minimized.

Show comment Hide comment
@vitormcruz

vitormcruz Apr 22, 2012

I tested on IntelliJ and Maven. It happened on both.

I tested on IntelliJ and Maven. It happened on both.

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Apr 22, 2012

Owner

Thanks for the details. I have managed to reproduce it now.

Owner

aslakhellesoy commented Apr 22, 2012

Thanks for the details. I have managed to reproduce it now.

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Apr 23, 2012

Owner

It appears that using a format like @Cucumber.Options(format = {"progress"}) causes a regular JUnit test to be stuck at yellow, while this does not: @Cucumber.Options(format = {"progress:progress.log"})

This is very odd. It seems that as long as Cucumber formatters write to file everything is fine, but as soon as they write to STDOUT it messes up the IDE's junit reporting.

I'm not sure if this is a JUnit bug, an IDE bug or a Cucumber bug...

Owner

aslakhellesoy commented Apr 23, 2012

It appears that using a format like @Cucumber.Options(format = {"progress"}) causes a regular JUnit test to be stuck at yellow, while this does not: @Cucumber.Options(format = {"progress:progress.log"})

This is very odd. It seems that as long as Cucumber formatters write to file everything is fine, but as soon as they write to STDOUT it messes up the IDE's junit reporting.

I'm not sure if this is a JUnit bug, an IDE bug or a Cucumber bug...

@vitormcruz

This comment has been minimized.

Show comment Hide comment
@vitormcruz

vitormcruz Apr 23, 2012

I tried to use JUnit directly, and the problem still happens. So we can say it is either a JUnit or a Cucumber bug. The outputs where:

With conf on:

JUnit version 4.10
Feature: Hello World
.
Scenario: Say hello ←[90m# cucumber\examples\java\hello
world\helloworld.feature:2←[0m
←[90mGiven ←[0m←[90mI have a hello app with "←[0m←[90m←[1mHowdy←[0m←[90m"←[0
m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
.←[1A ←[32mGiven ←[0m←[32mI have a hello app with "←[0m←[32m←[1mHowdy←[0m←[32
m"←[0m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
←[90mWhen ←[0m←[90mI ask it to say hi←[0m ←[90m# HelloStepd
efs.I_ask_it_to_say_hi()←[0m
.←[1A ←[32mWhen ←[0m←[32mI ask it to say hi←[0m ←[90m# Hello
Stepdefs.I_ask_it_to_say_hi()←[0m
←[90mThen ←[0m←[90mit should answer with "←[0m←[90m←[1mHowdy World←[0m←[90m"
←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m
.←[1A ←[32mThen ←[0m←[32mit should answer with "←[0m←[32m←[1mHowdy World←[0m←
[32m"←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m

With conf off:

JUnit version 4.10
....
.
Time: 0,102

OK (5 tests)

I tried to use JUnit directly, and the problem still happens. So we can say it is either a JUnit or a Cucumber bug. The outputs where:

With conf on:

JUnit version 4.10
Feature: Hello World
.
Scenario: Say hello ←[90m# cucumber\examples\java\hello
world\helloworld.feature:2←[0m
←[90mGiven ←[0m←[90mI have a hello app with "←[0m←[90m←[1mHowdy←[0m←[90m"←[0
m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
.←[1A ←[32mGiven ←[0m←[32mI have a hello app with "←[0m←[32m←[1mHowdy←[0m←[32
m"←[0m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
←[90mWhen ←[0m←[90mI ask it to say hi←[0m ←[90m# HelloStepd
efs.I_ask_it_to_say_hi()←[0m
.←[1A ←[32mWhen ←[0m←[32mI ask it to say hi←[0m ←[90m# Hello
Stepdefs.I_ask_it_to_say_hi()←[0m
←[90mThen ←[0m←[90mit should answer with "←[0m←[90m←[1mHowdy World←[0m←[90m"
←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m
.←[1A ←[32mThen ←[0m←[32mit should answer with "←[0m←[32m←[1mHowdy World←[0m←
[32m"←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m

With conf off:

JUnit version 4.10
....
.
Time: 0,102

OK (5 tests)

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Apr 23, 2012

Owner

I'm not sure I understand how this output proves that the regular JUnit test is not running. Please turn off ANSI colouring with @Cucumber.Options(monochrome = true)

Owner

aslakhellesoy commented Apr 23, 2012

I'm not sure I understand how this output proves that the regular JUnit test is not running. Please turn off ANSI colouring with @Cucumber.Options(monochrome = true)

@vitormcruz

This comment has been minimized.

Show comment Hide comment
@vitormcruz

vitormcruz Apr 23, 2012

With conf on:

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>java -classpath junit-4.10.jar;.\test-classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-core\1.0.3\cucumber-core-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-junit\1.0.3\cucumber-junit-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\gherkin\2.9.3\gherkin-2.9.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-java\1.0.3\cucumber-java-1.0.3.jar;E:\Projetos\cucumber-jvm\examples\java-helloworld\target\classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-html\0.2.1\cucumber-html-0.2.1.jar org.junit.runner.JUnitCore cucumber.examples.java.helloworld.RunCukesTest cucumber.examples.java.test.ExampleTest
JUnit version 4.10
Feature: Hello World
.
Scenario: Say hello # cucumber\examples\java\helloworld\helloworld.feature:2
. Given I have a hello app with "Howdy" # HelloStepdefs.I_have_a_hello_app_with(String)
. When I ask it to say hi # HelloStepdefs.I_ask_it_to_say_hi()
. Then it should answer with "Howdy World" # HelloStepdefs.it_should_answer_with(String)

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>

With conf off:

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>java -classpath junit-4.10.jar;.\test-classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-core\1.0.3\cucumber-core-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-junit\1.0.3\cucumber-junit-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\gherkin\2.9.3\gherkin-2.9.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-java\1.0.3\cucumber-java-1.0.3.jar;E:\Projetos\cucumber-jvm\examples\java-helloworld\target\classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-html\0.2.1\cucumber-html-0.2.1.jar org.junit.runner.JUnitCore cucumber.examples.java.helloworld.RunCukesTest cucumber.examples.java.test.ExampleTest
JUnit version 4.10
....
.
Time: 0,104

OK (5 tests)

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>

"I'm not sure I understand how this output proves that the regular JUnit test is not running."

JUnitCore uses a TextListerner to print those last lines of the test (If you want I can paste the code here):

Time: 0,104

OK (5 tests)

It seams to me that when cucumber conf is on, it prevents this part of the code to be executed. The report completion problem seams related with this output problem. Since the output problem occurs on IDEA, Maven and JUnit, I can only assume that the reporting problem persists on JUnit execution... I don't know how can I prove that, perhaps by implementing a custom listener? Anyway, the problem could be with some RunListener implemented by cucumber?

With conf on:

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>java -classpath junit-4.10.jar;.\test-classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-core\1.0.3\cucumber-core-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-junit\1.0.3\cucumber-junit-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\gherkin\2.9.3\gherkin-2.9.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-java\1.0.3\cucumber-java-1.0.3.jar;E:\Projetos\cucumber-jvm\examples\java-helloworld\target\classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-html\0.2.1\cucumber-html-0.2.1.jar org.junit.runner.JUnitCore cucumber.examples.java.helloworld.RunCukesTest cucumber.examples.java.test.ExampleTest
JUnit version 4.10
Feature: Hello World
.
Scenario: Say hello # cucumber\examples\java\helloworld\helloworld.feature:2
. Given I have a hello app with "Howdy" # HelloStepdefs.I_have_a_hello_app_with(String)
. When I ask it to say hi # HelloStepdefs.I_ask_it_to_say_hi()
. Then it should answer with "Howdy World" # HelloStepdefs.it_should_answer_with(String)

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>

With conf off:

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>java -classpath junit-4.10.jar;.\test-classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-core\1.0.3\cucumber-core-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-junit\1.0.3\cucumber-junit-1.0.3.jar;C:\Users\Vitor.m2\repository\info\cukes\gherkin\2.9.3\gherkin-2.9.3.jar;C:\Users\Vitor.m2\repository\info\cukes\cucumber-java\1.0.3\cucumber-java-1.0.3.jar;E:\Projetos\cucumber-jvm\examples\java-helloworld\target\classes;C:\Users\Vitor.m2\repository\info\cukes\cucumber-html\0.2.1\cucumber-html-0.2.1.jar org.junit.runner.JUnitCore cucumber.examples.java.helloworld.RunCukesTest cucumber.examples.java.test.ExampleTest
JUnit version 4.10
....
.
Time: 0,104

OK (5 tests)

E:\Projetos\cucumber-jvm\examples\java-helloworld\target>

"I'm not sure I understand how this output proves that the regular JUnit test is not running."

JUnitCore uses a TextListerner to print those last lines of the test (If you want I can paste the code here):

Time: 0,104

OK (5 tests)

It seams to me that when cucumber conf is on, it prevents this part of the code to be executed. The report completion problem seams related with this output problem. Since the output problem occurs on IDEA, Maven and JUnit, I can only assume that the reporting problem persists on JUnit execution... I don't know how can I prove that, perhaps by implementing a custom listener? Anyway, the problem could be with some RunListener implemented by cucumber?

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Apr 24, 2012

Owner

I think a custom RunListener would be helpful to get to the bottom of this. If you want to try that out, please merge your branch with cucumber/master first so that the helloworld example uses the latest code.

Owner

aslakhellesoy commented Apr 24, 2012

I think a custom RunListener would be helpful to get to the bottom of this. If you want to try that out, please merge your branch with cucumber/master first so that the helloworld example uses the latest code.

@vitormcruz

This comment has been minimized.

Show comment Hide comment
@vitormcruz

vitormcruz May 7, 2012

I did more investigantion and was unable to determine the source of the problem... It is very odd what is happening....

I did more investigantion and was unable to determine the source of the problem... It is very odd what is happening....

@tmertens

This comment has been minimized.

Show comment Hide comment
@tmertens

tmertens Oct 22, 2012

I have run across this (or a similar) problem as well. I am not sure from the comment history if my issue is the same or a new/different issue than what the original author experienced.

I am running cucumber-jvm tests from a main() class using JUnitCore.run(MyTest.class). (I have my reasons) After I run a cucumber test using the "pretty" formatter to display output on the console, all console output thereafter is lost to the abyss.

It seems that what is happening is when the "pretty" formatter is used, after the test run is complete, the formatter.close() method is called to close the output stream(s) for the formatter. This effectively closes the Standard.out stream so that no additional output is written to the console from ANY output call for the rest of the program execution. When the formatter is closed, it should not close the default System.out output stream.

This includes System.out and the log4j ConsoleAppender output, etc. Anything using System.out for output will not be printed to the console.

This does not seem to affect JUnit itself, as it only seems to affect tests run using @RunWith(Cucumber.class), and furthermore it only affects those tests which have the "pretty" formatter specified. For example, if only HTML/JSON output formats are specified, this bug will not occur.

For example:

public class App {
public static void main(String[] args) {
JUnitCore junitRunner = new JUnitCore();
Result run;
run = junitRunner.run(com.example.RunTest.class); //Output for this test is printed to the terminal
run = junitRunner.run(com.example.RunTest2.class); //Output for this test is NOT printed to the terminal
System.out.println("This is not output to the terminal.");
}
}

I have run across this (or a similar) problem as well. I am not sure from the comment history if my issue is the same or a new/different issue than what the original author experienced.

I am running cucumber-jvm tests from a main() class using JUnitCore.run(MyTest.class). (I have my reasons) After I run a cucumber test using the "pretty" formatter to display output on the console, all console output thereafter is lost to the abyss.

It seems that what is happening is when the "pretty" formatter is used, after the test run is complete, the formatter.close() method is called to close the output stream(s) for the formatter. This effectively closes the Standard.out stream so that no additional output is written to the console from ANY output call for the rest of the program execution. When the formatter is closed, it should not close the default System.out output stream.

This includes System.out and the log4j ConsoleAppender output, etc. Anything using System.out for output will not be printed to the console.

This does not seem to affect JUnit itself, as it only seems to affect tests run using @RunWith(Cucumber.class), and furthermore it only affects those tests which have the "pretty" formatter specified. For example, if only HTML/JSON output formats are specified, this bug will not occur.

For example:

public class App {
public static void main(String[] args) {
JUnitCore junitRunner = new JUnitCore();
Result run;
run = junitRunner.run(com.example.RunTest.class); //Output for this test is printed to the terminal
run = junitRunner.run(com.example.RunTest2.class); //Output for this test is NOT printed to the terminal
System.out.println("This is not output to the terminal.");
}
}

Mishail added a commit to Mishail/cucumber-jvm that referenced this issue Nov 23, 2012

@Mishail

This comment has been minimized.

Show comment Hide comment
@Mishail

Mishail Nov 23, 2012

Contributor

I've made quick and dirty patch which work well for me.

Contributor

Mishail commented Nov 23, 2012

I've made quick and dirty patch which work well for me.

@tmertens

This comment has been minimized.

Show comment Hide comment
@tmertens

tmertens Nov 27, 2012

Great! Any idea when this patch will make it to a release in the Maven repository?

Great! Any idea when this patch will make it to a release in the Maven repository?

@aslakhellesoy

This comment has been minimized.

Show comment Hide comment
@aslakhellesoy

aslakhellesoy Nov 27, 2012

Owner

@tmertens - I have received #430 from @Mishail
I don't do time estimates. It will land when it lands ;-)

Owner

aslakhellesoy commented Nov 27, 2012

@tmertens - I have received #430 from @Mishail
I don't do time estimates. It will land when it lands ;-)

@tmertens

This comment has been minimized.

Show comment Hide comment
@tmertens

tmertens Nov 27, 2012

Understood, thanks again for the fix :) This will be VERY helpful for me!

Understood, thanks again for the fix :) This will be VERY helpful for me!

@hieuduy

This comment has been minimized.

Show comment Hide comment
@hieuduy

hieuduy Jun 14, 2013

Hello,

I also experienced in this bug

Scenario: Say hello ←[90m# cucumber\examples\java\hello
world\helloworld.feature:2←[0m
←[90mGiven ←[0m←[90mI have a hello app with "←[0m←[90m←[1mHowdy←[0m←[90m"←[0
m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
.←[1A ←[32mGiven ←[0m←[32mI have a hello app with "←[0m←[32m←[1mHowdy←[0m←[32
m"←[0m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
←[90mWhen ←[0m←[90mI ask it to say hi←[0m ←[90m# HelloStepd
efs.I_ask_it_to_say_hi()←[0m
.←[1A ←[32mWhen ←[0m←[32mI ask it to say hi←[0m ←[90m# Hello
Stepdefs.I_ask_it_to_say_hi()←[0m
←[90mThen ←[0m←[90mit should answer with "←[0m←[90m←[1mHowdy World←[0m←[90m"
←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m
.←[1A ←[32mThen ←[0m←[32mit should answer with "←[0m←[32m←[1mHowdy World←[0m←
[32m"←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m

  • java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at
  • java.util.ArrayList.rangeCheck(ArrayList.java:604) at
  • java.util.ArrayList.remove(ArrayList.java:445) at
  • gherkin.formatter.PrettyFormatter.indentedLocation(PrettyFormatter.ja va:142)
  • at gherkin.formatter.PrettyFormatter.printStep(PrettyFormatter.java:255)
  • at gherkin.formatter.PrettyFormatter.result(PrettyFormatter.java:199) at
  • sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
  • sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  • java:57) at
  • sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  • sorImpl.java:43)

Not sure for what happened here but when I tried removing this option "pretty" in Test class then everything is passed fine.

hieuduy commented Jun 14, 2013

Hello,

I also experienced in this bug

Scenario: Say hello ←[90m# cucumber\examples\java\hello
world\helloworld.feature:2←[0m
←[90mGiven ←[0m←[90mI have a hello app with "←[0m←[90m←[1mHowdy←[0m←[90m"←[0
m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
.←[1A ←[32mGiven ←[0m←[32mI have a hello app with "←[0m←[32m←[1mHowdy←[0m←[32
m"←[0m ←[90m# HelloStepdefs.I_have_a_hello_app_with(String)←[0m
←[90mWhen ←[0m←[90mI ask it to say hi←[0m ←[90m# HelloStepd
efs.I_ask_it_to_say_hi()←[0m
.←[1A ←[32mWhen ←[0m←[32mI ask it to say hi←[0m ←[90m# Hello
Stepdefs.I_ask_it_to_say_hi()←[0m
←[90mThen ←[0m←[90mit should answer with "←[0m←[90m←[1mHowdy World←[0m←[90m"
←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m
.←[1A ←[32mThen ←[0m←[32mit should answer with "←[0m←[32m←[1mHowdy World←[0m←
[32m"←[0m ←[90m# HelloStepdefs.it_should_answer_with(String)←[0m

  • java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at
  • java.util.ArrayList.rangeCheck(ArrayList.java:604) at
  • java.util.ArrayList.remove(ArrayList.java:445) at
  • gherkin.formatter.PrettyFormatter.indentedLocation(PrettyFormatter.ja va:142)
  • at gherkin.formatter.PrettyFormatter.printStep(PrettyFormatter.java:255)
  • at gherkin.formatter.PrettyFormatter.result(PrettyFormatter.java:199) at
  • sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
  • sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
  • java:57) at
  • sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
  • sorImpl.java:43)

Not sure for what happened here but when I tried removing this option "pretty" in Test class then everything is passed fine.

@veenamohandas

This comment has been minimized.

Show comment Hide comment
@veenamohandas

veenamohandas Jul 24, 2016

+1

@veenamohandas

This comment has been minimized.

Show comment Hide comment
@veenamohandas

veenamohandas Jul 24, 2016

@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/feature/", tags = Config.tags, plugin = { "pretty",
        "html:target/cucumber" })

 @notnow
  Scenario: To verify the Get request response time.                  �[90m# RestTest.feature:24�[0m
    �[32mGiven �[0m�[32mI am calling GetUser request.�[0m                               �[90m# Stepdefenition.i_am_calling_GetUser_request()�[0m
    �[32mWhen �[0m�[32mI am calling request with url parameter "�[0m�[32m�[1m1�[0m�[32m"�[0m                  �[90m# Stepdefenition.i_am_calling_GetUser_request_with_parameter(String)�[0m
    �[32mThen �[0m�[32mI fire the get request.�[0m                                      �[90m# Stepdefenition.i_fire_the_request()�[0m
    �[32mThen �[0m�[32mI should be able to get the response in "�[0m�[32m�[1m3612�[0m�[32m" milliSeconds.�[0m �[90m# Stepdefenition.i_should_be_able_to_get_the_response_in_milliSeconds(String)�[0m

veenamohandas commented Jul 24, 2016

@RunWith(Cucumber.class)
@CucumberOptions(
features = "src/test/feature/", tags = Config.tags, plugin = { "pretty",
        "html:target/cucumber" })

 @notnow
  Scenario: To verify the Get request response time.                  �[90m# RestTest.feature:24�[0m
    �[32mGiven �[0m�[32mI am calling GetUser request.�[0m                               �[90m# Stepdefenition.i_am_calling_GetUser_request()�[0m
    �[32mWhen �[0m�[32mI am calling request with url parameter "�[0m�[32m�[1m1�[0m�[32m"�[0m                  �[90m# Stepdefenition.i_am_calling_GetUser_request_with_parameter(String)�[0m
    �[32mThen �[0m�[32mI fire the get request.�[0m                                      �[90m# Stepdefenition.i_fire_the_request()�[0m
    �[32mThen �[0m�[32mI should be able to get the response in "�[0m�[32m�[1m3612�[0m�[32m" milliSeconds.�[0m �[90m# Stepdefenition.i_should_be_able_to_get_the_response_in_milliSeconds(String)�[0m
@mathan91

This comment has been minimized.

Show comment Hide comment
@mathan91

mathan91 Jun 2, 2017

I get the following error when I run through CLI runner,

Main.main(new String[]{"-g", "com.sanity.step.definition","-t", "@" +getRequest[1], "C:/Users/IBM_ADMIN/Documents/Automation/Performance Testing/PerformanceTesting/MyFeature.feature"});

I get the following ouput,
�[32m.�[0m�[32m.�[0m�[31mF�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m

Also it just stops and doesn't execute the steps after that. I'm using Cucumber Core 1.1.2

mathan91 commented Jun 2, 2017

I get the following error when I run through CLI runner,

Main.main(new String[]{"-g", "com.sanity.step.definition","-t", "@" +getRequest[1], "C:/Users/IBM_ADMIN/Documents/Automation/Performance Testing/PerformanceTesting/MyFeature.feature"});

I get the following ouput,
�[32m.�[0m�[32m.�[0m�[31mF�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m�[36m-�[0m

Also it just stops and doesn't execute the steps after that. I'm using Cucumber Core 1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment