0

I have knowledge about static feature file and it is tough to handle for test case. I want to create dynamic feature file or dynamic content for test case in feature file.

asked Nov 9, 2018 at 5:36
4
  • 1
    What do you mean by "dynamic"? User input / data fetching from external in during run-time or data-driven testing? Commented Nov 9, 2018 at 6:38
  • Welcome here. Please have a look into asking a question. As it stands your question is rather vague. What did you try? What did you research? Commented Nov 9, 2018 at 14:33
  • @JoãoFarias I have created 1 automation script in cucumber and you know feature file is important in it. In feature file, I have written 4 features test case and execute it. Now I want to execute only 2 features test case so I need to remove or make comment in feature file. I have created jar file to execute cucumber test run. So I need to execute feature file from externally. Commented Nov 10, 2018 at 4:46
  • Got it. See my anwser below. Commented Nov 10, 2018 at 17:23

1 Answer 1

1

Cucumber has options called "tags", which allows you for filter scenarios and run just a subset.

Here, you have instructions on how to run Cucumber tests using Maven:

mvn test -Dcucumber.options="–tags @tag Example"

will run only scenarios with the @Example tags.

answered Nov 10, 2018 at 17:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.