I haven't found a good way of doing this so hoping someone has some ideas. Is there any way to seed the database with test data before running a E2E Protractor test?
Do people do this or do they just mock out the back end? Mocking out the back end for me is not an option so would appreciate ideas on how to seed the database. There are a few solutions out there using node but nothing conclusive.
The whole point of E2E testing for my case would be to go to the DB level
Thanks
Being in a NodeJs environment, you can connect to the database directly from Protractor, but I wouldn't go down that route. You'll have to update your SQL-setup-script along with your changes to your back-end.
There are other ways:
You can fire REST calls directly from the Protractor environment or use your browser for that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With