How to ignore the test case in Scenario Outline.
Feature File:
     @ignore
      Scenario Outline: Validation for Order_Summary Report in My_Account Application
        Given User land on Home paage post login
        When User Clicks on Order Summary Report and pass Order Summary Date "<SummaryDate>" for validation in My_Account Application
        And Order Summary Report should be opened in the New Tab
        Then Assertion for the Order Summary Report is performed
    Examples: 
      | SummaryDate |
      | 08/10/2019  |
Test Runner Class:
package Test_Runner;
import java.io.File;
import java.io.File;
import org.junit.AfterClass;
import org.junit.runner.RunWith;
import com.cucumber.listener.Reporter;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
//@Cucumber.Options(format = {"pretty", "html:target/Destination"})
//@Cucumber.Options(features="features")--> If in Case Feature file reside in Feature Directory
@CucumberOptions(features="Features",
glue={"Step_Defination"},
plugin={"json:target/cucumber.json","html:target/cucumber-pretty"},
tags ={"not @ignore"}) 
//plugin={""html:target/cucumber-html-report"","json:target/cucumber.json","pretty:target/cucumber-pretty.txt","pretty:target/cucumber-pretty.txt","usage:target/cucumber-usage.json","junit:target/cucumber-results.xml"}
public class testrunner {
        public static void teardown() {
        }
        }
It should skip the Scenario Outline Validation
            Asked
            
        
        
            Active
            
        
            Viewed 700 times
        
    0
            
            
         
    
    
        Shubham Jain
        
- 16,610
- 15
- 78
- 125
 
    
    
        Abhishek Gaur
        
- 300
- 1
- 5
- 20
1 Answers
2
            You aslo need to run your maven command with input of your tag name as follows:
cucumber --tags "not @ignore"
As an example:
mvn install -Dcucumber.options="--tags @runThis --tags ~@ignore --format json-pretty:target/cucumber-report-myReport.json --format html:target/cucumber-html-report-myReport"
Source:
 
    
    
        undetected Selenium
        
- 183,867
- 41
- 278
- 352
 
    
    
        Shubham Jain
        
- 16,610
- 15
- 78
- 125