From 1d7546cbeb97eda616067c3fe8c249634c471ad3 Mon Sep 17 00:00:00 2001
From: Arnaud Fontaine <arnaud.fontaine@nexedi.com>
Date: Sun, 8 Sep 2013 19:30:32 +0900
Subject: [PATCH] ZODB Components: Revert 'Allow to execute runUnitTest for bt5
 Test Components' (a771dca) to fix tests bootstrap.

The new syntax to load ZODB Tests Components is:
runUnitTest BT_TITLE:TEST_NAME

That commit was too adhoc as it was relying upon filesystem to load Tests
Components and was not behaving like any other Components (versions was not
available and other Components were not importable).

At the end, it would have meant that a Test Component ran through runUnitTest
and Live Tests (in ERP5 itself) would have behaved differently, thus instead:

1/ Install BT_TITLE dependencies and its test dependencies (new bt property to
   specify bt to be installed only for tests on a fresh instance).
2/ The site is loaded.
3/ Load the test by importing it like any other Components.
---
 .../test.erp5.testERP5BearerToken.py          |   3 -
 bt5/erp5_bearer_token/bt/change_log           |   3 +
 bt5/erp5_bearer_token/bt/revision             |   2 +-
 bt5/erp5_bearer_token/bt/test_dependency_list |   1 +
 ...erp5.testMaxmaDemoConfigurationWorkflow.py |   8 -
 .../bt/change_log                             |   3 +
 bt5/erp5_configurator_maxma_demo/bt/revision  |   2 +-
 .../bt/test_dependency_list                   |   4 +
 ....erp5.testRunMyDocConfigurationWorkflow.py |   8 -
 .../bt/change_log                             |   3 +
 bt5/erp5_configurator_run_my_doc/bt/revision  |   2 +-
 .../bt/test_dependency_list                   |   4 +
 bt5/erp5_configurator_standard/bt/change_log  |   3 +
 bt5/erp5_configurator_standard/bt/revision    |   2 +-
 .../bt/test_dependency_list                   |   1 +
 .../test.erp5.testUNGConfigurationWorkflow.py |   8 -
 bt5/erp5_configurator_ung/bt/change_log       |   3 +
 bt5/erp5_configurator_ung/bt/revision         |   2 +-
 .../bt/test_dependency_list                   |   4 +
 .../test.erp5.TestEGovMixin.py                |   4 -
 bt5/erp5_egov/bt/change_log                   |   3 +
 bt5/erp5_egov/bt/revision                     |   2 +-
 .../test.erp5.testDiscussionThread.py         |  13 -
 bt5/erp5_forum_tutorial/bt/change_log         |   3 +
 bt5/erp5_forum_tutorial/bt/revision           |   2 +-
 .../bt/test_dependency_list                   |   5 +
 .../test.erp5.testLiveIngestion.py            |  11 -
 bt5/erp5_ingestion/bt/change_log              |   3 +
 bt5/erp5_ingestion/bt/revision                |   2 +-
 bt5/erp5_ingestion/bt/test_dependency_list    |   5 +
 .../test.erp5.testInotifyTool.py              |   4 -
 bt5/erp5_inotify/bt/revision                  |   2 +-
 bt5/erp5_inotify/bt/test_dependency_list      |   1 +
 .../test.erp5.testSOAPBinding.py              |   4 -
 bt5/erp5_interfaces/bt/revision               |   2 +-
 .../test.erp5.prepareMobileFunctionalTest.py  |   7 +-
 bt5/erp5_mobile_ui_test/bt/change_log         |   3 +
 bt5/erp5_mobile_ui_test/bt/dependency_list    |   3 +-
 bt5/erp5_mobile_ui_test/bt/revision           |   2 +-
 .../test.erp5.testERP5PaypalSecurePayment.py  |   8 -
 bt5/erp5_paypal_secure_payment/bt/change_log  |   3 +
 bt5/erp5_paypal_secure_payment/bt/revision    |   2 +-
 .../bt/test_dependency_list                   |   1 +
 .../test.erp5.testERP5PayzenSecurePayment.py  |   8 -
 bt5/erp5_payzen_secure_payment/bt/change_log  |   3 +
 bt5/erp5_payzen_secure_payment/bt/revision    |   2 +-
 .../bt/test_dependency_list                   |   1 +
 bt5/erp5_pdf_merge/bt/test_dependency_list    |   5 +
 .../test.erp5.testSafeImage.py                |  10 -
 bt5/erp5_safeimage/bt/dependency_list         |   3 +
 bt5/erp5_safeimage/bt/revision                |   2 +-
 bt5/erp5_safeimage/bt/test_dependency_list    |   3 +
 .../test.erp5.testERP5SocialContracts.py      |   3 -
 bt5/erp5_social_contracts/bt/change_log       |   3 +
 bt5/erp5_social_contracts/bt/revision         |   2 +-
 .../bt/test_dependency_list                   |   1 +
 .../test.erp5.testSyncMLAsynchronousEngine.py |   6 -
 bt5/erp5_syncml_test_data/bt/change_log       |   3 +
 bt5/erp5_syncml_test_data/bt/dependency_list  |   3 +-
 bt5/erp5_syncml_test_data/bt/revision         |   2 +-
 .../bt/test_dependency_list                   |   1 +
 bt5/erp5_test_result/bt/test_dependency_list  |   2 +
 .../test.erp5.ShaCacheMixin.py                |  15 -
 .../test.erp5.testShaCache.py                 |   2 +-
 bt5/erp5_web_shacache/bt/change_log           |   3 +
 bt5/erp5_web_shacache/bt/revision             |   2 +-
 bt5/erp5_web_shacache/bt/test_dependency_list |   1 +
 .../test.erp5.ShaDirMixin.py                  |  19 --
 .../portal_components/test.erp5.testShaDir.py |   2 +-
 bt5/erp5_web_shadir/bt/change_log             |   3 +
 bt5/erp5_web_shadir/bt/revision               |   2 +-
 bt5/erp5_web_shadir/bt/test_dependency_list   |   8 +
 bt5/erp5_web_ung_core/bt/change_log           |   5 +-
 bt5/erp5_web_ung_core/bt/revision             |   2 +-
 bt5/erp5_web_ung_core/bt/test_dependency_list |   1 +
 .../test.erp5.testUNGSecurity.py              |  31 --
 bt5/erp5_web_ung_role/bt/change_log           |   3 +
 bt5/erp5_web_ung_role/bt/revision             |   2 +-
 bt5/erp5_web_ung_role/bt/test_dependency_list |  27 ++
 .../portal_components/test.erp5.testUNG.py    |  30 --
 bt5/erp5_web_ung_theme/bt/change_log          |   3 +
 bt5/erp5_web_ung_theme/bt/revision            |   2 +-
 .../bt/test_dependency_list                   |  27 ++
 .../test.erp5.testShaCacheExternal.py         |  12 +-
 .../test.erp5.testShaCacheSecurity.py         |  14 +-
 .../test.erp5.testShaDirExternal.py           |  11 +-
 .../test.erp5.testShaDirSecurity.py           |  11 +-
 bt5/networkcache_erp5/bt/change_log           |   3 +
 bt5/networkcache_erp5/bt/revision             |   2 +-
 bt5/networkcache_erp5/bt/test_dependency_list |   3 +
 .../test.erp5.testConflictResolution.py       |   3 -
 bt5/test_conflict_resolution/bt/revision      |   2 +-
 .../bt/test_dependency_list                   |   1 +
 product/ERP5/Tool/TemplateTool.py             |  20 +-
 product/ERP5/bin/genbt5list                   |   1 +
 .../erp5_core/BusinessTemplate_view.xml       |   1 +
 .../my_test_dependency_list.xml               | 298 ++++++++++++++++++
 .../test.erp5.testActivityTool.py             |   6 -
 .../ERP5/bootstrap/erp5_core/bt/change_log    |   3 +
 product/ERP5/bootstrap/erp5_core/bt/revision  |   2 +-
 .../erp5_core/bt/test_dependency_list         |   2 +
 .../test_dependency_property.xml              |  36 +++
 .../erp5_property_sheets/bt/change_log        |   3 +
 .../erp5_property_sheets/bt/revision          |   2 +-
 product/ERP5Type/tests/runUnitTest.py         | 145 +++++++--
 tests/__init__.py                             |  64 ++--
 106 files changed, 723 insertions(+), 336 deletions(-)
 create mode 100644 bt5/erp5_bearer_token/bt/test_dependency_list
 create mode 100644 bt5/erp5_configurator_maxma_demo/bt/test_dependency_list
 create mode 100644 bt5/erp5_configurator_run_my_doc/bt/test_dependency_list
 create mode 100644 bt5/erp5_configurator_standard/bt/test_dependency_list
 create mode 100644 bt5/erp5_configurator_ung/bt/test_dependency_list
 create mode 100644 bt5/erp5_forum_tutorial/bt/test_dependency_list
 create mode 100644 bt5/erp5_ingestion/bt/test_dependency_list
 create mode 100644 bt5/erp5_inotify/bt/test_dependency_list
 create mode 100644 bt5/erp5_paypal_secure_payment/bt/test_dependency_list
 create mode 100644 bt5/erp5_payzen_secure_payment/bt/test_dependency_list
 create mode 100644 bt5/erp5_pdf_merge/bt/test_dependency_list
 create mode 100644 bt5/erp5_safeimage/bt/dependency_list
 create mode 100644 bt5/erp5_safeimage/bt/test_dependency_list
 create mode 100644 bt5/erp5_social_contracts/bt/test_dependency_list
 create mode 100644 bt5/erp5_syncml_test_data/bt/test_dependency_list
 create mode 100644 bt5/erp5_test_result/bt/test_dependency_list
 create mode 100644 bt5/erp5_web_shacache/bt/test_dependency_list
 create mode 100644 bt5/erp5_web_shadir/bt/test_dependency_list
 create mode 100644 bt5/erp5_web_ung_core/bt/test_dependency_list
 create mode 100644 bt5/erp5_web_ung_role/bt/test_dependency_list
 create mode 100644 bt5/erp5_web_ung_theme/bt/test_dependency_list
 create mode 100644 bt5/networkcache_erp5/bt/test_dependency_list
 create mode 100644 bt5/test_conflict_resolution/bt/test_dependency_list
 create mode 100644 product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_test_dependency_list.xml
 create mode 100644 product/ERP5/bootstrap/erp5_core/bt/test_dependency_list
 create mode 100644 product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/BusinessTemplate/test_dependency_property.xml

diff --git a/bt5/erp5_bearer_token/TestTemplateItem/portal_components/test.erp5.testERP5BearerToken.py b/bt5/erp5_bearer_token/TestTemplateItem/portal_components/test.erp5.testERP5BearerToken.py
index 3272246cbc..dd5207a4cb 100644
--- a/bt5/erp5_bearer_token/TestTemplateItem/portal_components/test.erp5.testERP5BearerToken.py
+++ b/bt5/erp5_bearer_token/TestTemplateItem/portal_components/test.erp5.testERP5BearerToken.py
@@ -10,9 +10,6 @@ class TestERP5BearerToken(ERP5TypeTestCase):
 
   test_token_extraction_id = 'bearer_test_extraction'
 
-  def getBusinessTemplateList(self):
-    return ('erp5_base', 'erp5_bearer_token')
-
   def generateNewId(self):
     return str(self.portal.portal_ids.generateNewId(
                                      id_group=('bearer_token_test_id')))
diff --git a/bt5/erp5_bearer_token/bt/change_log b/bt5/erp5_bearer_token/bt/change_log
index dc12bfad25..94a82f8936 100644
--- a/bt5/erp5_bearer_token/bt/change_log
+++ b/bt5/erp5_bearer_token/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_bearer_token/bt/revision b/bt5/erp5_bearer_token/bt/revision
index ca7bf83ac5..da2d3988d7 100644
--- a/bt5/erp5_bearer_token/bt/revision
+++ b/bt5/erp5_bearer_token/bt/revision
@@ -1 +1 @@
-13
\ No newline at end of file
+14
\ No newline at end of file
diff --git a/bt5/erp5_bearer_token/bt/test_dependency_list b/bt5/erp5_bearer_token/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_bearer_token/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_configurator_maxma_demo/TestTemplateItem/portal_components/test.erp5.testMaxmaDemoConfigurationWorkflow.py b/bt5/erp5_configurator_maxma_demo/TestTemplateItem/portal_components/test.erp5.testMaxmaDemoConfigurationWorkflow.py
index f128a49c60..0a816e0e8a 100644
--- a/bt5/erp5_configurator_maxma_demo/TestTemplateItem/portal_components/test.erp5.testMaxmaDemoConfigurationWorkflow.py
+++ b/bt5/erp5_configurator_maxma_demo/TestTemplateItem/portal_components/test.erp5.testMaxmaDemoConfigurationWorkflow.py
@@ -66,14 +66,6 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
                        'erp5_l10n_pt-BR',
                        'erp5_demo_maxma_rule')
 
-  def getBusinessTemplateList(self):
-    return ('erp5_core_proxy_field_legacy',
-        'erp5_full_text_myisam_catalog',
-        'erp5_base',
-        'erp5_workflow',
-        'erp5_configurator',
-        'erp5_configurator_maxma_demo',)
-
   def stepCreateBusinessConfiguration(self, sequence=None,\
                    sequence_list=None, **kw):
     """ Create one Business Configuration """
diff --git a/bt5/erp5_configurator_maxma_demo/bt/change_log b/bt5/erp5_configurator_maxma_demo/bt/change_log
index b84a7b0039..36c43fe0dc 100644
--- a/bt5/erp5_configurator_maxma_demo/bt/change_log
+++ b/bt5/erp5_configurator_maxma_demo/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_configurator_maxma_demo/bt/revision b/bt5/erp5_configurator_maxma_demo/bt/revision
index d99e90eb96..8580e7b684 100644
--- a/bt5/erp5_configurator_maxma_demo/bt/revision
+++ b/bt5/erp5_configurator_maxma_demo/bt/revision
@@ -1 +1 @@
-29
\ No newline at end of file
+30
\ No newline at end of file
diff --git a/bt5/erp5_configurator_maxma_demo/bt/test_dependency_list b/bt5/erp5_configurator_maxma_demo/bt/test_dependency_list
new file mode 100644
index 0000000000..8165f76e00
--- /dev/null
+++ b/bt5/erp5_configurator_maxma_demo/bt/test_dependency_list
@@ -0,0 +1,4 @@
+erp5_core_proxy_field_legacy
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_workflow
\ No newline at end of file
diff --git a/bt5/erp5_configurator_run_my_doc/TestTemplateItem/portal_components/test.erp5.testRunMyDocConfigurationWorkflow.py b/bt5/erp5_configurator_run_my_doc/TestTemplateItem/portal_components/test.erp5.testRunMyDocConfigurationWorkflow.py
index 4c6ca24060..cb6c503181 100644
--- a/bt5/erp5_configurator_run_my_doc/TestTemplateItem/portal_components/test.erp5.testRunMyDocConfigurationWorkflow.py
+++ b/bt5/erp5_configurator_run_my_doc/TestTemplateItem/portal_components/test.erp5.testRunMyDocConfigurationWorkflow.py
@@ -84,14 +84,6 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
      stepCheckKnowledgePadRole
   """
 
-  def getBusinessTemplateList(self):
-    return ('erp5_core_proxy_field_legacy',
-        'erp5_full_text_myisam_catalog',
-        'erp5_base',
-        'erp5_workflow',
-        'erp5_configurator',
-        'erp5_configurator_run_my_doc',)
-
   def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw):
     """ Create one Business Configuration """
     module = self.portal.business_configuration_module
diff --git a/bt5/erp5_configurator_run_my_doc/bt/change_log b/bt5/erp5_configurator_run_my_doc/bt/change_log
index ec2e36309c..7a9e1076d1 100644
--- a/bt5/erp5_configurator_run_my_doc/bt/change_log
+++ b/bt5/erp5_configurator_run_my_doc/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_configurator_run_my_doc/bt/revision b/bt5/erp5_configurator_run_my_doc/bt/revision
index 9d607966b7..3cacc0b93c 100644
--- a/bt5/erp5_configurator_run_my_doc/bt/revision
+++ b/bt5/erp5_configurator_run_my_doc/bt/revision
@@ -1 +1 @@
-11
\ No newline at end of file
+12
\ No newline at end of file
diff --git a/bt5/erp5_configurator_run_my_doc/bt/test_dependency_list b/bt5/erp5_configurator_run_my_doc/bt/test_dependency_list
new file mode 100644
index 0000000000..8165f76e00
--- /dev/null
+++ b/bt5/erp5_configurator_run_my_doc/bt/test_dependency_list
@@ -0,0 +1,4 @@
+erp5_core_proxy_field_legacy
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_workflow
\ No newline at end of file
diff --git a/bt5/erp5_configurator_standard/bt/change_log b/bt5/erp5_configurator_standard/bt/change_log
index 34e856f8eb..e4ed4ff7b9 100644
--- a/bt5/erp5_configurator_standard/bt/change_log
+++ b/bt5/erp5_configurator_standard/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_configurator_standard/bt/revision b/bt5/erp5_configurator_standard/bt/revision
index 97db189709..38017008e6 100644
--- a/bt5/erp5_configurator_standard/bt/revision
+++ b/bt5/erp5_configurator_standard/bt/revision
@@ -1 +1 @@
-667
\ No newline at end of file
+668
\ No newline at end of file
diff --git a/bt5/erp5_configurator_standard/bt/test_dependency_list b/bt5/erp5_configurator_standard/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_configurator_standard/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_configurator_ung/TestTemplateItem/portal_components/test.erp5.testUNGConfigurationWorkflow.py b/bt5/erp5_configurator_ung/TestTemplateItem/portal_components/test.erp5.testUNGConfigurationWorkflow.py
index d431e6bc17..0814e1cfc7 100644
--- a/bt5/erp5_configurator_ung/TestTemplateItem/portal_components/test.erp5.testUNGConfigurationWorkflow.py
+++ b/bt5/erp5_configurator_ung/TestTemplateItem/portal_components/test.erp5.testUNGConfigurationWorkflow.py
@@ -104,14 +104,6 @@ class TestUNGConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
      stepCheckCreateNewEvent
   """
 
-  def getBusinessTemplateList(self):
-    return ('erp5_core_proxy_field_legacy',
-        'erp5_full_text_myisam_catalog',
-        'erp5_base',
-        'erp5_workflow',
-        'erp5_configurator',
-        'erp5_configurator_ung',)
-
   def stepCreateBusinessConfiguration(self, sequence=None, sequence_list=None, **kw):
     """ Create one Business Configuration """
     module = self.portal.business_configuration_module
diff --git a/bt5/erp5_configurator_ung/bt/change_log b/bt5/erp5_configurator_ung/bt/change_log
index 69e9af2904..f0cc8ec794 100644
--- a/bt5/erp5_configurator_ung/bt/change_log
+++ b/bt5/erp5_configurator_ung/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_configurator_ung/bt/revision b/bt5/erp5_configurator_ung/bt/revision
index eebd1d10b6..b2412e34df 100644
--- a/bt5/erp5_configurator_ung/bt/revision
+++ b/bt5/erp5_configurator_ung/bt/revision
@@ -1 +1 @@
-61
\ No newline at end of file
+62
\ No newline at end of file
diff --git a/bt5/erp5_configurator_ung/bt/test_dependency_list b/bt5/erp5_configurator_ung/bt/test_dependency_list
new file mode 100644
index 0000000000..8165f76e00
--- /dev/null
+++ b/bt5/erp5_configurator_ung/bt/test_dependency_list
@@ -0,0 +1,4 @@
+erp5_core_proxy_field_legacy
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_workflow
\ No newline at end of file
diff --git a/bt5/erp5_egov/TestTemplateItem/portal_components/test.erp5.TestEGovMixin.py b/bt5/erp5_egov/TestTemplateItem/portal_components/test.erp5.TestEGovMixin.py
index af780b10fd..ccde637980 100644
--- a/bt5/erp5_egov/TestTemplateItem/portal_components/test.erp5.TestEGovMixin.py
+++ b/bt5/erp5_egov/TestTemplateItem/portal_components/test.erp5.TestEGovMixin.py
@@ -110,10 +110,6 @@ class TestEGovMixin(SecurityTestCase):
     sequence_list.addSequenceString(sequence_string)
     sequence_list.play(self, quiet=quiet)
 
-  def getBusinessTemplateList(self):
-    """return list of business templates to be installed. """
-    return ( 'erp5_base',)
-
   def afterSetUp(self):
     """
       Method called before the launch of the test to initialize some data
diff --git a/bt5/erp5_egov/bt/change_log b/bt5/erp5_egov/bt/change_log
index 2bc8618905..41aa8663f9 100644
--- a/bt5/erp5_egov/bt/change_log
+++ b/bt5/erp5_egov/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_egov/bt/revision b/bt5/erp5_egov/bt/revision
index 5d5ad96f9f..4f1a32f190 100644
--- a/bt5/erp5_egov/bt/revision
+++ b/bt5/erp5_egov/bt/revision
@@ -1 +1 @@
-764
\ No newline at end of file
+765
\ No newline at end of file
diff --git a/bt5/erp5_forum_tutorial/TestTemplateItem/portal_components/test.erp5.testDiscussionThread.py b/bt5/erp5_forum_tutorial/TestTemplateItem/portal_components/test.erp5.testDiscussionThread.py
index 20507caca5..180d4eb3e6 100644
--- a/bt5/erp5_forum_tutorial/TestTemplateItem/portal_components/test.erp5.testDiscussionThread.py
+++ b/bt5/erp5_forum_tutorial/TestTemplateItem/portal_components/test.erp5.testDiscussionThread.py
@@ -9,19 +9,6 @@ class TestDiscussionThread(SecurityTestCase):
   def getTitle(self):
     return "TestDiscussionThread"
 
-  def getBusinessTemplateList(self):
-    """
-    A tuple of Business Templates names to specify the dependencies we need to
-    install.
-    """
-    return (
-      'erp5_base',
-      'erp5_web',
-      'erp5_ingestion_mysql_innodb_catalog',
-      'erp5_ingestion',
-      'erp5_dms',
-      'erp5_forum_tutorial')
-
   def setUpOnce(self):
     """
        Create users to interact with the discussion forums
diff --git a/bt5/erp5_forum_tutorial/bt/change_log b/bt5/erp5_forum_tutorial/bt/change_log
index 374bdc0f2f..4da0f49b1f 100644
--- a/bt5/erp5_forum_tutorial/bt/change_log
+++ b/bt5/erp5_forum_tutorial/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_forum_tutorial/bt/revision b/bt5/erp5_forum_tutorial/bt/revision
index c7930257df..301160a930 100644
--- a/bt5/erp5_forum_tutorial/bt/revision
+++ b/bt5/erp5_forum_tutorial/bt/revision
@@ -1 +1 @@
-7
\ No newline at end of file
+8
\ No newline at end of file
diff --git a/bt5/erp5_forum_tutorial/bt/test_dependency_list b/bt5/erp5_forum_tutorial/bt/test_dependency_list
new file mode 100644
index 0000000000..ac2d8e0533
--- /dev/null
+++ b/bt5/erp5_forum_tutorial/bt/test_dependency_list
@@ -0,0 +1,5 @@
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_web
+erp5_ingestion_mysql_innodb_catalog
+erp5_ingestion
\ No newline at end of file
diff --git a/bt5/erp5_ingestion/TestTemplateItem/portal_components/test.erp5.testLiveIngestion.py b/bt5/erp5_ingestion/TestTemplateItem/portal_components/test.erp5.testLiveIngestion.py
index 3f722ea4ec..87d5a4cd15 100644
--- a/bt5/erp5_ingestion/TestTemplateItem/portal_components/test.erp5.testLiveIngestion.py
+++ b/bt5/erp5_ingestion/TestTemplateItem/portal_components/test.erp5.testLiveIngestion.py
@@ -54,17 +54,6 @@ class TestIngestion(ERP5TypeLiveTestCase):
     """
     return "ERP5 Live DMS - URL Ingestion"
 
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ('erp5_base',
-            'erp5_ingestion',
-            'erp5_ingestion_mysql_innodb_catalog',
-            'erp5_web',
-            'erp5_crm',
-            'erp5_dms')
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/erp5_ingestion/bt/change_log b/bt5/erp5_ingestion/bt/change_log
index 43b216dcb9..440905cee5 100644
--- a/bt5/erp5_ingestion/bt/change_log
+++ b/bt5/erp5_ingestion/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_ingestion/bt/revision b/bt5/erp5_ingestion/bt/revision
index 4b9bce4823..d7019ae2ee 100644
--- a/bt5/erp5_ingestion/bt/revision
+++ b/bt5/erp5_ingestion/bt/revision
@@ -1 +1 @@
-148
\ No newline at end of file
+149
\ No newline at end of file
diff --git a/bt5/erp5_ingestion/bt/test_dependency_list b/bt5/erp5_ingestion/bt/test_dependency_list
new file mode 100644
index 0000000000..105482554a
--- /dev/null
+++ b/bt5/erp5_ingestion/bt/test_dependency_list
@@ -0,0 +1,5 @@
+erp5_full_text_myisam_catalog
+erp5_ingestion_mysql_innodb_catalog
+erp5_web
+erp5_crm
+erp5_dms
\ No newline at end of file
diff --git a/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py b/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py
index 6a4efec38f..3eeed9bb6e 100644
--- a/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py
+++ b/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py
@@ -33,10 +33,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
 from Products.ERP5.ERP5Site import addERP5Tool
 
 class TestInotifyTool(ERP5TypeTestCase):
-
-  def getBusinessTemplateList(self):
-    return "erp5_core_proxy_field_legacy", "erp5_inotify"
-
   def test_inotify(self):
     from Products.ERP5.Tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE
     addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool')
diff --git a/bt5/erp5_inotify/bt/revision b/bt5/erp5_inotify/bt/revision
index 7813681f5b..62f9457511 100644
--- a/bt5/erp5_inotify/bt/revision
+++ b/bt5/erp5_inotify/bt/revision
@@ -1 +1 @@
-5
\ No newline at end of file
+6
\ No newline at end of file
diff --git a/bt5/erp5_inotify/bt/test_dependency_list b/bt5/erp5_inotify/bt/test_dependency_list
new file mode 100644
index 0000000000..9b5c32e80e
--- /dev/null
+++ b/bt5/erp5_inotify/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_core_proxy_field_legacy
\ No newline at end of file
diff --git a/bt5/erp5_interfaces/TestTemplateItem/portal_components/test.erp5.testSOAPBinding.py b/bt5/erp5_interfaces/TestTemplateItem/portal_components/test.erp5.testSOAPBinding.py
index 886f14e080..f9c67d51f9 100644
--- a/bt5/erp5_interfaces/TestTemplateItem/portal_components/test.erp5.testSOAPBinding.py
+++ b/bt5/erp5_interfaces/TestTemplateItem/portal_components/test.erp5.testSOAPBinding.py
@@ -55,10 +55,6 @@ SOAPBinding.registerServiceClass(HelloWorldService)
 
 
 class TestSoapBinding(ERP5TypeTestCase):
-
-  def getBusinessTemplateList(self):
-    return 'erp5_interfaces',
-
   def createBinding(self, target_namespace, service_class):
     return self.portal.portal_interfaces.newContent(
       self._testMethodName, 'SOAP Binding',
diff --git a/bt5/erp5_interfaces/bt/revision b/bt5/erp5_interfaces/bt/revision
index bf0d87ab1b..7813681f5b 100644
--- a/bt5/erp5_interfaces/bt/revision
+++ b/bt5/erp5_interfaces/bt/revision
@@ -1 +1 @@
-4
\ No newline at end of file
+5
\ No newline at end of file
diff --git a/bt5/erp5_mobile_ui_test/TestTemplateItem/portal_components/test.erp5.prepareMobileFunctionalTest.py b/bt5/erp5_mobile_ui_test/TestTemplateItem/portal_components/test.erp5.prepareMobileFunctionalTest.py
index 59150ee937..2e28adc6b9 100644
--- a/bt5/erp5_mobile_ui_test/TestTemplateItem/portal_components/test.erp5.prepareMobileFunctionalTest.py
+++ b/bt5/erp5_mobile_ui_test/TestTemplateItem/portal_components/test.erp5.prepareMobileFunctionalTest.py
@@ -35,12 +35,7 @@ import unittest
 from Products.ERP5Type.tests.prepareFunctionalTest import TestZelenium
 
 class MobileTestZelenium(TestZelenium):
-    def getBusinessTemplateList(self):
-        """
-          Return the list of business templates.
-        """
-        return ('erp5_base', 'erp5_ui_test_core', 'erp5_ui_test',
-                'erp5_mobile', 'erp5_mobile_ui_test',)
+    pass
 
 def test_suite():
     suite = unittest.TestSuite()
diff --git a/bt5/erp5_mobile_ui_test/bt/change_log b/bt5/erp5_mobile_ui_test/bt/change_log
index be919e46ad..d5c5d82d08 100644
--- a/bt5/erp5_mobile_ui_test/bt/change_log
+++ b/bt5/erp5_mobile_ui_test/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_mobile_ui_test/bt/dependency_list b/bt5/erp5_mobile_ui_test/bt/dependency_list
index 65d338641c..fdeca5f106 100644
--- a/bt5/erp5_mobile_ui_test/bt/dependency_list
+++ b/bt5/erp5_mobile_ui_test/bt/dependency_list
@@ -1 +1,2 @@
-erp5_ui_test
\ No newline at end of file
+erp5_ui_test
+erp5_mobile
\ No newline at end of file
diff --git a/bt5/erp5_mobile_ui_test/bt/revision b/bt5/erp5_mobile_ui_test/bt/revision
index 3cacc0b93c..ca7bf83ac5 100644
--- a/bt5/erp5_mobile_ui_test/bt/revision
+++ b/bt5/erp5_mobile_ui_test/bt/revision
@@ -1 +1 @@
-12
\ No newline at end of file
+13
\ No newline at end of file
diff --git a/bt5/erp5_paypal_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PaypalSecurePayment.py b/bt5/erp5_paypal_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PaypalSecurePayment.py
index eae2a488c0..e04279569f 100644
--- a/bt5/erp5_paypal_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PaypalSecurePayment.py
+++ b/bt5/erp5_paypal_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PaypalSecurePayment.py
@@ -40,14 +40,6 @@ class TestERP5PaypalSecurePaymentMixin(ERP5TypeTestCase):
   def getTitle(self):
     return "ERP5 Paypal Secure Payment"
 
-  def getBusinessTemplateList(self):
-    """
-    Tuple of Business Templates we need to install
-    """
-    return ('erp5_base',
-            'erp5_secure_payment',
-            'erp5_paypal_secure_payment')
-
   def afterSetUp(self):
     self.portal = self.getPortalObject()
     if not self.portal.hasObject('portal_secure_payments'):
diff --git a/bt5/erp5_paypal_secure_payment/bt/change_log b/bt5/erp5_paypal_secure_payment/bt/change_log
index 93722f26ad..889af93175 100644
--- a/bt5/erp5_paypal_secure_payment/bt/change_log
+++ b/bt5/erp5_paypal_secure_payment/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_paypal_secure_payment/bt/revision b/bt5/erp5_paypal_secure_payment/bt/revision
index f11c82a4cb..9a037142aa 100644
--- a/bt5/erp5_paypal_secure_payment/bt/revision
+++ b/bt5/erp5_paypal_secure_payment/bt/revision
@@ -1 +1 @@
-9
\ No newline at end of file
+10
\ No newline at end of file
diff --git a/bt5/erp5_paypal_secure_payment/bt/test_dependency_list b/bt5/erp5_paypal_secure_payment/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_paypal_secure_payment/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_payzen_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PayzenSecurePayment.py b/bt5/erp5_payzen_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PayzenSecurePayment.py
index f0f91eb431..f9c22feb86 100644
--- a/bt5/erp5_payzen_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PayzenSecurePayment.py
+++ b/bt5/erp5_payzen_secure_payment/TestTemplateItem/portal_components/test.erp5.testERP5PayzenSecurePayment.py
@@ -41,14 +41,6 @@ class TestERP5PayzenSecurePaymentMixin(ERP5TypeTestCase):
   def getTitle(self):
     return "ERP5 Payzen Secure Payment"
 
-  def getBusinessTemplateList(self):
-    """
-    Tuple of Business Templates we need to install
-    """
-    return ('erp5_base'
-          , 'erp5_secure_payment'
-          , 'erp5_payzen_secure_payment')
-
   def afterSetUp(self):
     self.portal = self.getPortalObject()
     if not self.portal.hasObject('portal_secure_payments'):
diff --git a/bt5/erp5_payzen_secure_payment/bt/change_log b/bt5/erp5_payzen_secure_payment/bt/change_log
index 9edd8a5fe5..664c97bd6c 100644
--- a/bt5/erp5_payzen_secure_payment/bt/change_log
+++ b/bt5/erp5_payzen_secure_payment/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_payzen_secure_payment/bt/revision b/bt5/erp5_payzen_secure_payment/bt/revision
index 6139554210..8783e30511 100644
--- a/bt5/erp5_payzen_secure_payment/bt/revision
+++ b/bt5/erp5_payzen_secure_payment/bt/revision
@@ -1 +1 @@
-52
\ No newline at end of file
+53
\ No newline at end of file
diff --git a/bt5/erp5_payzen_secure_payment/bt/test_dependency_list b/bt5/erp5_payzen_secure_payment/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_payzen_secure_payment/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_pdf_merge/bt/test_dependency_list b/bt5/erp5_pdf_merge/bt/test_dependency_list
new file mode 100644
index 0000000000..117dc3e54f
--- /dev/null
+++ b/bt5/erp5_pdf_merge/bt/test_dependency_list
@@ -0,0 +1,5 @@
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_web
+erp5_ingestion
+erp5_dms
\ No newline at end of file
diff --git a/bt5/erp5_safeimage/TestTemplateItem/portal_components/test.erp5.testSafeImage.py b/bt5/erp5_safeimage/TestTemplateItem/portal_components/test.erp5.testSafeImage.py
index 32737b9b39..de376b436f 100644
--- a/bt5/erp5_safeimage/TestTemplateItem/portal_components/test.erp5.testSafeImage.py
+++ b/bt5/erp5_safeimage/TestTemplateItem/portal_components/test.erp5.testSafeImage.py
@@ -28,16 +28,6 @@ def makeFileUpload(name, as_name=None):
   return FileUpload(path, as_name)
 
 class TestSafeImage(ERP5TypeTestCase):
-
-  def getBusinessTemplateList(self):
-    return ('erp5_base',
-            'erp5_web',
-            'erp5_ingestion_mysql_innodb_catalog',
-            'erp5_ingestion',
-            'erp5_dms',
-            'erp5_safeimage'
-           )
-
   def afterSetUp(self):
     portal = self.getPortalObject()
     self.image_module = self.portal.getDefaultModule(portal_type = 'Image Module')
diff --git a/bt5/erp5_safeimage/bt/dependency_list b/bt5/erp5_safeimage/bt/dependency_list
new file mode 100644
index 0000000000..be63ffd97a
--- /dev/null
+++ b/bt5/erp5_safeimage/bt/dependency_list
@@ -0,0 +1,3 @@
+erp5_base
+erp5_web
+erp5_dms
\ No newline at end of file
diff --git a/bt5/erp5_safeimage/bt/revision b/bt5/erp5_safeimage/bt/revision
index da2d3988d7..3f10ffe7a4 100644
--- a/bt5/erp5_safeimage/bt/revision
+++ b/bt5/erp5_safeimage/bt/revision
@@ -1 +1 @@
-14
\ No newline at end of file
+15
\ No newline at end of file
diff --git a/bt5/erp5_safeimage/bt/test_dependency_list b/bt5/erp5_safeimage/bt/test_dependency_list
new file mode 100644
index 0000000000..73ffa2a14b
--- /dev/null
+++ b/bt5/erp5_safeimage/bt/test_dependency_list
@@ -0,0 +1,3 @@
+erp5_full_text_myisam_catalog
+erp5_ingestion_mysql_innodb_catalog
+erp5_ingestion
\ No newline at end of file
diff --git a/bt5/erp5_social_contracts/TestTemplateItem/portal_components/test.erp5.testERP5SocialContracts.py b/bt5/erp5_social_contracts/TestTemplateItem/portal_components/test.erp5.testERP5SocialContracts.py
index 83cfc162c0..310db5fcbf 100644
--- a/bt5/erp5_social_contracts/TestTemplateItem/portal_components/test.erp5.testERP5SocialContracts.py
+++ b/bt5/erp5_social_contracts/TestTemplateItem/portal_components/test.erp5.testERP5SocialContracts.py
@@ -34,9 +34,6 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
 class TestERP5SocialContracts(ERP5TypeTestCase):
   """Test for erp5_social_contracts business template.
   """
-  def getBusinessTemplateList(self):
-    return ('erp5_base', 'erp5_social_contracts', )
-
   def afterSetUp(self):
     self.person_1 = self.portal.person_module.newContent(
                                       portal_type='Person',
diff --git a/bt5/erp5_social_contracts/bt/change_log b/bt5/erp5_social_contracts/bt/change_log
index 2d823b0070..12e420294d 100644
--- a/bt5/erp5_social_contracts/bt/change_log
+++ b/bt5/erp5_social_contracts/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_social_contracts/bt/revision b/bt5/erp5_social_contracts/bt/revision
index 368f89ceef..d99e90eb96 100644
--- a/bt5/erp5_social_contracts/bt/revision
+++ b/bt5/erp5_social_contracts/bt/revision
@@ -1 +1 @@
-28
\ No newline at end of file
+29
\ No newline at end of file
diff --git a/bt5/erp5_social_contracts/bt/test_dependency_list b/bt5/erp5_social_contracts/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_social_contracts/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_syncml_test_data/TestTemplateItem/portal_components/test.erp5.testSyncMLAsynchronousEngine.py b/bt5/erp5_syncml_test_data/TestTemplateItem/portal_components/test.erp5.testSyncMLAsynchronousEngine.py
index 2dec21212d..f6357f6b51 100644
--- a/bt5/erp5_syncml_test_data/TestTemplateItem/portal_components/test.erp5.testSyncMLAsynchronousEngine.py
+++ b/bt5/erp5_syncml_test_data/TestTemplateItem/portal_components/test.erp5.testSyncMLAsynchronousEngine.py
@@ -37,12 +37,6 @@ class testSyncMLAsynchronousEngine(TestERP5SyncMLMixin):
   def getTitle(self):
     return "Test SyncML with asynchronous engine"
 
-  def getBusinessTemplateList(self):
-    """
-    Tuple of Business Templates we need to install
-    """
-    return ('erp5_base', 'erp5_syncml', 'erp5_syncml_test_data')  # bt5 for test data
-
   def afterSetUp(self):
     """
     This is ran before anything, used to set the environment
diff --git a/bt5/erp5_syncml_test_data/bt/change_log b/bt5/erp5_syncml_test_data/bt/change_log
index eabcbf5220..6b6f9bba62 100644
--- a/bt5/erp5_syncml_test_data/bt/change_log
+++ b/bt5/erp5_syncml_test_data/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_syncml_test_data/bt/dependency_list b/bt5/erp5_syncml_test_data/bt/dependency_list
index 0804ebd1c9..46f0087a96 100644
--- a/bt5/erp5_syncml_test_data/bt/dependency_list
+++ b/bt5/erp5_syncml_test_data/bt/dependency_list
@@ -1 +1,2 @@
-erp5_syncml
\ No newline at end of file
+erp5_syncml
+erp5_base
\ No newline at end of file
diff --git a/bt5/erp5_syncml_test_data/bt/revision b/bt5/erp5_syncml_test_data/bt/revision
index 7813681f5b..62f9457511 100644
--- a/bt5/erp5_syncml_test_data/bt/revision
+++ b/bt5/erp5_syncml_test_data/bt/revision
@@ -1 +1 @@
-5
\ No newline at end of file
+6
\ No newline at end of file
diff --git a/bt5/erp5_syncml_test_data/bt/test_dependency_list b/bt5/erp5_syncml_test_data/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_syncml_test_data/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_test_result/bt/test_dependency_list b/bt5/erp5_test_result/bt/test_dependency_list
new file mode 100644
index 0000000000..9a77167a96
--- /dev/null
+++ b/bt5/erp5_test_result/bt/test_dependency_list
@@ -0,0 +1,2 @@
+erp5_full_text_myisam_catalog
+erp5_base
\ No newline at end of file
diff --git a/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.ShaCacheMixin.py b/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.ShaCacheMixin.py
index 13bdf01d43..3c0f41551a 100644
--- a/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.ShaCacheMixin.py
+++ b/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.ShaCacheMixin.py
@@ -36,21 +36,6 @@ class ShaCacheMixin(object):
   """
     ShaCache - Mixin Class
   """
-
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ('erp5_full_text_myisam_catalog',
-            'erp5_base',
-            'erp5_jquery',
-            'erp5_ingestion_mysql_innodb_catalog',
-            'erp5_ingestion',
-            'erp5_web',
-            'erp5_dms',
-            'erp5_web_download_theme',
-            'erp5_web_shacache',)
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.testShaCache.py b/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.testShaCache.py
index f39a4ad29f..929af3062d 100644
--- a/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.testShaCache.py
+++ b/bt5/erp5_web_shacache/TestTemplateItem/portal_components/test.erp5.testShaCache.py
@@ -31,7 +31,7 @@
 import httplib
 import urlparse
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
-from ShaCacheMixin import ShaCacheMixin
+from erp5.component.test.ShaCacheMixin import ShaCacheMixin
 from Products.ERP5Type.tests.backportUnittest import expectedFailure
 
 class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
diff --git a/bt5/erp5_web_shacache/bt/change_log b/bt5/erp5_web_shacache/bt/change_log
index aae06bad4c..41f5275dda 100644
--- a/bt5/erp5_web_shacache/bt/change_log
+++ b/bt5/erp5_web_shacache/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_web_shacache/bt/revision b/bt5/erp5_web_shacache/bt/revision
index 3d9aebb2cc..8c0474e323 100644
--- a/bt5/erp5_web_shacache/bt/revision
+++ b/bt5/erp5_web_shacache/bt/revision
@@ -1 +1 @@
-68
\ No newline at end of file
+69
\ No newline at end of file
diff --git a/bt5/erp5_web_shacache/bt/test_dependency_list b/bt5/erp5_web_shacache/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_web_shacache/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py b/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
index 8fb927c478..03c053d2cd 100644
--- a/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
+++ b/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.ShaDirMixin.py
@@ -39,25 +39,6 @@ class ShaDirMixin(object):
   """
     ShaDir - Mixin Class
   """
-
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ('erp5_full_text_myisam_catalog',
-            'erp5_base',
-            'erp5_jquery',
-            'erp5_ingestion_mysql_innodb_catalog',
-            'erp5_ingestion',
-            'erp5_web',
-            'erp5_dms',
-            'erp5_pdm',
-            'erp5_data_set',
-            'erp5_web_download_theme',
-            'erp5_web_shacache',
-            'erp5_web_shadir',)
-
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.testShaDir.py b/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.testShaDir.py
index 7349229103..31556b30a8 100644
--- a/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.testShaDir.py
+++ b/bt5/erp5_web_shadir/TestTemplateItem/portal_components/test.erp5.testShaDir.py
@@ -33,7 +33,7 @@ import urlparse
 import json
 import random
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
-from ShaDirMixin import ShaDirMixin
+from erp5.component.test.ShaDirMixin import ShaDirMixin
 from Products.ERP5Type.tests.backportUnittest import expectedFailure
 
 class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
diff --git a/bt5/erp5_web_shadir/bt/change_log b/bt5/erp5_web_shadir/bt/change_log
index a040c5fa8c..31090a72d8 100644
--- a/bt5/erp5_web_shadir/bt/change_log
+++ b/bt5/erp5_web_shadir/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_web_shadir/bt/revision b/bt5/erp5_web_shadir/bt/revision
index a76c74dcec..aa92725341 100644
--- a/bt5/erp5_web_shadir/bt/revision
+++ b/bt5/erp5_web_shadir/bt/revision
@@ -1 +1 @@
-75
\ No newline at end of file
+76
\ No newline at end of file
diff --git a/bt5/erp5_web_shadir/bt/test_dependency_list b/bt5/erp5_web_shadir/bt/test_dependency_list
new file mode 100644
index 0000000000..d7bf03237e
--- /dev/null
+++ b/bt5/erp5_web_shadir/bt/test_dependency_list
@@ -0,0 +1,8 @@
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_jquery
+erp5_ingestion_mysql_innodb_catalog
+erp5_ingestion
+erp5_web
+erp5_dms
+erp5_pdm
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_core/bt/change_log b/bt5/erp5_web_ung_core/bt/change_log
index df46a00cc0..220341c053 100644
--- a/bt5/erp5_web_ung_core/bt/change_log
+++ b/bt5/erp5_web_ung_core/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2011-08-04 gabriel.oliveira
 * Export knowledge pad and gadget preserving its state
 
@@ -31,4 +34,4 @@
 * Remove erp5_jquery folder and added erp5_jquery bt5 as dependency.
 
 2010-10-13 gabriel
-* The initial version.
+* The initial version.
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_core/bt/revision b/bt5/erp5_web_ung_core/bt/revision
index 8783e30511..43c451e0c6 100644
--- a/bt5/erp5_web_ung_core/bt/revision
+++ b/bt5/erp5_web_ung_core/bt/revision
@@ -1 +1 @@
-53
\ No newline at end of file
+54
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_core/bt/test_dependency_list b/bt5/erp5_web_ung_core/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/erp5_web_ung_core/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_role/TestTemplateItem/portal_components/test.erp5.testUNGSecurity.py b/bt5/erp5_web_ung_role/TestTemplateItem/portal_components/test.erp5.testUNGSecurity.py
index ab2705c108..556fcb6eec 100644
--- a/bt5/erp5_web_ung_role/TestTemplateItem/portal_components/test.erp5.testUNGSecurity.py
+++ b/bt5/erp5_web_ung_role/TestTemplateItem/portal_components/test.erp5.testUNGSecurity.py
@@ -38,37 +38,6 @@ class TestUNGSecurity(ERP5TypeTestCase):
   def getTitle(self):
     return "Test UNG Security"
 
-  def getBusinessTemplateList(self):
-    """Tuple of Business Templates we need to install"""
-    return ('erp5_base',
-            'erp5_web',
-            'erp5_ingestion_mysql_innodb_catalog',
-            'erp5_core_proxy_field_legacy',
-            'erp5_jquery',
-            'erp5_jquery_ui',
-            'erp5_ingestion',
-            'erp5_dms',
-            'erp5_crm',
-            'erp5_knowledge_pad',
-            'erp5_jquery_plugin_spinbtn',
-            'erp5_jquery_plugin_jgraduate',
-            'erp5_jquery_plugin_svgicon',
-            'erp5_jquery_plugin_hotkey',
-            'erp5_jquery_plugin_jquerybbq',
-            'erp5_jquery_plugin_svg_editor',
-            'erp5_jquery_plugin_sheet',
-            'erp5_jquery_plugin_mbmenu',
-            'erp5_jquery_plugin_jqchart',
-            'erp5_jquery_plugin_colorpicker',
-            'erp5_jquery_plugin_elastic',
-            'erp5_jquery_plugin_wdcalendar',
-            'erp5_jquery_sheet_editor',
-            'erp5_xinha_editor',
-            'erp5_svg_editor',
-            'erp5_web_ung_core',
-            'erp5_web_ung_theme',
-            'erp5_web_ung_role')
-
   def beforeTearDown(self):
     person_module = self.getPersonModule()
     person_module.manage_delObjects(list(person_module.objectIds()))
diff --git a/bt5/erp5_web_ung_role/bt/change_log b/bt5/erp5_web_ung_role/bt/change_log
index 06b7bf446f..736c4ed2f3 100644
--- a/bt5/erp5_web_ung_role/bt/change_log
+++ b/bt5/erp5_web_ung_role/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_web_ung_role/bt/revision b/bt5/erp5_web_ung_role/bt/revision
index dce6588ca1..7c091989d0 100644
--- a/bt5/erp5_web_ung_role/bt/revision
+++ b/bt5/erp5_web_ung_role/bt/revision
@@ -1 +1 @@
-36
\ No newline at end of file
+37
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_role/bt/test_dependency_list b/bt5/erp5_web_ung_role/bt/test_dependency_list
new file mode 100644
index 0000000000..fb492e5d53
--- /dev/null
+++ b/bt5/erp5_web_ung_role/bt/test_dependency_list
@@ -0,0 +1,27 @@
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_web
+erp5_ingestion_mysql_innodb_catalog
+erp5_core_proxy_field_legacy
+erp5_jquery
+erp5_jquery_ui
+erp5_ingestion
+erp5_dms
+erp5_crm
+erp5_knowledge_pad
+erp5_jquery_plugin_spinbtn
+erp5_jquery_plugin_jgraduate
+erp5_jquery_plugin_svgicon
+erp5_jquery_plugin_hotkey
+erp5_jquery_plugin_jquerybbq
+erp5_jquery_plugin_svg_editor
+erp5_jquery_plugin_sheet
+erp5_jquery_plugin_mbmenu
+erp5_jquery_plugin_jqchart
+erp5_jquery_plugin_colorpicker
+erp5_jquery_plugin_elastic
+erp5_jquery_plugin_wdcalendar
+erp5_jquery_sheet_editor
+erp5_xinha_editor
+erp5_svg_editor
+erp5_web_ung_core
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_theme/TestTemplateItem/portal_components/test.erp5.testUNG.py b/bt5/erp5_web_ung_theme/TestTemplateItem/portal_components/test.erp5.testUNG.py
index 91d4b44112..667142aade 100644
--- a/bt5/erp5_web_ung_theme/TestTemplateItem/portal_components/test.erp5.testUNG.py
+++ b/bt5/erp5_web_ung_theme/TestTemplateItem/portal_components/test.erp5.testUNG.py
@@ -44,36 +44,6 @@ class TestUNG(ERP5TypeTestCase):
   def getTitle(self):
     return "UNG Tests"
 
-  def getBusinessTemplateList(self):
-    return ('erp5_ingestion_mysql_innodb_catalog',
-            'erp5_full_text_myisam_catalog',
-            'erp5_base',
-            'erp5_jquery',
-            'erp5_web',
-            'erp5_core_proxy_field_legacy',
-            'erp5_ingestion',
-            'erp5_jquery_ui',
-            'erp5_dms',
-            'erp5_crm',
-            'erp5_knowledge_pad',
-            'erp5_jquery_plugin_spinbtn',
-            'erp5_jquery_plugin_jgraduate',
-            'erp5_jquery_plugin_svgicon',
-            'erp5_jquery_plugin_hotkey',
-            'erp5_jquery_plugin_jquerybbq',
-            'erp5_jquery_plugin_svg_editor',
-            'erp5_jquery_plugin_sheet',
-            'erp5_jquery_plugin_mbmenu',
-            'erp5_jquery_plugin_jqchart',
-            'erp5_jquery_plugin_colorpicker',
-            'erp5_jquery_plugin_elastic',
-            'erp5_jquery_plugin_wdcalendar',
-            'erp5_jquery_sheet_editor',
-            'erp5_xinha_editor',
-            'erp5_svg_editor',
-            'erp5_web_ung_core',
-            'erp5_web_ung_theme',)
-
   def afterSetUp(self):
     """Clean up form"""
     self.portal.REQUEST.form.clear()
diff --git a/bt5/erp5_web_ung_theme/bt/change_log b/bt5/erp5_web_ung_theme/bt/change_log
index f1f575448e..4bbe79244f 100644
--- a/bt5/erp5_web_ung_theme/bt/change_log
+++ b/bt5/erp5_web_ung_theme/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/erp5_web_ung_theme/bt/revision b/bt5/erp5_web_ung_theme/bt/revision
index be6652a2ab..5e801cee88 100644
--- a/bt5/erp5_web_ung_theme/bt/revision
+++ b/bt5/erp5_web_ung_theme/bt/revision
@@ -1 +1 @@
-415
\ No newline at end of file
+416
\ No newline at end of file
diff --git a/bt5/erp5_web_ung_theme/bt/test_dependency_list b/bt5/erp5_web_ung_theme/bt/test_dependency_list
new file mode 100644
index 0000000000..768ccd338e
--- /dev/null
+++ b/bt5/erp5_web_ung_theme/bt/test_dependency_list
@@ -0,0 +1,27 @@
+erp5_ingestion_mysql_innodb_catalog
+erp5_full_text_myisam_catalog
+erp5_base
+erp5_jquery
+erp5_web
+erp5_core_proxy_field_legacy
+erp5_ingestion
+erp5_jquery_ui
+erp5_dms
+erp5_crm
+erp5_knowledge_pad
+erp5_jquery_plugin_spinbtn
+erp5_jquery_plugin_jgraduate
+erp5_jquery_plugin_svgicon
+erp5_jquery_plugin_hotkey
+erp5_jquery_plugin_jquerybbq
+erp5_jquery_plugin_svg_editor
+erp5_jquery_plugin_sheet
+erp5_jquery_plugin_mbmenu
+erp5_jquery_plugin_jqchart
+erp5_jquery_plugin_colorpicker
+erp5_jquery_plugin_elastic
+erp5_jquery_plugin_wdcalendar
+erp5_jquery_sheet_editor
+erp5_xinha_editor
+erp5_svg_editor
+erp5_web_ung_theme
\ No newline at end of file
diff --git a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheExternal.py b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheExternal.py
index d235d437fb..6058f00ca7 100644
--- a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheExternal.py
+++ b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheExternal.py
@@ -32,8 +32,8 @@ import base64
 import httplib
 from DateTime import DateTime
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
-from ShaCacheMixin import ShaCacheMixin
-from ShaSecurityMixin import ShaSecurityMixin
+from erp5.component.test.ShaCacheMixin import ShaCacheMixin
+from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
 from Products.ERP5Type.tests.backportUnittest import expectedFailure
 
 class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
@@ -48,14 +48,6 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
     """
     return "SHACACHE External - Real Usage Of ShaCache"
 
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ShaCacheMixin().getBusinessTemplateList() + \
-                         ('erp5_data_set',
-                          'networkcache_erp5',)
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheSecurity.py b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheSecurity.py
index 48b57d5208..146ba659bf 100644
--- a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheSecurity.py
+++ b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaCacheSecurity.py
@@ -30,8 +30,8 @@
 
 from AccessControl import Unauthorized
 from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
-from ShaCacheMixin import ShaCacheMixin
-from ShaSecurityMixin import ShaSecurityMixin
+from erp5.component.test.ShaCacheMixin import ShaCacheMixin
+from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
 
 
 class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
@@ -45,16 +45,6 @@ class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
     """
     return "SHADIR Security Test Case"
 
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ShaCacheMixin().getBusinessTemplateList() + \
-                         ('erp5_pdm',
-                          'erp5_data_set',
-                          'erp5_web_shadir',
-                          'networkcache_erp5',)
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirExternal.py b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirExternal.py
index 5b6cbf0ab3..02f7fb8523 100644
--- a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirExternal.py
+++ b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirExternal.py
@@ -34,8 +34,8 @@ import os
 import httplib
 from DateTime import DateTime
 from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeTestCase
-from ShaDirMixin import ShaDirMixin
-from ShaSecurityMixin import ShaSecurityMixin
+from erp5.component.test.ShaDirMixin import ShaDirMixin
+from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
 
 
 class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
@@ -50,13 +50,6 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
     """
     return "SHADIR External - Real Usage Of ShaDir"
 
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ShaDirMixin().getBusinessTemplateList() + \
-                         ('networkcache_erp5',)
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirSecurity.py b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirSecurity.py
index 86f6c49137..d533adcebe 100644
--- a/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirSecurity.py
+++ b/bt5/networkcache_erp5/TestTemplateItem/portal_components/test.erp5.testShaDirSecurity.py
@@ -30,8 +30,8 @@
 
 from AccessControl import Unauthorized
 from Products.ERP5Type.tests.SecurityTestCase import SecurityTestCase
-from ShaDirMixin import ShaDirMixin
-from ShaSecurityMixin import ShaSecurityMixin
+from erp5.component.test.ShaDirMixin import ShaDirMixin
+from erp5.component.test.ShaSecurityMixin import ShaSecurityMixin
 
 
 class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
@@ -45,13 +45,6 @@ class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
     """
     return "SHADIR Security Test Case"
 
-  def getBusinessTemplateList(self):
-    """
-      Return the list of required business templates.
-    """
-    return ShaDirMixin().getBusinessTemplateList() + \
-                         ('networkcache_erp5',)
-
   def afterSetUp(self):
     """
       Initialize the ERP5 site.
diff --git a/bt5/networkcache_erp5/bt/change_log b/bt5/networkcache_erp5/bt/change_log
index 91a75f4f78..6540dffc22 100644
--- a/bt5/networkcache_erp5/bt/change_log
+++ b/bt5/networkcache_erp5/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/bt5/networkcache_erp5/bt/revision b/bt5/networkcache_erp5/bt/revision
index b74e882ae3..1758dddcce 100644
--- a/bt5/networkcache_erp5/bt/revision
+++ b/bt5/networkcache_erp5/bt/revision
@@ -1 +1 @@
-31
\ No newline at end of file
+32
\ No newline at end of file
diff --git a/bt5/networkcache_erp5/bt/test_dependency_list b/bt5/networkcache_erp5/bt/test_dependency_list
new file mode 100644
index 0000000000..1dafe8b1e0
--- /dev/null
+++ b/bt5/networkcache_erp5/bt/test_dependency_list
@@ -0,0 +1,3 @@
+erp5_full_text_myisam_catalog
+erp5_pdm
+erp5_data_set
\ No newline at end of file
diff --git a/bt5/test_conflict_resolution/TestTemplateItem/portal_components/test.erp5.testConflictResolution.py b/bt5/test_conflict_resolution/TestTemplateItem/portal_components/test.erp5.testConflictResolution.py
index ece91d5ed3..5693ffb714 100644
--- a/bt5/test_conflict_resolution/TestTemplateItem/portal_components/test.erp5.testConflictResolution.py
+++ b/bt5/test_conflict_resolution/TestTemplateItem/portal_components/test.erp5.testConflictResolution.py
@@ -87,9 +87,6 @@ class TestERP5(ERP5TypeTestCase):
   def getTitle(self):
     return "Conflict Resolution: ERP5"
 
-  def getBusinessTemplateList(self):
-    return 'erp5_base', 'test_conflict_resolution'
-
   def afterSetUp(self):
     other_node = self.getOtherZopeNode()
     self.other_node = self.portal.portal_web_services.connect(
diff --git a/bt5/test_conflict_resolution/bt/revision b/bt5/test_conflict_resolution/bt/revision
index 62f9457511..c7930257df 100644
--- a/bt5/test_conflict_resolution/bt/revision
+++ b/bt5/test_conflict_resolution/bt/revision
@@ -1 +1 @@
-6
\ No newline at end of file
+7
\ No newline at end of file
diff --git a/bt5/test_conflict_resolution/bt/test_dependency_list b/bt5/test_conflict_resolution/bt/test_dependency_list
new file mode 100644
index 0000000000..418a1a563a
--- /dev/null
+++ b/bt5/test_conflict_resolution/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py
index 8d183e295a..12832db135 100644
--- a/product/ERP5/Tool/TemplateTool.py
+++ b/product/ERP5/Tool/TemplateTool.py
@@ -699,7 +699,7 @@ class TemplateTool (BaseTool):
       """
       self.repository_dict = PersistentMapping()
       property_list = ('title', 'version', 'revision', 'description', 'license',
-                       'dependency', 'provision', 'copyright')
+                       'dependency', 'test_dependency', 'provision', 'copyright')
       #LOG('updateRepositoryBusiessTemplateList', 0,
       #    'repository_list = %r' % (repository_list,))
       for repository in repository_list:
@@ -749,6 +749,8 @@ class TemplateTool (BaseTool):
                   temp_property_dict.get('license', [''])[0]
               property_dict['dependency_list'] = \
                   temp_property_dict.get('dependency', ())
+              property_dict['test_dependency_list'] = \
+                  temp_property_dict.get('test_dependency', ())
               property_dict['provision_list'] = \
                   temp_property_dict.get('provision', ())
               property_dict['copyright_list'] = \
@@ -878,7 +880,7 @@ class TemplateTool (BaseTool):
 
     security.declareProtected(Permissions.AccessContentsInformation,
                                'getDependencyList')
-    def getDependencyList(self, bt):
+    def getDependencyList(self, bt, with_test_dependency_list=False):
       """
        Return the list of missing dependencies for a business
        template, given a tuple : (repository, id)
@@ -896,7 +898,11 @@ class TemplateTool (BaseTool):
           if repository == bt[0]:
             for property_dict in property_dict_list:
               if property_dict['id'] == bt[1]:
-                dependency_list = [q for q in property_dict['dependency_list'] if q]
+                dependency_list = [q.strip() for q in
+                                   property_dict['dependency_list'] if q]
+                if with_test_dependency_list:
+                  dependency_list.extend([q.strip() for q in
+                                          property_dict['test_dependency_list'] if q])
                 for dependency_couple in dependency_list:
                   # dependency_couple is like "erp5_xhtml_style (>= 0.2)"
                   dependency_couple_list = dependency_couple.split(' ', 1)
@@ -1236,7 +1242,9 @@ class TemplateTool (BaseTool):
 
     security.declareProtected(Permissions.ManagePortal,
          'resolveBusinessTemplateListDependency')
-    def resolveBusinessTemplateListDependency(self, template_title_list):
+    def resolveBusinessTemplateListDependency(self,
+                                              template_title_list,
+                                              with_test_dependency_list=False):
       available_bt5_list = self.getRepositoryBusinessTemplateList()
 
       template_title_list = set(template_title_list)
@@ -1249,7 +1257,9 @@ class TemplateTool (BaseTool):
           bt5 = self.decodeRepositoryBusinessTemplateUid(available_bt5.uid)
           bt5_set.add(bt5)
           meta_dependency_set = set()
-          for dep_repository, dep_id in self.getDependencyList(bt5):
+          for dep_repository, dep_id in self.getDependencyList(
+              bt5,
+              with_test_dependency_list):
             if dep_repository != 'meta':
               bt5_set.add((dep_repository, dep_id))
             else:
diff --git a/product/ERP5/bin/genbt5list b/product/ERP5/bin/genbt5list
index 106efeddf7..01c4272b13 100755
--- a/product/ERP5/bin/genbt5list
+++ b/product/ERP5/bin/genbt5list
@@ -45,6 +45,7 @@ revision
 description
 license
 dependency_list
+test_dependency_list
 provision_list
 copyright_list
 '''.strip().splitlines()
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view.xml
index 345ecbc14e..96e59c2e8b 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view.xml
@@ -124,6 +124,7 @@
                       <list>
                         <string>my_change_log</string>
                         <string>my_dependency_list</string>
+                        <string>my_test_dependency_list</string>
                         <string>my_provision_list</string>
                         <string>my_copyright_list</string>
                         <string>my_license</string>
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_test_dependency_list.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_test_dependency_list.xml
new file mode 100644
index 0000000000..85addd242e
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/BusinessTemplate_view/my_test_dependency_list.xml
@@ -0,0 +1,298 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="LinesField" module="Products.Formulator.StandardFields"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>my_test_dependency_list</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+                <item>
+                    <key> <string>line_too_long</string> </key>
+                    <value> <string>A line was too long.</string> </value>
+                </item>
+                <item>
+                    <key> <string>required_not_found</string> </key>
+                    <value> <string>Input is required but no input given.</string> </value>
+                </item>
+                <item>
+                    <key> <string>too_long</string> </key>
+                    <value> <string>You entered too many characters.</string> </value>
+                </item>
+                <item>
+                    <key> <string>too_many_lines</string> </key>
+                    <value> <string>You entered too many lines.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>height</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_linelength</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_lines</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>view_separator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>height</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_linelength</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_lines</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>view_separator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>width</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value>
+                      <list/>
+                    </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>height</string> </key>
+                    <value> <int>3</int> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>max_length</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_linelength</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>max_lines</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>required</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Tests Dependencies</string> </value>
+                </item>
+                <item>
+                    <key> <string>unicode</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>view_separator</string> </key>
+                    <value> <string encoding="cdata"><![CDATA[
+
+<br />
+
+]]></string> </value>
+                </item>
+                <item>
+                    <key> <string>whitespace_preserve</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>width</string> </key>
+                    <value> <int>40</int> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_core/TestTemplateItem/portal_components/test.erp5.testActivityTool.py b/product/ERP5/bootstrap/erp5_core/TestTemplateItem/portal_components/test.erp5.testActivityTool.py
index 06fa76f97b..a838aa893d 100644
--- a/product/ERP5/bootstrap/erp5_core/TestTemplateItem/portal_components/test.erp5.testActivityTool.py
+++ b/product/ERP5/bootstrap/erp5_core/TestTemplateItem/portal_components/test.erp5.testActivityTool.py
@@ -35,12 +35,6 @@ class Test(ERP5TypeTestCase):
   def getTitle(self):
     return "TestActivityTool"
 
-  def getBusinessTemplateList(self):
-    """
-    Tuple of Business Templates we need to install
-    """
-    return ('erp5_base',)
-
   def afterSetUp(self):
     """
     This is ran before anything, used to set the environment
diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log
index df6f8914ba..c910526cb1 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_core/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-09-03 arnaud.fontaine
 * ZODB Components: Workflow History must always be kept, so avoid an extra step for developers.
 
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index b3a717d3cd..2aec5dd5b9 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-41124
\ No newline at end of file
+41125
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_core/bt/test_dependency_list b/product/ERP5/bootstrap/erp5_core/bt/test_dependency_list
new file mode 100644
index 0000000000..9a77167a96
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_core/bt/test_dependency_list
@@ -0,0 +1,2 @@
+erp5_full_text_myisam_catalog
+erp5_base
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/BusinessTemplate/test_dependency_property.xml b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/BusinessTemplate/test_dependency_property.xml
new file mode 100644
index 0000000000..d9ce685dd8
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/BusinessTemplate/test_dependency_property.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <global name="Standard Property" module="erp5.portal_type"/>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>categories</string> </key>
+            <value>
+              <tuple>
+                <string>elementary_type/lines</string>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>description</string> </key>
+            <value> <string>a list of template names required by this template to run unit tests from an instance created only for unit tests</string> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>test_dependency_property</string> </value>
+        </item>
+        <item>
+            <key> <string>portal_type</string> </key>
+            <value> <string>Standard Property</string> </value>
+        </item>
+        <item>
+            <key> <string>property_default</string> </key>
+            <value> <string>python: ()</string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log b/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log
index cac5d71d88..7d47c00d87 100644
--- a/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/change_log
@@ -1,3 +1,6 @@
+2013-09-08 arnaud.fontaine
+* ZODB Components: Revert 'Allow to execute runUnitTest for bt5 Test Components' to fix tests bootstrap.
+
 2013-08-20 arnaud.fontaine
 * ZODB Components: Add BusinessTemplate property to specify the object paths whose only last workflow history must be kept on export.
 
diff --git a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision
index 4e9e288487..4b6f9c39e5 100644
--- a/product/ERP5/bootstrap/erp5_property_sheets/bt/revision
+++ b/product/ERP5/bootstrap/erp5_property_sheets/bt/revision
@@ -1 +1 @@
-63
\ No newline at end of file
+64
\ No newline at end of file
diff --git a/product/ERP5Type/tests/runUnitTest.py b/product/ERP5Type/tests/runUnitTest.py
index 3089f56178..7dab8c2606 100755
--- a/product/ERP5Type/tests/runUnitTest.py
+++ b/product/ERP5Type/tests/runUnitTest.py
@@ -277,7 +277,6 @@ else:
   real_instance_home = os.path.sep.join(
       tests_framework_home.split(os.path.sep)[:-3])
 
-
 class ERP5TypeTestLoader(unittest.TestLoader):
   """Load test cases from the name passed on the command line.
   """
@@ -289,40 +288,32 @@ class ERP5TypeTestLoader(unittest.TestLoader):
     lambda self, value: None)
 
   def loadTestsFromName(self, name, module=None):
-    """This method is here for compatibility with old style arguments.
+    """
+    This method is here for compatibility with old style arguments:
     - It is possible to have the .py prefix for the test file
-    - It is possible to separate test classes with : instead of .
+
+    And, also to load ZODB Test Component before passing it to unittest
+    TestLoader().
     """
     # backward compatibility 
     if name.endswith('.py'):
       name = name[:-3]
-    name = name.replace(':', '.')
 
-    # TODO-arnau: Dirty hack to allow './runUnitTest test.erp5.testFoo'. This
-    # must be implemented properly by specifiying the bt5 *and* test name
-    if name.startswith('test.'):
-      for path in sys.path:
-        if not path.endswith('/portal_components'):
-          continue
+    if ':' in name:
+      from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+      from Products.ERP5Type.tests.ERP5TypeLiveTestCase import ERP5TypeLiveTestCase
 
-        component_module_name = name.split('.')[2]
-        component_filename = '.'.join(name.split('.', 3)[:3]) + '.py'
-        component_path = os.path.join(path, component_filename)
-        if not os.path.isfile(component_path):
-          continue
+      # TestLoader() does not perform any import so import the Module manually
+      module = __import__('erp5.component.test',
+                          fromlist=['erp5.component.test'],
+                          level=0)
 
-        with open(component_path) as component_file:
-          import imp
-          module = imp.new_module(component_module_name)
-          setattr(module,
-                  component_module_name,
-                  imp.load_module(component_module_name,
-                                  component_file,
-                                  component_filename,
-                                  ('.py', 'rb', imp.PY_SOURCE)))
+      # TODO-arnau: What about loading a test for a specific Component Version?
+      name = name.split(':')[1]
 
-          name = '.'.join(name.split('.', 3)[2:])
-          break
+      __import__('erp5.component.test.%s' % name.split('.')[0],
+                 ['erp5.component.test'],
+                 level=0)
 
     return super(ERP5TypeTestLoader, self).loadTestsFromName(name, module)
 
@@ -333,6 +324,108 @@ class ERP5TypeTestLoader(unittest.TestLoader):
       return self.suiteClass(module.test_suite())
     return super(ERP5TypeTestLoader, self).loadTestsFromModule(module)
 
+  def loadTestsFromNames(self, test_list):
+    # ZODB Test Components requires bootstrap to install BTs before running the
+    # actual test
+    test_list_len = len(test_list)
+    if test_list_len > 0 and ':' in test_list[0]:
+      # TODO-arnau: Does anyone specifies multiple test file on command line, at
+      # least test bot does not...
+      if test_list_len > 1:
+        raise NotImplementedError("Cannot specify multiple Unit Tests to run "
+                                  "with ZODB Test Components")
+
+      # Cannot be imported at top-level as importing ERP5TypeTestCase has side
+      # effects and a lot of magic has to be done before. Otherwise,
+      # getLogger('CMFActivity') was failing because no handlers were set up.
+      from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeCommandLineTestCase
+
+      class _ZodbTestComponentBootstrapOnly(ERP5TypeCommandLineTestCase):
+        """
+        Bootstrap class for ZODB Test Components which reuses as much as possible
+        code with "normal" tests as the only difference is how Business Templates are
+        installed.
+
+        With legacy tests, a test is directly loaded from the filesystem by adding BTs
+        TestTemplateItem directories to sys.path and the list of Business Templates is
+        given by its getBusinessTemplateList() method.
+
+        However, with ZODB Components, importing erp5.component.* modules and using
+        Component Versions require ERP5 site to be loaded and dependencies BTs to be
+        installed beforehand (and the entry point is thus the BT title and the test to
+        be loaded as specified on the command line (BT:TEST_NAME instead of
+        TEST_NAME)). Any other way would be adhoc and would meant having a different
+        behavior between running an Unit Test and a Live Test.
+        """
+        def __init__(self, test_list):
+          self._test_list = test_list
+          self._bt_already_installed_list = []
+
+        def getBusinessTemplateList(self):
+          """
+          Only return the Business Template specifies on the command line, its
+          dependencies will be resolved through bt5list and Template Tool
+          (dependency_list and test_dependency_list BT properties)
+          """
+          return [ test.split(':')[0] for test in self._test_list ]
+
+        @staticmethod
+        def _getBTPathAndIdList(bt_list):
+          """
+          Overriden as the original method manually checks BT URLs, handled through
+          Template Tool resolveBusinessTemplateList() methods for ZODB Components
+          """
+          return bt_list
+
+        def _installBusinessTemplateList(self,
+                                         bt_list,
+                                         update_repository_bt_list=True,
+                                         *args,
+                                         **kwargs):
+          """
+          Before installing BTs by calling the original method:
+
+          1/ Get filesystem BT repositories and set them to Template Tool
+          2/ Update BT repositories
+          3/ Resolve dependencies:
+             * dependency_list: recursive.
+             * test_dependency_list: non-recursive.
+          4/ Install BTs as before
+          """
+          template_tool = self.portal.portal_templates
+
+          from Products.ERP5.ERP5Site import getBootstrapDirectory
+          bt5_path_list = [os.environ.get('erp5_tests_bootstrap_path') or
+                           getBootstrapDirectory()]
+
+          bt5_path = os.environ.get('erp5_tests_bt5_path')
+          if bt5_path:
+            bt5_path_list.extend([ bt5_path.replace('*', '')
+                                   for bt5_path in bt5_path.split(',') ])
+          else:
+            from App.config import getConfiguration
+            instancehome = getConfiguration().instancehome
+            bt5_path_list.append(os.path.join(instancehome, 'bt5'))
+
+          bt5_path_list = [bt5_path for bt5_path in bt5_path_list
+                           if os.path.exists(bt5_path)]
+
+          template_tool.updateRepositoryBusinessTemplateList(bt5_path_list)
+
+          url_bt_tuple_list = [
+            ('%s/%s' % (repository, bt_title), bt_title) for repository, bt_title in
+            template_tool.resolveBusinessTemplateListDependency(
+              bt_list,
+              with_test_dependency_list=True)]
+
+          return super(_ZodbTestComponentBootstrapOnly,
+                       self)._installBusinessTemplateList(url_bt_tuple_list,
+                                                          *args, **kwargs)
+
+      _ZodbTestComponentBootstrapOnly(test_list).setUp()
+
+    return super(ERP5TypeTestLoader, self).loadTestsFromNames(test_list)
+
   def getTestCaseNames(self, testCaseClass):
     """Return a sorted sequence of method names found within testCaseClass
 
diff --git a/tests/__init__.py b/tests/__init__.py
index a8d7065487..15962b0fc1 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,4 +1,5 @@
-import glob, os, subprocess, re
+from glob import glob
+import os, subprocess, re
 # test_suite is provided by 'run_test_suite'
 from test_suite import ERP5TypeTestSuite
 import sys
@@ -28,11 +29,19 @@ class _ERP5(ERP5TypeTestSuite):
 
   def _getAllTestList(self):
     test_list = []
+    path = sys.path[0]
+    component_re = re.compile(".*/([^/]+)/TestTemplateItem/portal_components"
+                              "/test\.[^.]+\.([^.]+).py$")
     for test_path in (
-        glob.glob('%s/product/*/tests/test*.py' % sys.path[0]) +
-        glob.glob('%s/bt5/*/TestTemplateItem/test*.py' % sys.path[0]) +
-        glob.glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % sys.path[0])):
-      test_case = test_path.split(os.sep)[-1][:-3] # remove .py
+        glob('%s/product/*/tests/test*.py' % path) +
+        glob('%s/bt5/*/TestTemplateItem/test*.py' % path) +
+        glob('%s/bt5/*/TestTemplateItem/portal_components/test.*.test*.py' % path)):
+      component_re_match = component_re.match(test_path)
+      if component_re_match is not None:
+        test_case = "%s:%s" % (component_re_match.group(1),
+                               component_re_match.group(2))
+      else:
+        test_case = test_path.split(os.sep)[-1][:-3] # remove .py
       product = test_path.split(os.sep)[-3]
       # don't test 3rd party products
       if product in ('PortalTransforms', 'MailTemplates', 'Zelenium'):
@@ -64,35 +73,36 @@ class ERP5(_ERP5):
 
   def getTestList(self):
     test_list = []
-    for test_case in self._getAllTestList():
+    for full_test_case in self._getAllTestList():
+      test_case = (':' in full_test_case and full_test_case.split(':')[1]
+                   or full_test_case)
+
       # skip some tests
-      if ('testLive' in test_case or
-          'testVifib' in test_case or
-          test_case.find('Performance') > 0 or
-          # XXX (Ivan), until LDAP server is available this test will alway fail
-          test_case.endswith('testERP5LdapCatalog') or
-          # tests reading selenium tables from erp5.com
-          test_case.endswith('testFunctionalStandaloneUserTutorial') or
-          test_case.endswith('testFunctionalRunMyDocSample') or
-          test_case.endswith('testFunctionalConfigurator') or
-          test_case.endswith('testFunctionalConfiguratorConsulting') or
-          # not maintained
-          test_case.endswith('testERP5eGov') or
-          test_case.endswith('testAccounting_l10n_fr_m9')):
+      if test_case.startswith('testLive') or test_case.startswith('testVifib') \
+         or test_case.find('Performance') > 0 \
+         or test_case in ('testERP5LdapCatalog', # XXX (Ivan), until LDAP server is available this test will alway fail
+                          # tests reading selenium tables from erp5.com
+                          'testFunctionalStandaloneUserTutorial',
+                          'testFunctionalRunMyDocSample',
+                          'testFunctionalConfigurator',
+                          'testFunctionalConfiguratorConsulting',
+                          # not maintained
+                          'testERP5eGov',
+                          'testAccounting_l10n_fr_m9'):
         continue
-      test_list.append(test_case)
+      test_list.append(full_test_case)
     return test_list
 
-  def run(self, test):
-    if (test.endswith('testConflictResolution') or
-        test.endswith('testInvalidationBug')):
-      status_dict = self.runUnitTest('--save', test)
+  def run(self, full_test):
+    test = ':' in full_test and full_test.split(':')[1] or full_test
+    if test in ('testConflictResolution', 'testInvalidationBug'):
+      status_dict = self.runUnitTest('--save', full_test)
       if not status_dict['status_code']:
-        status_dict = self.runUnitTest('--load', '--activity_node=2', test)
+        status_dict = self.runUnitTest('--load', '--activity_node=2', full_test)
       return status_dict
     if test.startswith('testFunctional'):
-      return self._updateFunctionalTestResponse(self.runUnitTest(test))
-    return super(ERP5, self).run(test)
+      return self._updateFunctionalTestResponse(self.runUnitTest(full_test))
+    return super(ERP5, self).run(full_test)
 
   def _updateFunctionalTestResponse(self, status_dict):
     """ Convert the Unit Test output into more accurate information
-- 
2.30.9