Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass a csv file in 'Examples' in Feature file and read values from CSV file in Java cucumber #363

Closed
dipakbachhav opened this issue Apr 18, 2018 · 2 comments

Comments

@dipakbachhav
Copy link

In Cucumber 'Feature file '-> 'Examples' , how to set path for CSV file.
Sample.feature

Feature:Launch an app 
Scenario Outline:Validation of the application
    Given User navigates to application
    When User logs in using valid appname '<Name>'
Examples:    
    @sources:src/test/resources/data_tables/temp.csv
    | Name |

Junit Runner:

package definitions;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import cucumber.api.CucumberOptions;
import org.junit.runner.RunWith;

@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features = "src/test/resources/features/Sample.feature" )
public class AcceptanceTestSuite{

}
Used CSV file

temp.csv
name,
Google,
But I didnt retrieve values from temp.csv file, result was 0 Scenarios 0 Steps 0m0.000s

2.Also wanted to know in Java Cucumber with Serenity, how to readvalues from CSV file that is mentioned in Feature file.

Kindly help to sort out this issue.

@aslakhellesoy
Copy link
Contributor

Please use the support forums for questions and discussions. We use GitHub issues to track bugs and contributions exclusively.

@lock
Copy link

lock bot commented Apr 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants