jhedstrom / drupalextension

An integration layer between Behat, Mink Extension, and Drupal.
GNU General Public License v2.0
209 stars 192 forks source link

Disable automatic cleanup #647

Open kasperg opened 1 year ago

kasperg commented 1 year ago

As I understand it RawDrupalContext will automatic clean up any created nodes, users, terms etc. after running a scenario.

This can make it somewhat tricky to look into a failing test. You are only provided with the output from the failing step and whatever other extensions have provided (screenshots, HTML output).

Is there a way to disable this automatic cleanup either temporarily (using a command line argument or the like) or through configuration?

If not: Would you consider a contribution for such an addition?

Kingdutch commented 1 year ago

An issue for a solution to this was opened in https://github.com/jhedstrom/drupalextension/issues/316 but that would need to be implemented.

In the meantime within Open Social I've implemented a trait and we create our own version of the DrupalExtension classes that includes the trait even if we don't need to add anything else to it, rather than using the DrupalExtension classes directly.