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.

  • 1
    What do you mean by "dynamic"? User input / data fetching from external in during run-time or data-driven testing? – João Farias Nov 9 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? – Ray Oei Nov 9 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. – Vivek Bhatt Nov 10 at 4:46
  • Got it. See my anwser below. – João Farias Nov 10 at 17:23

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.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.