lucidarch / laravel

[DEPRECATED] See https://github.com/lucidarch/lucid

Home Page:https://lucidarch.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What to test exactly in a FeatureTest

websmurf opened this issue · comments

Hi there,

Just wondering about the following. What exact do you advise to test while testing a feature?
The response of the feature? Or if all steps that are defined are being called?

Best regards

Adam

Hi Adam,

Feature tests should be your functional tests, which is where you test it as a "client" with a Request/Response and you would assert the received response to be what you expect the client to receive, similar to Testing JSON APIs of the Laravel docs. Which means you'd make sure that the Feature is exposed correctly through the corresponding Route and Controller, and that it works as expected.

Thanks, that makes sense