Search code examples
javajbehavejbehave-pluginjbehave-maven-plugin

How to pass parameter to Jbehave lifecycle


Can i pass parameter to Jbehave life cycle? Like the below?

Lifecycle:
Before:
Given I have logged in as <user>

Thanks!


Solution

  • Sure you could, you can define multiple meta tags for predefined parameters as below.

    Lifecycle:
    Meta:
    @param 1 2 3
    Before:
    Given I have logged in as <param>
    

    Fetch the meta tag filer from the run time to select your preferred parameter.