mercredi 8 juillet 2020

How to replace @Rule annotation in JUnit 5 on TextReport and BrowserWebDriverContainer?

I'm trying to migration from JUnit4 to JUnit5 and I have a @Rule annotation and I don't exactly know how I can replace this. I tried @ExtendWith but not working for me.

My code with JUnit 4 annotations:

    @Rule
    public TextReport textReport = new TextReport();

    @Rule
    public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
            .withCapabilities(new ChromeOptions());

Aucun commentaire:

Enregistrer un commentaire