Skip to content

Getting Tests are skipped When using Base Class #19

@MHamza-Y

Description

@MHamza-Y

Hi I am editing this example to create and run test with screenplay pattern. Currently I am trying to use a base class to manage Test data for my tests. Base Test class goes as follows,

public class BaseTest {
    public TestParams testParams;


    public BaseTest(Map<String,String> testData) {

        testParams = TestParams.haveValues(testData);
    }

    protected Actor james = Actor.named("James");
    @Managed
    protected WebDriver driver;

    @Before
    public void jamesCanBrowseTheWeb() {
        james.can(BrowseTheWeb.with(driver));
    }

    @TestData
    public Collection<Object[]> getTestData() {
        return DataProvider.getSheet("testdata/ExcelInputData.xlsx",this.getClass().getSimpleName());
    }
}

And my test class is,

public class CloneViewTest extends BaseTest {
    public CloneViewTest(Map<String,String> testData) {
        super(testData);
    }

    @Test
    public void should_be_able_to_clone_views() {
        james.attemptsTo(Open.browserOn().the(Column_dictionaryPage.class));

    }
}

But when I try to run this test I get
[INFO] Tests are skipped.
In the console log. It's my first try to use Serenity with screenplay pattern and i am not very familiar with it. I apologize in advance if it is something stupid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions