Skip to content

← All questions

When should I reach for the mock step instead of @har, or the other way round?

Asked 9,640 views3 answers

Both stub the network. I can write this:

gherkin
When I mock "**/api/banner" with JSON:
  """json
  { "text": "Welcome {{username}}" }
  """

or I can tag the scenario @har:banner and record it. They look interchangeable from where I am standing. Is there a rule for which one to pick, or is it taste?

asked by Kostya Petrov7,903 ·

3 answers

Know the answer?

Reviewed before it appears. Wrap commands and output in triple backticks and they will render as a code block.

Have a different question? Ask it.

Related