MTF is a nice integrated framework to test Magento 2. But, does it support BDD with given then scenarios?
Story: Returns go to stock As a store owner In order to keep track of stock I want to add items back to stock when they're returned. Scenario 1: Refunded items should be returned to stock Given that a customer previously bought a black sweater from me And I have three black sweaters in stock. When he returns the black sweater for a refund Then I should have four black sweaters in stock. Scenario 2: Replaced items should be returned to stock Given that a customer previously bought a blue garment from me And I have two blue garments in stock And three black garments in stock. When he returns the blue garment for a replacement in black Then I should have three blue garments in stock And two black garments in stock.
BDD is very popular now because of clear definitions that everyone can understand.
However, in MTF it is not very clear how to write such behaviour based scenarios.
I would like to know if BDD is possible at all in MTF and if there is any documentation how to write BDD tests?
Solved! Go to Solution.
After a little bit more research I think I found answer to my own question.
Please see links below, maybe you will find them helpful.