Feature: CheckSample @ignored Scenario Outline: check ABC #checkout.feature:2 Given I open the applciation When I enter username as "<username>" And I enter password as "<password>" Then I enter title as "<title>" Examples: | username | password | | dude | daad |
consider the above as a file of the function "CheckSample.feature"
And below is your step file, this is just a partial file:
public class Sampletest { @Given("^I open the applciation$") public void i_open_the_applciation() throws Throwable {
Now the running file will be below:
@RunWith(Cucumber.class) @CucumberOptions( plugin = {"pretty", "html:target/reports", "json:target/reports/cucumber-report.json"}, monochrome = true, tags = {"~@ignored"} ) public class junittestOne { public static void main(String[] args) { JUnitCore junit = new JUnitCore(); Result result = junit.run(junittestOne.class); } }
It is important to note that the text "@ignored" in the function file is mentioned in the CucumberOptions (tags) in the class file "junittestone". Also, make sure that you have all the relevant jar files for both cucumbers, cucumbers, Junit and other cans available in your project, and you have imported them into your step definitions (class).
Due to "ignoring" the script will be skipped during the execution of the tests.
MKod Jun 01 '17 at 15:55 2017-06-01 15:55
source share