Sharing step definitions across test suites (BDD)

Last edited on

It is possible share BDD step definitions across test suite via collectStepDefinitions() .

For this the file of the BDD test cases must be edited, to add an argument to the existing collectStepDefinitions() call,

source(findFile('scripts', 'python/'))


# extra argument added to the end:
collectStepDefinitions('./steps', '../shared/steps', '../../global/steps')

def main():
    testSettings.throwOnFailure = True
    runFeatureFile('test.feature') of a BDD test case

In addition, the Object Map entries that are used in these steps must also be shared between the test suites: Sharing an Object Map across test suites