- Which three items are best practices for unit tests?
- What are the best practices for mock testing?
- What are the best practices of BDD Gherkin?
Which three items are best practices for unit tests?
Naming your tests
The name of your test should consist of three parts: The name of the method being tested. The scenario under which it's being tested. The expected behavior when the scenario is invoked.
What are the best practices for mock testing?
Deciding What To Mock
The first best practice that you have control over is: Don't write any more mocking code than you need to. Mocking code is still “more code” and, like any other code you write, takes time both to create and to maintain. That's all time not spent on adding functionality to applications.
What are the best practices of BDD Gherkin?
Gherkin's Golden Rule. Gherkin's Golden Rule is simple: Treat other readers as you would want to be treated. More specifically, write feature files so that everyone can intuitively understand them. Good Gherkin should improve team collaboration by clarifying behaviors you want to develop.