HOOKS IN BDD CUCUMBER FRAMEWORK | Interview Question| QA SDET

Опубликовано: 27 Май 2026
на канале: Viplove QA - SDET
2,840
like

In a BDD Cucumber framework, hooks are blocks of code that run before or after each scenario, step, or tagged scenario during test execution. They help with setup and teardown processes, like launching a browser, initializing test data, or cleaning up after tests.

✅ Commonly Used Hooks in Cucumber:

1. @Before

Runs before each scenario.

Used for setup actions (e.g., launching browser, DB connection