0 Replies Latest reply on Apr 9, 2014 8:06 AM by Daniel Latzer

    Dynamic disabling and re-enabling of triggers with APE

    Daniel Latzer Newbie

      Hello

       

      Our Oracle database has about 50 triggers, some of which prevent the insertion of datasets using DBUnit. Currently our tests with APE are annotated with @ApplyScriptBefore("disable_all_triggers.sql") and @ApplyScriptAfter("enable_all_triggers.sql"). On our database This adds an overhead of about 10 seconds for each test. I could of course hand-craft various SQL-scripts that modify only the triggers relevant for each test, but that seems rather bothersome.

       

      I'd like to see a feature where you can configure table names with their related triggers, something like

      TablesTriggers
      people_ttrigger_a
      roles_ttrigger_a, trigger_b

      Now when APE loads a dataset containing entries for people_t and roles_t, it knows it has to modify trigger_a and trigger_b. So it can disable these triggers, run the database operation, and enable them again afterwards.

      I might try to help implement such a feature if I find the time.

       

      Cheers,

      Daniel