I have a really simple customer portal, hosted on my server and getting all the data from another server, the API server.
Now, I'm testing all the portal's functionalities. One test can for example be:
$visit = $this->visit('/franchises');
$visit->click(self::$homeData['name']);
foreach(self::$showData as $value){
$visit->see($value);
}
This code checks that I can visit a page, and check that all my dummy data is present.
My question:
For some features (like Contact Us), I don't have a real feedback to be sure that the message is correctly sent.
Does it means that I have to create a new route in my API, that will ONLY be used for the tests?
i.e. this route would returns all the messages sent by the contact form. But this route won't be used by anything else but the test.
Another example: I would like to test that my system can handle empty data return from the API, be sure that something like "No data to display" can be written on the screen. But there is no route to delete data, because I don't allow my users to delete data. Does it mean I have to create a new route just to delete some items, to be sure that my system can correctly handle empty arrays?
I hope my question is clear for you ;-)
Aucun commentaire:
Enregistrer un commentaire