@Before doesn't execute in java Cucumber Step

前端 未结 7 1687
一生所求
一生所求 2021-02-04 06:19

I\'ve got a Cucumber Step class that i\'m attempting to initialise a page model for all scenarios. So I added a @Before annotated method :

@Before()
private void         


        
7条回答
  •  执笔经年
    2021-02-04 06:46

    1. Make sure you are using cucumber.annotation.Before rather than org.junit.Before. Cucumber will not process JUnit annotations. (More information in the Scenario Hooks section of this blog post.)

    2. Make sure your @Before method is public, not private.

提交回复
热议问题