Skip to content
CodeKruPro

The layout of a behave project

QuizEasy-MediumPython onlyAsked in: Accenture, Capgemini, Coforge, Infosys, TCS, Wipro

In a behave project, where do the step definitions and the hooks live?

  • Steps in features/steps/*.py; hooks in features/environment.py
  • Steps in conftest.py; hooks in pytest.ini
  • Steps inside the feature files
  • Anywhere, as long as they are imported in main.py

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in