Forum Discussion

Vitaliu2000's avatar
New Contributor
5 years ago

How do I ignore a piece of data in a feature cucumber file?

English: How do I ignore a piece of data in a feature cucumber file?

Russian: Как в feature файле cucumber сделать игнорирование части данных?



English:  I want the test to work positively. The text "ignoring_String" must be ignored.

Russian: Я хочу, чтобы тест отработал положительно. Текст «ignoring_String» должен быть игнорирован.


Feature file:


        When compare text with reference

            |Stream launched 2019-10-2315:40 by admin|

            |Stream launched ignoring_String by admin|


java class:


import java.util.List;

import static org.junit.Assert.assertTrue;


public class MyTestStepdefs {

    @When("compare text with reference")

    public void compareTextWithReference(io.cucumber.datatable.DataTable dataTable) {

        List<List<String>> rows = dataTable.asLists(String.class);

        String text = "Stream launched 2019-10-2315:40 by admin";






Added a link to the repository -

  • sonya_m's avatar
    5 years ago

    Vitaliu2000 we don't yet have a dedicated Cucumber Community, but you can always address your question to the Cucumber Slack channel. Details here.

6 Replies