Cucumber class extending step definitions and hooks
<p>I want to extend from a "AbstractBase_step" class in java. So I want to have a hook like:</p>

<pre><code>public abstract class AbstractBase_Steps {
    protected Scenario scenario;
    @Before
    public void background(Scenario scenario) {
        this.scenario = scenario;
    }
}
</code></pre>

<p>which is called for every step file:</p>

<pre><code>public abstract class Hello_Steps extends AbstractBase_Steps {
}
</code></pre>

<p>When I do this I get</p>

<blockquote>
  <p>cucumber.runtime.CucumberException: You're not allowed to extend classes that  define Step Definitions or hooks. class Hello_Steps extends class AbstractBase_Steps</p>
</blockquote>

<p>Does somebody has a trick for that?</p>

<p>EDIT: For reusing same step definitions I've created a new Class Common_Steps and included it in the glue path. So its definitions are available for all feature files in the test.</p>