Suppose, I have numerous scenarios under 1 feature file- GamePlay.feature.
Feature: Game play
@TestCase_1 @Regression
Scenario: Breaker joins a game
Given the Maker has started a game with the word "silky"
When the Breaker joins the Maker's game
Then the Breaker must guess a word with 5 characters
@TestCase_2 @Regression
Scenario: Breaker joins a game
Given the Maker has started a game with the word "soft"
When the Breaker joins the Maker's game
Then the Breaker must guess a word with 4 characters
.
.
. and many more
Let's say I want to copy the test steps of Test case #2(Scenario, Given, When, Then) and paste them into new feature file (GameLost.feature). I'll search the scenario based on tags (For Ex -@TestCase_2) The new feature file GameLost.feature should look like -
Feature: Game lost
@TestCase_2 @Regression
Scenario: Breaker joins a game
Given the Maker has started a game with the word "soft"
When the Breaker joins the Maker's game
Then the Breaker must guess a word with 4 characters
How can I do that in Java?