·
Have you ever tried to cover a REST API doing transactions with a local database with BDD/Gherkin?
I have done it in this POC:👇👇👇
The principle is:
1) have an app dialing with an H2 database
2) check the testing with Junit
3) cover with BDD/Gherkin/Cucumber
The snippet of the step definitions is just in the pictures below 👇
![broken image](http://custom-images.strikinglycdn.com/res/hrscywv4p/image/upload/c_limit,fl_lossy,h_9000,w_1200,f_auto,q_auto/784839/518136_185173.png)
![broken image](http://custom-images.strikinglycdn.com/res/hrscywv4p/image/upload/c_limit,fl_lossy,h_9000,w_1200,f_auto,q_auto/784839/449470_974259.png)
![broken image](http://custom-images.strikinglycdn.com/res/hrscywv4p/image/upload/c_limit,fl_lossy,h_9000,w_1200,f_auto,q_auto/784839/707487_435102.png)