Apr 20, 2017
0
Level 2
Create remote data prior to Dusk test run
Hello, I have sort of a unique scenario where I need to hit an API endpoint prior to and just after running Dusk tests to first create sample data and then delete it (in Salesforce....not that it's significant here).
We use the (awesome!) Forrest library for the authentication and communication with the API so no problem there, I'm just not sure where best to include the create and delete callouts in the Dusk test code. It should run just one time and not for each test class that is run. It also needs to be in a place where the Forrest library is accessible.
Any ideas on where best to put these API callouts?
Thanks Matt
Please or to participate in this conversation.