Question

I need to skip a scenario while executing my story via Junit, I tried adding a Meta tag like,

Scenario : avoid this scenario
Meta:@skip
When I want to avoid this scenario
Then the scenario will be avoided

I configured my Junit like,

@UsingEmbedder(metaFilters = "skip")
public class Myclass extends JUnitStories
{

     @Override
     public Configuration configuration(){
return new MostUsefulConfiguration()...
      }

}

However when I execute MyClass as a Junit, the scenario with Meta @skip is also getting executed. What could be the problem here

Was it helpful?

Solution

I fixed the issue by modifying my junit class like,

public class Myclass extends JUnitStories
{

 public Myclass(){
   configuredEmbedder().useMetaFilters(Arrays.asList("-skip"));
 }

 @Override
 public Configuration configuration(){
    return new MostUsefulConfiguration()...
  }

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top