[BDDFramework] Rollback of loaded data in teardown
Forge component by OutSystems R&D
Application Type
Traditional Web
Service Studio Version
11.11.3 (Build 42969)

Recently I explored the benefits of BDDFramework after using UTF for a long time. So far I really like it. But now trying to implement a bit more complex tests which loads lots of data in the setup action.

In UTF it was VERY convenient to have the abortTransaction as last element in the action to clean up all the loaded data, but that is to no avail in BDDFramework, since a commit is happening after every screenaction. Say I load a lot of data in the Given action then that data is already committed at the end-element of Given. If I then try to call abortTranasction in the Teardown screenaction, then nothing will be rolled back, since all has been committed already. 

How can I do the same in BDDFramework as I was used to do in UTF? 

If that is not possible I then have to stick with UTF for the more data-prone tests and I really want to move all tests to BDD. Also because of the nice integration with Azure DevOps.

I also have a question about the multiple transactions that happen during a test. Is there any guarantee that data has not been manipulated by a 3rd process in the background between the Given phase and the Then phase? So when asserting a specific value in the Then section fails because some process had manipulated the data in the meantime. I think this was/is better handled in the UTF unit test framework where you only work with 1 transaction.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.