see if this q/a helps
http://stackoverflow.com/questions/16784423/how-to-run-unittests-in-maven-which-is-in-src-test-integration-java-folder
It worked when I changed the the phase name, but After I ran my test cases it executing the texts correctly but the below message is appended to the result dunno why.
Feature: Logging into Salesforce
In order to work
As a sales person
I want to login
@login
Scenario Outline: Loggin in salesforce ?[90m# test\resources\salesforc
e\login\login.feature:8?[0m
?[36mGiven ?[0m?[36mI go to "loginURL" on "<Browser>"?[0m
?[36mAnd ?[0m?[36mI enter "username_xpath" as "<Username>"?[0m
?[36mAnd ?[0m?[36mI enter "password_xpath" as "<Password>"?[0m
?[36mAnd ?[0m?[36mI click on "loginButton"?[0m
?[36mThen ?[0m?[36mLogin should be "<ExpectedResult>"?[0m
Examples:
@login
Scenario Outline: Loggin in salesforce ?[90m# test\
resources\salesforce\login\login.feature:17?[0m
?[90mGiven ?[0m?[90mI go to "?[0m?[90m?[1mloginURL?[0m?[90m" on "?[0m?[90m?[
1mMozilla?[0m?[90m"?[0m ?[90m# LoginTest.I_go_to_sales
force(String,String)?[0m
?[1A ?[32mGiven ?[0m?[32mI go to "?[0m?[32m?[1mloginURL?[0m?[32m" on "?[0m?[3
2m?[1mMozilla?[0m?[32m"?[0m ?[90m# LoginTest.I_go_to_s
alesforce(String,String)?[0m
?[90mAnd ?[0m?[90mI enter "?[0m?[90m?[1musername_xpath?[0m?[90m" as "?[0m?[9
0m?[1mtestingselenium2015@gmail.com?[0m?[90m"?[0m ?[90m# CommonUtil.I_enter(Stri
ng,String)?[0m
?[1A ?[32mAnd ?[0m?[32mI enter "?[0m?[32m?[1musername_xpath?[0m?[32m" as "?[0
m?[32m?[1mtestingselenium2015@gmail.com?[0m?[32m"?[0m ?[90m# CommonUtil.I_enter(
String,String)?[0m
?[90mAnd ?[0m?[90mI enter "?[0m?[90m?[1mpassword_xpath?[0m?[90m" as "?[0m?[9
0m?[1msadhanapanda123?[0m?[90m"?[0m ?[90m# CommonUtil.I_enter(Stri
ng,String)?[0m
?[1A ?[32mAnd ?[0m?[32mI enter "?[0m?[32m?[1mpassword_xpath?[0m?[32m" as "?[0
m?[32m?[1msadhanapanda123?[0m?[32m"?[0m ?[90m# CommonUtil.I_enter(
String,String)?[0m
?[90mAnd ?[0m?[90mI click on "?[0m?[90m?[1mloginButton?[0m?[90m"?[0m
?[90m# CommonUtil.I_click_On(String)?[0m
?[1A ?[32mAnd ?[0m?[32mI click on "?[0m?[32m?[1mloginButton?[0m?[32m"?[0m
?[90m# CommonUtil.I_click_On(String)?[0m
?[90mThen ?[0m?[90mLogin should be "?[0m?[90m?[1mSuccess?[0m?[90m"?[0m
?[90m# LoginTest.Login_should_be(String)?[0m
?[1A ?[31mThen ?[0m?[31mLogin should be "?[0m?[31m?[1mSuccess?[0m?[31m"?[0m
?[90m# LoginTest.Login_should_be(String)?[0m
?[31morg.junit.ComparisonFailure: expected:<[Success]> but was:<[Failure]>
at org.junit.Assert.assertEquals(Assert.java:115)
at org.junit.Assert.assertEquals(Assert.java:144)
at salesforce.topmenu.LoginTest.Login_should_be(LoginTest.java:43)
at ?.Then Login should be "Success"(test\resources\salesforce\login\logi
n.feature:13)
?[0m
@login
Scenario Outline: Loggin in salesforce ?[90m# test\resources\salesforce\login
\login.feature:18?[0m
?[90mGiven ?[0m?[90mI go to "?[0m?[90m?[1mloginURL?[0m?[90m" on "?[0m?[90m?[
1mMozilla?[0m?[90m"?[0m ?[90m# LoginTest.I_go_to_salesforce(String,String)?[0m
?[1A ?[32mGiven ?[0m?[32mI go to "?[0m?[32m?[1mloginURL?[0m?[32m" on "?[0m?[3
2m?[1mMozilla?[0m?[32m"?[0m ?[90m# LoginTest.I_go_to_salesforce(String,String)?[
0m
?[90mAnd ?[0m?[90mI enter "?[0m?[90m?[1musername_xpath?[0m?[90m" as "?[0m?[9
0m?[1mxxx?[0m?[90m"?[0m ?[90m# CommonUtil.I_enter(String,String)?[0m
?[1A ?[32mAnd ?[0m?[32mI enter "?[0m?[32m?[1musername_xpath?[0m?[32m" as "?[0
m?[32m?[1mxxx?[0m?[32m"?[0m ?[90m# CommonUtil.I_enter(String,String)?[0m
?[90mAnd ?[0m?[90mI enter "?[0m?[90m?[1mpassword_xpath?[0m?[90m" as "?[0m?[9
0m?[1mxxx?[0m?[90m"?[0m ?[90m# CommonUtil.I_enter(String,String)?[0m
?[1A ?[32mAnd ?[0m?[32mI enter "?[0m?[32m?[1mpassword_xpath?[0m?[32m" as "?[0
m?[32m?[1mxxx?[0m?[32m"?[0m ?[90m# CommonUtil.I_enter(String,String)?[0m
?[90mAnd ?[0m?[90mI click on "?[0m?[90m?[1mloginButton?[0m?[90m"?[0m
?[90m# CommonUtil.I_click_On(String)?[0m
?[1A ?[32mAnd ?[0m?[32mI click on "?[0m?[32m?[1mloginButton?[0m?[32m"?[0m
?[90m# CommonUtil.I_click_On(String)?[0m
?[90mThen ?[0m?[90mLogin should be "?[0m?[90m?[1mFailure?[0m?[90m"?[0m
?[90m# LoginTest.Login_should_be(String)?[0m
?[1A ?[32mThen ?[0m?[32mLogin should be "?[0m?[32m?[1mFailure?[0m?[32m"?[0m
?[90m# LoginTest.Login_should_be(String)?[0m
C:\Users\Sadhana\Workspace\CucumberSF>
Below is my feature file content and its running test correctly but after all executions are done above error message is showing...
Also it never shows such message when I run through runner file.
The reports are also generating correctly.
Feature: Logging into Salesforce
In order to work
As a sales person
I want to login
@login
Scenario Outline: Loggin in salesforce
Given I go to "loginURL" on "<Browser>"
And I enter "username_xpath" as "<Username>"
And I enter "password_xpath" as "<Password>"
And I click on "loginButton"
Then Login should be "<ExpectedResult>"
Examples:
|Browser |Username |Password |ExpectedResult|
|Mozilla |testingselenium@gmail.com |abc |Success |
|Mozilla |xxx |xxx |Failure |
[quote:3hohshyl]Also it never shows such message when I run through runner file.
The reports are also generating correctly.[/quote:3hohshyl]
so when is error coming? when executing by pom?
its working for me. [color=#FF0000:616kzs5e]maven install[/color:616kzs5e].
[attachment=2:616kzs5e]Screenshot (11).png[/attachment:616kzs5e]
[attachment=1:616kzs5e]Screenshot (12).png[/attachment:616kzs5e]
[attachment=0:616kzs5e]Screenshot (13).png[/attachment:616kzs5e]
Yes, For me also its running fine on cmd, generating reports correctly . BUT after test cases are run the above error is showing .(See Screenshot )
Did you see anything after all testcases are completely executed ?
I couldn't execute the entire project because SalesForce tracks IP and was asking for a verification code which I don't have.
but it didn't gave any error like you are having.