You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by du...@apache.org on 2024/08/02 06:54:13 UTC

(shardingsphere) branch master updated: Refactor E2E environment setup code. (#32355)

This is an automated email from the ASF dual-hosted git repository.

duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 232bd7ac131 Refactor E2E environment setup code. (#32355)
232bd7ac131 is described below

commit 232bd7ac131e3557302b889335aa1a5e802e198f
Author: Cong Hu <ia...@gmail.com>
AuthorDate: Fri Aug 2 14:54:06 2024 +0800

    Refactor E2E environment setup code. (#32355)
---
 .../{SingleE2EContext.java => E2ETestContext.java} |   6 +-
 .../test/e2e/engine/type/DALE2EIT.java             |  54 +++---
 .../test/e2e/engine/type/DCLE2EIT.java             |  52 +++---
 .../test/e2e/engine/type/DDLE2EIT.java             | 122 ++++++-------
 .../test/e2e/engine/type/RALE2EIT.java             |  90 +++++-----
 .../test/e2e/engine/type/RDLE2EIT.java             |  82 ++++-----
 .../test/e2e/engine/type/RQLE2EIT.java             |  42 +++--
 .../e2e/engine/type/dml/AdditionalDMLE2EIT.java    | 191 ++++++++++-----------
 .../test/e2e/engine/type/dml/BaseDMLE2EIT.java     |  52 +++---
 .../test/e2e/engine/type/dml/BatchDMLE2EIT.java    |  17 +-
 .../test/e2e/engine/type/dml/GeneralDMLE2EIT.java  |  61 +++----
 .../e2e/engine/type/dql/AdditionalDQLE2EIT.java    | 120 ++++++-------
 .../test/e2e/engine/type/dql/BaseDQLE2EIT.java     |  49 +++---
 .../test/e2e/engine/type/dql/GeneralDQLE2EIT.java  | 102 +++++------
 .../test/e2e/env/E2EEnvironmentAware.java          |  31 ++++
 .../E2EEnvironmentEngine.java}                     |  10 +-
 .../test/e2e/env/E2EEnvironmentSetupProcessor.java |  80 +++++++++
 17 files changed, 624 insertions(+), 537 deletions(-)

diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/context/SingleE2EContext.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/context/E2ETestContext.java
similarity index 94%
rename from test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/context/SingleE2EContext.java
rename to test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/context/E2ETestContext.java
index 869a09409c7..9baa80bce80 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/context/SingleE2EContext.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/context/E2ETestContext.java
@@ -30,7 +30,9 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 @Getter
-public class SingleE2EContext {
+public class E2ETestContext {
+    
+    public static final String NOT_VERIFY_FLAG = "NOT_VERIFY";
     
     private final String sql;
     
@@ -40,7 +42,7 @@ public class SingleE2EContext {
     
     private final DataSet dataSet;
     
-    public SingleE2EContext(final AssertionTestParameter testParam) {
+    public E2ETestContext(final AssertionTestParameter testParam) {
         sql = testParam.getTestCaseContext().getTestCase().getSql();
         sqlExecuteType = testParam.getSqlExecuteType();
         assertion = testParam.getAssertion();
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DALE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DALE2EIT.java
index df611de5395..b6eb8ed5058 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DALE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DALE2EIT.java
@@ -18,18 +18,17 @@
 package org.apache.shardingsphere.test.e2e.engine.type;
 
 import org.apache.shardingsphere.infra.util.datetime.DateTimeFormatterFactory;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -49,7 +48,14 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @E2ETestCaseSettings(SQLCommandType.DAL)
-class DALE2EIT {
+class DALE2EIT implements E2EEnvironmentAware {
+    
+    private E2EEnvironmentEngine environmentSetupEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentSetupEngine = environmentEngine;
+    }
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
@@ -59,42 +65,40 @@ class DALE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        assertExecute(containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        assertExecute(context);
     }
     
-    private void assertExecute(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
+    private void assertExecute(final E2ETestContext context) throws SQLException {
+        try (Connection connection = this.environmentSetupEngine.getTargetDataSource().getConnection()) {
             try (Statement statement = connection.createStatement()) {
-                statement.execute(singleE2EContext.getSQL());
-                assertExecuteResult(singleE2EContext, statement);
+                statement.execute(context.getSQL());
+                assertExecuteResult(context, statement);
             }
         }
     }
     
-    private void assertExecuteResult(final SingleE2EContext singleE2EContext, final Statement statement) throws SQLException {
+    private void assertExecuteResult(final E2ETestContext context, final Statement statement) throws SQLException {
         try (ResultSet resultSet = statement.getResultSet()) {
-            if (null == singleE2EContext.getAssertion().getAssertionSQL()) {
-                assertResultSet(singleE2EContext, resultSet);
+            if (null == context.getAssertion().getAssertionSQL()) {
+                assertResultSet(context, resultSet);
             } else {
-                statement.execute(singleE2EContext.getAssertion().getAssertionSQL().getSql());
+                statement.execute(context.getAssertion().getAssertionSQL().getSql());
                 try (ResultSet assertionSQLResultSet = statement.getResultSet()) {
-                    assertResultSet(singleE2EContext, assertionSQLResultSet);
+                    assertResultSet(context, assertionSQLResultSet);
                 }
             }
         }
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final ResultSet resultSet) throws SQLException {
-        assertMetaData(resultSet.getMetaData(), getExpectedColumns(singleE2EContext));
-        assertRows(resultSet, singleE2EContext.getDataSet().getRows());
+    private void assertResultSet(final E2ETestContext context, final ResultSet resultSet) throws SQLException {
+        assertMetaData(resultSet.getMetaData(), getExpectedColumns(context));
+        assertRows(resultSet, context.getDataSet().getRows());
     }
     
-    private Collection<DataSetColumn> getExpectedColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<DataSetColumn> getExpectedColumns(final E2ETestContext context) {
         Collection<DataSetColumn> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns());
         }
         return result;
@@ -133,7 +137,7 @@ class DALE2EIT {
     }
     
     private void assertDateValue(final ResultSet actual, final int columnIndex, final String columnLabel, final String expected) throws SQLException {
-        if (E2EContainerComposer.NOT_VERIFY_FLAG.equals(expected)) {
+        if (E2ETestContext.NOT_VERIFY_FLAG.equals(expected)) {
             return;
         }
         assertThat(DateTimeFormatterFactory.getTimeFormatter().format(actual.getDate(columnIndex).toLocalDate()), is(expected));
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DCLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DCLE2EIT.java
index bc92a33e460..776b6ff3f70 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DCLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DCLE2EIT.java
@@ -17,18 +17,17 @@
 
 package org.apache.shardingsphere.test.e2e.engine.type;
 
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.authority.AuthorityEnvironmentManager;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioCommonPath;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -41,7 +40,14 @@ import java.sql.SQLException;
 import java.sql.Statement;
 
 @E2ETestCaseSettings(SQLCommandType.DCL)
-class DCLE2EIT {
+class DCLE2EIT implements E2EEnvironmentAware {
+    
+    private E2EEnvironmentEngine environmentSetupEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentSetupEngine = environmentEngine;
+    }
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
@@ -51,20 +57,18 @@ class DCLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
+        E2ETestContext context = new E2ETestContext(testParam);
         try (
                 AuthorityEnvironmentManager ignored = new AuthorityEnvironmentManager(
-                        new ScenarioCommonPath(testParam.getScenario()).getAuthorityFile(), containerComposer.getActualDataSourceMap(), testParam.getDatabaseType())) {
-            assertExecuteUpdate(containerComposer, singleE2EContext);
+                        new ScenarioCommonPath(testParam.getScenario()).getAuthorityFile(), environmentSetupEngine.getActualDataSourceMap(), testParam.getDatabaseType())) {
+            assertExecuteUpdate(context);
         }
     }
     
-    private void assertExecuteUpdate(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        String sql = singleE2EContext.getSQL();
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
+    private void assertExecuteUpdate(final E2ETestContext context) throws SQLException {
+        String sql = context.getSQL();
+        try (Connection connection = this.environmentSetupEngine.getTargetDataSource().getConnection()) {
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
                 try (Statement statement = connection.createStatement()) {
                     statement.executeUpdate(sql);
                 }
@@ -84,20 +88,18 @@ class DCLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
+        E2ETestContext context = new E2ETestContext(testParam);
         try (
                 AuthorityEnvironmentManager ignored = new AuthorityEnvironmentManager(
-                        new ScenarioCommonPath(testParam.getScenario()).getAuthorityFile(), containerComposer.getActualDataSourceMap(), testParam.getDatabaseType())) {
-            assertExecute(containerComposer, singleE2EContext);
+                        new ScenarioCommonPath(testParam.getScenario()).getAuthorityFile(), environmentSetupEngine.getActualDataSourceMap(), testParam.getDatabaseType())) {
+            assertExecute(context);
         }
     }
     
-    private void assertExecute(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        String sql = singleE2EContext.getSQL();
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
+    private void assertExecute(final E2ETestContext context) throws SQLException {
+        String sql = context.getSQL();
+        try (Connection connection = environmentSetupEngine.getTargetDataSource().getConnection()) {
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
                 try (Statement statement = connection.createStatement()) {
                     statement.execute(sql);
                 }
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DDLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DDLE2EIT.java
index fd3f12e52d4..73fa7225960 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DDLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/DDLE2EIT.java
@@ -20,19 +20,18 @@ package org.apache.shardingsphere.test.e2e.engine.type;
 import com.google.common.base.Splitter;
 import org.apache.shardingsphere.infra.datanode.DataNode;
 import org.apache.shardingsphere.infra.expr.core.InlineExpressionParserFactory;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetIndex;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -58,7 +57,14 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 @E2ETestCaseSettings(SQLCommandType.DDL)
-class DDLE2EIT {
+class DDLE2EIT implements E2EEnvironmentAware {
+    
+    private E2EEnvironmentEngine environmentEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentEngine = environmentEngine;
+    }
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
@@ -68,30 +74,28 @@ class DDLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(containerComposer, singleE2EContext);
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
-                executeUpdateForStatement(singleE2EContext, connection);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(context);
+        try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
+                executeUpdateForStatement(context, connection);
             } else {
-                executeUpdateForPreparedStatement(singleE2EContext, connection);
+                executeUpdateForPreparedStatement(context, connection);
             }
-            assertTableMetaData(testParam, containerComposer, singleE2EContext);
+            assertTableMetaData(testParam, context);
         }
-        tearDown(containerComposer, singleE2EContext);
+        tearDown(context);
     }
     
-    private void executeUpdateForStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private void executeUpdateForStatement(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.executeUpdate(singleE2EContext.getSQL()) > 0, "Not a DDL statement.");
+            assertFalse(statement.executeUpdate(context.getSQL()) > 0, "Not a DDL statement.");
         }
         waitCompleted();
     }
     
-    private void executeUpdateForPreparedStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL())) {
+    private void executeUpdateForPreparedStatement(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL())) {
             assertFalse(preparedStatement.executeUpdate() > 0, "Not a DDL statement.");
         }
         waitCompleted();
@@ -105,48 +109,46 @@ class DDLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(containerComposer, singleE2EContext);
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
-                executeForStatement(singleE2EContext, connection);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(context);
+        try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
+                executeForStatement(context, connection);
             } else {
-                executeForPreparedStatement(singleE2EContext, connection);
+                executeForPreparedStatement(context, connection);
             }
-            assertTableMetaData(testParam, containerComposer, singleE2EContext);
+            assertTableMetaData(testParam, context);
         }
-        tearDown(containerComposer, singleE2EContext);
+        tearDown(context);
     }
     
-    private void executeForStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private void executeForStatement(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.execute(singleE2EContext.getSQL()), "Not a DDL statement.");
+            assertFalse(statement.execute(context.getSQL()), "Not a DDL statement.");
         }
         waitCompleted();
     }
     
-    private void executeForPreparedStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL())) {
+    private void executeForPreparedStatement(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL())) {
             assertFalse(preparedStatement.execute(), "Not a DDL statement.");
         }
         waitCompleted();
     }
     
-    private void init(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        assertNotNull(singleE2EContext.getAssertion().getInitialSQL(), "Init SQL is required");
-        assertNotNull(singleE2EContext.getAssertion().getInitialSQL().getAffectedTable(), "Expected affected table is required");
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            executeInitSQLs(singleE2EContext, connection);
+    private void init(final E2ETestContext context) throws SQLException {
+        assertNotNull(context.getAssertion().getInitialSQL(), "Init SQL is required");
+        assertNotNull(context.getAssertion().getInitialSQL().getAffectedTable(), "Expected affected table is required");
+        try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
+            executeInitSQLs(context, connection);
         }
     }
     
-    private void executeInitSQLs(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getInitialSQL().getSql()) {
+    private void executeInitSQLs(final E2ETestContext context, final Connection connection) throws SQLException {
+        if (null == context.getAssertion().getInitialSQL().getSql()) {
             return;
         }
-        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(singleE2EContext.getAssertion().getInitialSQL().getSql())) {
+        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(context.getAssertion().getInitialSQL().getSql())) {
             try (PreparedStatement preparedStatement = connection.prepareStatement(each)) {
                 preparedStatement.executeUpdate();
             }
@@ -154,19 +156,19 @@ class DDLE2EIT {
         }
     }
     
-    private void tearDown(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        if (null != singleE2EContext.getAssertion().getDestroySQL()) {
-            try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-                executeDestroySQLs(singleE2EContext, connection);
+    private void tearDown(final E2ETestContext context) throws SQLException {
+        if (null != context.getAssertion().getDestroySQL()) {
+            try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
+                executeDestroySQLs(context, connection);
             }
         }
     }
     
-    private void executeDestroySQLs(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getDestroySQL().getSql()) {
+    private void executeDestroySQLs(final E2ETestContext context, final Connection connection) throws SQLException {
+        if (null == context.getAssertion().getDestroySQL().getSql()) {
             return;
         }
-        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(singleE2EContext.getAssertion().getDestroySQL().getSql())) {
+        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(context.getAssertion().getDestroySQL().getSql())) {
             try (PreparedStatement preparedStatement = connection.prepareStatement(each)) {
                 preparedStatement.executeUpdate();
             }
@@ -174,15 +176,15 @@ class DDLE2EIT {
         }
     }
     
-    private void assertTableMetaData(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        String tableName = singleE2EContext.getAssertion().getInitialSQL().getAffectedTable();
-        DataSetMetaData expected = singleE2EContext.getDataSet().findMetaData(tableName);
+    private void assertTableMetaData(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
+        String tableName = context.getAssertion().getInitialSQL().getAffectedTable();
+        DataSetMetaData expected = context.getDataSet().findMetaData(tableName);
         Collection<DataNode> dataNodes = InlineExpressionParserFactory.newInstance(expected.getDataNodes()).splitAndEvaluate().stream().map(DataNode::new).collect(Collectors.toList());
         if (expected.getColumns().isEmpty()) {
-            assertNotContainsTable(containerComposer, dataNodes);
+            assertNotContainsTable(environmentEngine, dataNodes);
             return;
         }
-        assertTableMetaData(testParam, getActualColumns(containerComposer, dataNodes), getActualIndexes(containerComposer, dataNodes), expected);
+        assertTableMetaData(testParam, getActualColumns(dataNodes), getActualIndexes(dataNodes), expected);
     }
     
     private void assertTableMetaData(final AssertionTestParameter testParam, final List<DataSetColumn> actualColumns, final List<DataSetIndex> actualIndexes, final DataSetMetaData expected) {
@@ -190,7 +192,7 @@ class DDLE2EIT {
         assertIndexMetaData(actualIndexes, expected.getIndexes());
     }
     
-    private void assertNotContainsTable(final E2EContainerComposer containerComposer, final Collection<DataNode> dataNodes) throws SQLException {
+    private void assertNotContainsTable(final E2EEnvironmentEngine containerComposer, final Collection<DataNode> dataNodes) throws SQLException {
         for (DataNode each : dataNodes) {
             try (Connection connection = containerComposer.getActualDataSourceMap().get(each.getDataSourceName()).getConnection()) {
                 assertNotContainsTable(connection, each.getTableName());
@@ -202,10 +204,10 @@ class DDLE2EIT {
         assertFalse(connection.getMetaData().getTables(null, null, tableName, new String[]{"TABLE"}).next(), String.format("Table `%s` should not existed", tableName));
     }
     
-    private List<DataSetColumn> getActualColumns(final E2EContainerComposer containerComposer, final Collection<DataNode> dataNodes) throws SQLException {
+    private List<DataSetColumn> getActualColumns(final Collection<DataNode> dataNodes) throws SQLException {
         Set<DataSetColumn> result = new LinkedHashSet<>();
         for (DataNode each : dataNodes) {
-            try (Connection connection = containerComposer.getActualDataSourceMap().get(each.getDataSourceName()).getConnection()) {
+            try (Connection connection = environmentEngine.getActualDataSourceMap().get(each.getDataSourceName()).getConnection()) {
                 result.addAll(getActualColumns(connection, each.getTableName()));
             }
         }
@@ -227,10 +229,10 @@ class DDLE2EIT {
         }
     }
     
-    private List<DataSetIndex> getActualIndexes(final E2EContainerComposer containerComposer, final Collection<DataNode> dataNodes) throws SQLException {
+    private List<DataSetIndex> getActualIndexes(final Collection<DataNode> dataNodes) throws SQLException {
         Set<DataSetIndex> result = new LinkedHashSet<>();
         for (DataNode each : dataNodes) {
-            try (Connection connection = containerComposer.getActualDataSourceMap().get(each.getDataSourceName()).getConnection()) {
+            try (Connection connection = environmentEngine.getActualDataSourceMap().get(each.getDataSourceName()).getConnection()) {
                 result.addAll(getActualIndexes(connection, each.getTableName()));
             }
         }
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RALE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RALE2EIT.java
index 4490fe970e2..11326403aac 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RALE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RALE2EIT.java
@@ -18,18 +18,17 @@
 package org.apache.shardingsphere.test.e2e.engine.type;
 
 import com.google.common.base.Splitter;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -52,7 +51,14 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @E2ETestCaseSettings(SQLCommandType.RAL)
-class RALE2EIT {
+class RALE2EIT implements E2EEnvironmentAware {
+    
+    private E2EEnvironmentEngine environmentEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentEngine = environmentEngine;
+    }
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
@@ -62,35 +68,33 @@ class RALE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(containerComposer, singleE2EContext);
-        assertExecute(containerComposer, singleE2EContext);
-        tearDown(containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(context);
+        assertExecute(context);
+        tearDown(context);
     }
     
-    private void assertExecute(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
+    private void assertExecute(final E2ETestContext context) throws SQLException {
+        try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
             try (Statement statement = connection.createStatement()) {
-                assertResultSet(singleE2EContext, statement);
+                assertResultSet(context, statement);
             }
         }
     }
     
-    private void init(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        if (null != singleE2EContext.getAssertion().getInitialSQL()) {
-            try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-                executeInitSQLs(singleE2EContext, connection);
+    private void init(final E2ETestContext context) throws SQLException {
+        if (null != context.getAssertion().getInitialSQL()) {
+            try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
+                executeInitSQLs(context, connection);
             }
         }
     }
     
-    private void executeInitSQLs(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getInitialSQL().getSql()) {
+    private void executeInitSQLs(final E2ETestContext context, final Connection connection) throws SQLException {
+        if (null == context.getAssertion().getInitialSQL().getSql()) {
             return;
         }
-        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(singleE2EContext.getAssertion().getInitialSQL().getSql())) {
+        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(context.getAssertion().getInitialSQL().getSql())) {
             try (PreparedStatement preparedStatement = connection.prepareStatement(each)) {
                 preparedStatement.executeUpdate();
             }
@@ -98,19 +102,19 @@ class RALE2EIT {
         Awaitility.await().pollDelay(1L, TimeUnit.SECONDS).until(() -> true);
     }
     
-    private void tearDown(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        if (null != singleE2EContext.getAssertion().getDestroySQL()) {
-            try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-                executeDestroySQLs(singleE2EContext, connection);
+    private void tearDown(final E2ETestContext context) throws SQLException {
+        if (null != context.getAssertion().getDestroySQL()) {
+            try (Connection connection = environmentEngine.getTargetDataSource().getConnection()) {
+                executeDestroySQLs(context, connection);
             }
         }
     }
     
-    private void executeDestroySQLs(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getDestroySQL().getSql()) {
+    private void executeDestroySQLs(final E2ETestContext context, final Connection connection) throws SQLException {
+        if (null == context.getAssertion().getDestroySQL().getSql()) {
             return;
         }
-        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(singleE2EContext.getAssertion().getDestroySQL().getSql())) {
+        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(context.getAssertion().getDestroySQL().getSql())) {
             try (PreparedStatement preparedStatement = connection.prepareStatement(each)) {
                 preparedStatement.executeUpdate();
             }
@@ -118,39 +122,39 @@ class RALE2EIT {
         Awaitility.await().pollDelay(1L, TimeUnit.SECONDS).until(() -> true);
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final Statement statement) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getAssertionSQL()) {
-            assertResultSet(singleE2EContext, statement, singleE2EContext.getSQL());
+    private void assertResultSet(final E2ETestContext context, final Statement statement) throws SQLException {
+        if (null == context.getAssertion().getAssertionSQL()) {
+            assertResultSet(context, statement, context.getSQL());
         } else {
-            statement.execute(singleE2EContext.getSQL());
+            statement.execute(context.getSQL());
             Awaitility.await().pollDelay(2L, TimeUnit.SECONDS).until(() -> true);
-            assertResultSet(singleE2EContext, statement, singleE2EContext.getAssertion().getAssertionSQL().getSql());
+            assertResultSet(context, statement, context.getAssertion().getAssertionSQL().getSql());
         }
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final Statement statement, final String sql) throws SQLException {
+    private void assertResultSet(final E2ETestContext context, final Statement statement, final String sql) throws SQLException {
         statement.execute(sql);
         try (ResultSet resultSet = statement.getResultSet()) {
-            assertResultSet(singleE2EContext, resultSet);
+            assertResultSet(context, resultSet);
         }
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final ResultSet resultSet) throws SQLException {
-        assertMetaData(resultSet.getMetaData(), getExpectedColumns(singleE2EContext));
-        assertRows(resultSet, getIgnoreAssertColumns(singleE2EContext), singleE2EContext.getDataSet().getRows());
+    private void assertResultSet(final E2ETestContext context, final ResultSet resultSet) throws SQLException {
+        assertMetaData(resultSet.getMetaData(), getExpectedColumns(context));
+        assertRows(resultSet, getIgnoreAssertColumns(context), context.getDataSet().getRows());
     }
     
-    private Collection<DataSetColumn> getExpectedColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<DataSetColumn> getExpectedColumns(final E2ETestContext context) {
         Collection<DataSetColumn> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns());
         }
         return result;
     }
     
-    private Collection<String> getIgnoreAssertColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<String> getIgnoreAssertColumns(final E2ETestContext context) {
         Collection<String> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns().stream().filter(DataSetColumn::isIgnoreAssertData).map(DataSetColumn::getName).collect(Collectors.toList()));
         }
         return result;
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RDLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RDLE2EIT.java
index d8a83a15b0d..81764a29165 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RDLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RDLE2EIT.java
@@ -18,18 +18,17 @@
 package org.apache.shardingsphere.test.e2e.engine.type;
 
 import com.google.common.base.Splitter;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -52,7 +51,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @E2ETestCaseSettings(SQLCommandType.RDL)
-class RDLE2EIT {
+class RDLE2EIT implements E2EEnvironmentAware {
+    
+    private E2EEnvironmentEngine environmentSetupEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentSetupEngine = environmentEngine;
+    }
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
@@ -62,49 +68,47 @@ class RDLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(containerComposer, singleE2EContext);
-        assertExecute(testParam, containerComposer, singleE2EContext);
-        tearDown(containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(context);
+        assertExecute(testParam, context);
+        tearDown(context);
     }
     
-    private void assertExecute(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecute(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         assertNotNull(testParam.getAssertion().getAssertionSQL(), "Assertion SQL is required");
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
+        try (Connection connection = environmentSetupEngine.getTargetDataSource().getConnection()) {
             try (Statement statement = connection.createStatement()) {
-                executeSQLCase(singleE2EContext, statement);
+                executeSQLCase(context, statement);
                 Awaitility.await().pollDelay(2L, TimeUnit.SECONDS).until(() -> true);
-                assertResultSet(singleE2EContext, statement);
+                assertResultSet(context, statement);
             }
         }
     }
     
-    private void executeSQLCase(final SingleE2EContext singleE2EContext, final Statement statement) throws SQLException {
-        statement.execute(singleE2EContext.getSQL());
+    private void executeSQLCase(final E2ETestContext context, final Statement statement) throws SQLException {
+        statement.execute(context.getSQL());
     }
     
-    private void init(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            executeInitSQLs(singleE2EContext, connection);
+    private void init(final E2ETestContext context) throws SQLException {
+        try (Connection connection = environmentSetupEngine.getTargetDataSource().getConnection()) {
+            executeInitSQLs(context, connection);
         }
     }
     
-    private void tearDown(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
-        if (null != singleE2EContext.getAssertion().getDestroySQL()) {
-            try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-                executeDestroySQLs(singleE2EContext, connection);
+    private void tearDown(final E2ETestContext context) throws SQLException {
+        if (null != context.getAssertion().getDestroySQL()) {
+            try (Connection connection = environmentSetupEngine.getTargetDataSource().getConnection()) {
+                executeDestroySQLs(context, connection);
             }
         }
         Awaitility.await().pollDelay(2L, TimeUnit.SECONDS).until(() -> true);
     }
     
-    private void executeInitSQLs(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getInitialSQL() || null == singleE2EContext.getAssertion().getInitialSQL().getSql()) {
+    private void executeInitSQLs(final E2ETestContext context, final Connection connection) throws SQLException {
+        if (null == context.getAssertion().getInitialSQL() || null == context.getAssertion().getInitialSQL().getSql()) {
             return;
         }
-        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(singleE2EContext.getAssertion().getInitialSQL().getSql())) {
+        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(context.getAssertion().getInitialSQL().getSql())) {
             try (PreparedStatement preparedStatement = connection.prepareStatement(each)) {
                 preparedStatement.executeUpdate();
                 Awaitility.await().pollDelay(2L, TimeUnit.SECONDS).until(() -> true);
@@ -112,11 +116,11 @@ class RDLE2EIT {
         }
     }
     
-    private void executeDestroySQLs(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        if (null == singleE2EContext.getAssertion().getDestroySQL().getSql()) {
+    private void executeDestroySQLs(final E2ETestContext context, final Connection connection) throws SQLException {
+        if (null == context.getAssertion().getDestroySQL().getSql()) {
             return;
         }
-        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(singleE2EContext.getAssertion().getDestroySQL().getSql())) {
+        for (String each : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(context.getAssertion().getDestroySQL().getSql())) {
             try (PreparedStatement preparedStatement = connection.prepareStatement(each)) {
                 preparedStatement.executeUpdate();
                 Awaitility.await().pollDelay(2L, TimeUnit.SECONDS).until(() -> true);
@@ -124,20 +128,20 @@ class RDLE2EIT {
         }
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final Statement statement) throws SQLException {
-        try (ResultSet resultSet = statement.executeQuery(singleE2EContext.getAssertion().getAssertionSQL().getSql())) {
-            assertResultSet(singleE2EContext, resultSet);
+    private void assertResultSet(final E2ETestContext context, final Statement statement) throws SQLException {
+        try (ResultSet resultSet = statement.executeQuery(context.getAssertion().getAssertionSQL().getSql())) {
+            assertResultSet(context, resultSet);
         }
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final ResultSet resultSet) throws SQLException {
-        assertMetaData(resultSet.getMetaData(), getExpectedColumns(singleE2EContext));
-        assertRows(resultSet, singleE2EContext.getDataSet().getRows());
+    private void assertResultSet(final E2ETestContext context, final ResultSet resultSet) throws SQLException {
+        assertMetaData(resultSet.getMetaData(), getExpectedColumns(context));
+        assertRows(resultSet, context.getDataSet().getRows());
     }
     
-    private Collection<DataSetColumn> getExpectedColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<DataSetColumn> getExpectedColumns(final E2ETestContext context) {
         Collection<DataSetColumn> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns());
         }
         return result;
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RQLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RQLE2EIT.java
index a99a5b7b111..859ea6a792a 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RQLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/RQLE2EIT.java
@@ -17,18 +17,17 @@
 
 package org.apache.shardingsphere.test.e2e.engine.type;
 
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -47,7 +46,14 @@ import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @E2ETestCaseSettings(SQLCommandType.RQL)
-class RQLE2EIT {
+class RQLE2EIT implements E2EEnvironmentAware {
+    
+    private E2EEnvironmentEngine environmentSetupEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentSetupEngine = environmentEngine;
+    }
     
     @ParameterizedTest(name = "{0}")
     @EnabledIf("isEnabled")
@@ -57,31 +63,29 @@ class RQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        assertExecute(containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        assertExecute(context);
     }
     
-    private void assertExecute(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecute(final E2ETestContext context) throws SQLException {
         try (
-                Connection connection = containerComposer.getTargetDataSource().getConnection();
+                Connection connection = environmentSetupEngine.getTargetDataSource().getConnection();
                 Statement statement = connection.createStatement()) {
-            statement.execute(singleE2EContext.getSQL());
+            statement.execute(context.getSQL());
             try (ResultSet resultSet = statement.getResultSet()) {
-                assertResultSet(singleE2EContext, resultSet);
+                assertResultSet(context, resultSet);
             }
         }
     }
     
-    private void assertResultSet(final SingleE2EContext singleE2EContext, final ResultSet resultSet) throws SQLException {
-        assertMetaData(resultSet.getMetaData(), getExpectedColumns(singleE2EContext));
-        assertRows(resultSet, singleE2EContext.getDataSet().getRows());
+    private void assertResultSet(final E2ETestContext context, final ResultSet resultSet) throws SQLException {
+        assertMetaData(resultSet.getMetaData(), getExpectedColumns(context));
+        assertRows(resultSet, context.getDataSet().getRows());
     }
     
-    private Collection<DataSetColumn> getExpectedColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<DataSetColumn> getExpectedColumns(final E2ETestContext context) {
         Collection<DataSetColumn> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns());
         }
         return result;
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/AdditionalDMLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/AdditionalDMLE2EIT.java
index 06d2312849a..6d4ed1b313a 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/AdditionalDMLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/AdditionalDMLE2EIT.java
@@ -17,18 +17,15 @@
 
 package org.apache.shardingsphere.test.e2e.engine.type.dml;
 
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.env.runtime.E2ETestEnvironment;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -57,17 +54,15 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType()) || isOracleInsertStatement(testParam.getDatabaseType().getType(), testParam.getTestCaseContext().getTestCase().getSql())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeUpdateForStatementWithAutoGeneratedKeys(testParam, singleE2EContext, connection)
-                    : executeUpdateForPreparedStatementWithAutoGeneratedKeys(testParam, singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeUpdateForStatementWithAutoGeneratedKeys(testParam, context, connection)
+                    : executeUpdateForPreparedStatementWithAutoGeneratedKeys(testParam, context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
     // TODO support oracle insert statement return auto generated keys
@@ -80,18 +75,18 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
     }
     
     private int executeUpdateForStatementWithAutoGeneratedKeys(final AssertionTestParameter testParam,
-                                                               final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+                                                               final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            int result = statement.executeUpdate(singleE2EContext.getSQL(), Statement.RETURN_GENERATED_KEYS);
+            int result = statement.executeUpdate(context.getSQL(), Statement.RETURN_GENERATED_KEYS);
             assertGeneratedKeys(testParam, statement.getGeneratedKeys(), testParam.getDatabaseType());
             return result;
         }
     }
     
     private int executeUpdateForPreparedStatementWithAutoGeneratedKeys(final AssertionTestParameter testParam,
-                                                                       final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), Statement.RETURN_GENERATED_KEYS)) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+                                                                       final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), Statement.RETURN_GENERATED_KEYS)) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             int result = preparedStatement.executeUpdate();
@@ -109,28 +104,26 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeUpdateForStatementWithColumnIndexes(singleE2EContext, connection)
-                    : executeUpdateForPreparedStatementWithColumnIndexes(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeUpdateForStatementWithColumnIndexes(context, connection)
+                    : executeUpdateForPreparedStatementWithColumnIndexes(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeUpdateForStatementWithColumnIndexes(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeUpdateForStatementWithColumnIndexes(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            return statement.executeUpdate(singleE2EContext.getSQL(), new int[]{1});
+            return statement.executeUpdate(context.getSQL(), new int[]{1});
         }
     }
     
-    private int executeUpdateForPreparedStatementWithColumnIndexes(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), new int[]{1})) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeUpdateForPreparedStatementWithColumnIndexes(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), new int[]{1})) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             return preparedStatement.executeUpdate();
@@ -146,28 +139,26 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeUpdateForStatementWithColumnNames(singleE2EContext, connection)
-                    : executeUpdateForPreparedStatementWithColumnNames(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeUpdateForStatementWithColumnNames(context, connection)
+                    : executeUpdateForPreparedStatementWithColumnNames(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeUpdateForStatementWithColumnNames(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeUpdateForStatementWithColumnNames(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            return statement.executeUpdate(singleE2EContext.getSQL());
+            return statement.executeUpdate(context.getSQL());
         }
     }
     
-    private int executeUpdateForPreparedStatementWithColumnNames(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), new String[]{"TODO"})) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeUpdateForPreparedStatementWithColumnNames(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), new String[]{"TODO"})) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             return preparedStatement.executeUpdate();
@@ -185,29 +176,27 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeForStatementWithoutAutoGeneratedKeys(singleE2EContext, connection)
-                    : executeForPreparedStatementWithoutAutoGeneratedKeys(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeForStatementWithoutAutoGeneratedKeys(context, connection)
+                    : executeForPreparedStatementWithoutAutoGeneratedKeys(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeForStatementWithoutAutoGeneratedKeys(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeForStatementWithoutAutoGeneratedKeys(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.execute(singleE2EContext.getSQL(), Statement.NO_GENERATED_KEYS), "Not a DML statement.");
+            assertFalse(statement.execute(context.getSQL(), Statement.NO_GENERATED_KEYS), "Not a DML statement.");
             return statement.getUpdateCount();
         }
     }
     
-    private int executeForPreparedStatementWithoutAutoGeneratedKeys(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), Statement.NO_GENERATED_KEYS)) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeForPreparedStatementWithoutAutoGeneratedKeys(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), Statement.NO_GENERATED_KEYS)) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             assertFalse(preparedStatement.execute(), "Not a DML statement.");
@@ -226,32 +215,30 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType()) || isOracleInsertStatement(testParam.getDatabaseType().getType(), testParam.getTestCaseContext().getTestCase().getSql())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeForStatementWithAutoGeneratedKeys(testParam, singleE2EContext, connection)
-                    : executeForPreparedStatementWithAutoGeneratedKeys(testParam, singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeForStatementWithAutoGeneratedKeys(testParam, context, connection)
+                    : executeForPreparedStatementWithAutoGeneratedKeys(testParam, context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
     private int executeForStatementWithAutoGeneratedKeys(final AssertionTestParameter testParam,
-                                                         final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+                                                         final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.execute(singleE2EContext.getSQL(), Statement.RETURN_GENERATED_KEYS), "Not a DML statement.");
+            assertFalse(statement.execute(context.getSQL(), Statement.RETURN_GENERATED_KEYS), "Not a DML statement.");
             assertGeneratedKeys(testParam, statement.getGeneratedKeys(), testParam.getDatabaseType());
             return statement.getUpdateCount();
         }
     }
     
     private int executeForPreparedStatementWithAutoGeneratedKeys(final AssertionTestParameter testParam,
-                                                                 final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), Statement.RETURN_GENERATED_KEYS)) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+                                                                 final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), Statement.RETURN_GENERATED_KEYS)) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             assertFalse(preparedStatement.execute(), "Not a DML statement.");
@@ -269,29 +256,27 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeForStatementWithColumnIndexes(singleE2EContext, connection)
-                    : executeForPreparedStatementWithColumnIndexes(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeForStatementWithColumnIndexes(context, connection)
+                    : executeForPreparedStatementWithColumnIndexes(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeForStatementWithColumnIndexes(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeForStatementWithColumnIndexes(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.execute(singleE2EContext.getSQL(), new int[]{1}), "Not a DML statement.");
+            assertFalse(statement.execute(context.getSQL(), new int[]{1}), "Not a DML statement.");
             return statement.getUpdateCount();
         }
     }
     
-    private int executeForPreparedStatementWithColumnIndexes(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), new int[]{1})) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeForPreparedStatementWithColumnIndexes(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), new int[]{1})) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             assertFalse(preparedStatement.execute(), "Not a DML statement.");
@@ -308,29 +293,27 @@ class AdditionalDMLE2EIT extends BaseDMLE2EIT {
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeForStatementWithColumnNames(singleE2EContext, connection)
-                    : executeForPreparedStatementWithColumnNames(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeForStatementWithColumnNames(context, connection)
+                    : executeForPreparedStatementWithColumnNames(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeForStatementWithColumnNames(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeForStatementWithColumnNames(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.execute(singleE2EContext.getSQL(), new String[]{"TODO"}), "Not a DML statement.");
+            assertFalse(statement.execute(context.getSQL(), new String[]{"TODO"}), "Not a DML statement.");
             return statement.getUpdateCount();
         }
     }
     
-    private int executeForPreparedStatementWithColumnNames(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL(), new String[]{"TODO"})) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeForPreparedStatementWithColumnNames(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL(), new String[]{"TODO"})) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             assertFalse(preparedStatement.execute(), "Not a DML statement.");
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BaseDMLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BaseDMLE2EIT.java
index 5a8a5b0096b..fad91e6bcb2 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BaseDMLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BaseDMLE2EIT.java
@@ -17,6 +17,7 @@
 
 package org.apache.shardingsphere.test.e2e.engine.type.dml;
 
+import lombok.Getter;
 import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
 import org.apache.shardingsphere.infra.datanode.DataNode;
 import org.apache.shardingsphere.infra.expr.core.InlineExpressionParserFactory;
@@ -27,8 +28,9 @@ import org.apache.shardingsphere.test.e2e.cases.dataset.DataSetLoader;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.env.DataSetEnvironmentManager;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.database.DatabaseEnvironmentManager;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioDataPath;
@@ -63,24 +65,31 @@ import java.util.Set;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 
-public abstract class BaseDMLE2EIT {
+public abstract class BaseDMLE2EIT implements E2EEnvironmentAware {
     
     private static final String DATA_COLUMN_DELIMITER = ", ";
     
     private DataSetEnvironmentManager dataSetEnvironmentManager;
     
+    @Getter
+    private E2EEnvironmentEngine environmentEngine;
+    
+    @Override
+    public final void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentEngine = environmentEngine;
+    }
+    
     /**
      * Init.
      *
      * @param testParam test parameter
-     * @param containerComposer container composer
      * @throws SQLException SQL exception
      * @throws IOException IO exception
      * @throws JAXBException JAXB exception
      */
-    public final void init(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer) throws SQLException, IOException, JAXBException {
+    public final void init(final AssertionTestParameter testParam) throws SQLException, IOException, JAXBException {
         dataSetEnvironmentManager =
-                new DataSetEnvironmentManager(new ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.ACTUAL), containerComposer.getActualDataSourceMap(), testParam.getDatabaseType());
+                new DataSetEnvironmentManager(new ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.ACTUAL), getEnvironmentEngine().getActualDataSourceMap(), testParam.getDatabaseType());
         dataSetEnvironmentManager.fillData();
     }
     
@@ -142,25 +151,23 @@ public abstract class BaseDMLE2EIT {
         dataSet.getRows().sort(Comparator.comparingLong(o -> Long.parseLong(o.splitValues(",").get(0))));
     }
     
-    protected final void assertDataSet(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext, final int actualUpdateCount,
-                                       final AssertionTestParameter testParam) throws SQLException {
-        assertThat(actualUpdateCount, is(singleE2EContext.getDataSet().getUpdateCount()));
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
-            assertDataSet(containerComposer, singleE2EContext, each, testParam);
+    protected final void assertDataSet(final E2ETestContext context, final int actualUpdateCount, final AssertionTestParameter testParam) throws SQLException {
+        assertThat(actualUpdateCount, is(context.getDataSet().getUpdateCount()));
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
+            assertDataSet(context, each, testParam);
         }
     }
     
-    private void assertDataSet(final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext, final DataSetMetaData expectedDataSetMetaData,
-                               final AssertionTestParameter testParam) throws SQLException {
+    private void assertDataSet(final E2ETestContext context, final DataSetMetaData expectedDataSetMetaData, final AssertionTestParameter testParam) throws SQLException {
         Map<String, DatabaseType> databaseTypes = DatabaseEnvironmentManager.getDatabaseTypes(testParam.getScenario(), testParam.getDatabaseType());
         for (String each : InlineExpressionParserFactory.newInstance(expectedDataSetMetaData.getDataNodes()).splitAndEvaluate()) {
             DataNode dataNode = new DataNode(each);
-            DataSource dataSource = containerComposer.getActualDataSourceMap().get(dataNode.getDataSourceName());
+            DataSource dataSource = getEnvironmentEngine().getActualDataSourceMap().get(dataNode.getDataSourceName());
             DatabaseType databaseType = databaseTypes.get(dataNode.getDataSourceName());
             try (
                     Connection connection = dataSource.getConnection();
-                    PreparedStatement preparedStatement = connection.prepareStatement(generateFetchActualDataSQL(containerComposer.getActualDataSourceMap(), dataNode, databaseType))) {
-                assertDataSet(preparedStatement, expectedDataSetMetaData, singleE2EContext.getDataSet().findRows(dataNode), databaseType);
+                    PreparedStatement preparedStatement = connection.prepareStatement(generateFetchActualDataSQL(getEnvironmentEngine().getActualDataSourceMap(), dataNode, databaseType))) {
+                assertDataSet(preparedStatement, expectedDataSetMetaData, context.getDataSet().findRows(dataNode), databaseType);
             }
         }
     }
@@ -173,27 +180,26 @@ public abstract class BaseDMLE2EIT {
         }
     }
     
-    protected final void assertDataSet(final E2EContainerComposer containerComposer, final int[] actualUpdateCounts, final CaseTestParameter testParam) throws SQLException {
+    protected final void assertDataSet(final int[] actualUpdateCounts, final CaseTestParameter testParam) throws SQLException {
         Collection<DataSet> dataSets = new LinkedList<>();
         for (E2ETestCaseAssertion each : testParam.getTestCaseContext().getTestCase().getAssertions()) {
             dataSets.add(DataSetLoader.load(testParam.getTestCaseContext().getParentPath(), testParam.getScenario(), testParam.getDatabaseType(), testParam.getMode(), each.getExpectedDataFile()));
         }
         DataSet dataSet = getDataSet(actualUpdateCounts, dataSets);
         for (DataSetMetaData each : dataSet.getMetaDataList()) {
-            assertDataSet(containerComposer, each, testParam, dataSet);
+            assertDataSet(each, testParam, dataSet);
         }
     }
     
-    private void assertDataSet(final E2EContainerComposer containerComposer, final DataSetMetaData expectedDataSetMetaData, final CaseTestParameter testParam,
-                               final DataSet dataSet) throws SQLException {
+    private void assertDataSet(final DataSetMetaData expectedDataSetMetaData, final CaseTestParameter testParam, final DataSet dataSet) throws SQLException {
         Map<String, DatabaseType> databaseTypes = DatabaseEnvironmentManager.getDatabaseTypes(testParam.getScenario(), testParam.getDatabaseType());
         for (String each : InlineExpressionParserFactory.newInstance(expectedDataSetMetaData.getDataNodes()).splitAndEvaluate()) {
             DataNode dataNode = new DataNode(each);
             DatabaseType databaseType = databaseTypes.get(dataNode.getDataSourceName());
-            DataSource dataSource = containerComposer.getActualDataSourceMap().get(dataNode.getDataSourceName());
+            DataSource dataSource = getEnvironmentEngine().getActualDataSourceMap().get(dataNode.getDataSourceName());
             try (
                     Connection connection = dataSource.getConnection();
-                    PreparedStatement preparedStatement = connection.prepareStatement(generateFetchActualDataSQL(containerComposer.getActualDataSourceMap(), dataNode, databaseType))) {
+                    PreparedStatement preparedStatement = connection.prepareStatement(generateFetchActualDataSQL(getEnvironmentEngine().getActualDataSourceMap(), dataNode, databaseType))) {
                 assertDataSet(preparedStatement, expectedDataSetMetaData, dataSet.findRows(dataNode), databaseType);
             }
         }
@@ -230,7 +236,7 @@ public abstract class BaseDMLE2EIT {
     }
     
     private void assertValue(final ResultSet actual, final int columnIndex, final String expected, final DatabaseType databaseType) throws SQLException {
-        if (E2EContainerComposer.NOT_VERIFY_FLAG.equals(expected)) {
+        if (E2ETestContext.NOT_VERIFY_FLAG.equals(expected)) {
             return;
         }
         if (Types.DATE == actual.getMetaData().getColumnType(columnIndex)) {
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
index 3bc7e85c857..d67b16403cc 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/BatchDMLE2EIT.java
@@ -21,10 +21,7 @@ import org.apache.shardingsphere.test.e2e.cases.casse.assertion.E2ETestCaseAsser
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
 import org.apache.shardingsphere.test.e2e.env.DataSetEnvironmentManager;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioDataPath;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.CaseTestParameter;
@@ -63,16 +60,14 @@ class BatchDMLE2EIT extends BaseDMLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
         dataSetEnvironmentManager = new DataSetEnvironmentManager(new ScenarioDataPath(testParam.getScenario()).getDataSetFile(ScenarioDataPath.Type.ACTUAL),
-                containerComposer.getActualDataSourceMap(), testParam.getDatabaseType());
+                getEnvironmentEngine().getActualDataSourceMap(), testParam.getDatabaseType());
         dataSetEnvironmentManager.fillData();
         int[] actualUpdateCounts;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
             actualUpdateCounts = executeBatchForPreparedStatement(testParam, connection);
         }
-        assertDataSet(containerComposer, actualUpdateCounts, testParam);
+        assertDataSet(actualUpdateCounts, testParam);
     }
     
     private int[] executeBatchForPreparedStatement(final CaseTestParameter testParam, final Connection connection) throws SQLException {
@@ -99,13 +94,11 @@ class BatchDMLE2EIT extends BaseDMLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
         dataSetEnvironmentManager = new DataSetEnvironmentManager(new ScenarioDataPath(testParam.getScenario()).getDataSetFile(ScenarioDataPath.Type.ACTUAL),
-                containerComposer.getActualDataSourceMap(), testParam.getDatabaseType());
+                getEnvironmentEngine().getActualDataSourceMap(), testParam.getDatabaseType());
         dataSetEnvironmentManager.fillData();
         try (
-                Connection connection = containerComposer.getTargetDataSource().getConnection();
+                Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 PreparedStatement preparedStatement = connection.prepareStatement(testParam.getTestCaseContext().getTestCase().getSql())) {
             for (E2ETestCaseAssertion each : testParam.getTestCaseContext().getTestCase().getAssertions()) {
                 addBatch(preparedStatement, each);
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/GeneralDMLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/GeneralDMLE2EIT.java
index 26c8e240eb0..1866f8ac938 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/GeneralDMLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dml/GeneralDMLE2EIT.java
@@ -17,17 +17,14 @@
 
 package org.apache.shardingsphere.test.e2e.engine.type.dml;
 
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -52,28 +49,26 @@ class GeneralDMLE2EIT extends BaseDMLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeUpdateForStatement(singleE2EContext, connection)
-                    : executeUpdateForPreparedStatement(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeUpdateForStatement(context, connection)
+                    : executeUpdateForPreparedStatement(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeUpdateForStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeUpdateForStatement(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            return statement.executeUpdate(singleE2EContext.getSQL());
+            return statement.executeUpdate(context.getSQL());
         }
     }
     
-    private int executeUpdateForPreparedStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL())) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeUpdateForPreparedStatement(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL())) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             return preparedStatement.executeUpdate();
@@ -88,29 +83,27 @@ class GeneralDMLE2EIT extends BaseDMLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam);
         int actualUpdateCount;
-        try (Connection connection = containerComposer.getTargetDataSource().getConnection()) {
-            actualUpdateCount = SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()
-                    ? executeForStatement(singleE2EContext, connection)
-                    : executeForPreparedStatement(singleE2EContext, connection);
+        try (Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection()) {
+            actualUpdateCount = SQLExecuteType.Literal == context.getSqlExecuteType()
+                    ? executeForStatement(context, connection)
+                    : executeForPreparedStatement(context, connection);
         }
-        assertDataSet(containerComposer, singleE2EContext, actualUpdateCount, testParam);
+        assertDataSet(context, actualUpdateCount, testParam);
     }
     
-    private int executeForStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
+    private int executeForStatement(final E2ETestContext context, final Connection connection) throws SQLException {
         try (Statement statement = connection.createStatement()) {
-            assertFalse(statement.execute(singleE2EContext.getSQL()), "Not a DML statement.");
+            assertFalse(statement.execute(context.getSQL()), "Not a DML statement.");
             return statement.getUpdateCount();
         }
     }
     
-    private int executeForPreparedStatement(final SingleE2EContext singleE2EContext, final Connection connection) throws SQLException {
-        try (PreparedStatement preparedStatement = connection.prepareStatement(singleE2EContext.getSQL())) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+    private int executeForPreparedStatement(final E2ETestContext context, final Connection connection) throws SQLException {
+        try (PreparedStatement preparedStatement = connection.prepareStatement(context.getSQL())) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 preparedStatement.setObject(each.getIndex(), each.getValue());
             }
             assertFalse(preparedStatement.execute(), "Not a DML statement.");
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
index 5a72d5767e8..dd7320ab7f5 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/AdditionalDQLE2EIT.java
@@ -20,10 +20,7 @@ package org.apache.shardingsphere.test.e2e.engine.type.dql;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.env.runtime.E2ETestEnvironment;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
@@ -54,18 +51,16 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam, context);
         // TODO fix e2e test blocked exception with PostgreSQL or openGauss in #23643
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
         if (isUseXMLAsExpectedDataset()) {
-            assertExecuteQueryWithXMLExpected(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+            assertExecuteQueryWithXMLExpected(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
         } else {
-            assertExecuteQueryWithExpectedDataSource(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+            assertExecuteQueryWithExpectedDataSource(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
         }
     }
     
@@ -77,18 +72,17 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam, context);
         // TODO fix e2e test blocked exception with PostgreSQL or openGauss in #23643
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
         if (isUseXMLAsExpectedDataset()) {
-            assertExecuteQueryWithXMLExpected(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
+            assertExecuteQueryWithXMLExpected(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
         } else {
-            assertExecuteQueryWithExpectedDataSource(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
+            assertExecuteQueryWithExpectedDataSource(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY,
+                    ResultSet.HOLD_CURSORS_OVER_COMMIT);
         }
     }
     
@@ -100,18 +94,16 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam, context);
         // TODO fix e2e test blocked exception with PostgreSQL or openGauss in #23643
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
         if (isUseXMLAsExpectedDataset()) {
-            assertExecuteWithXMLExpected(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+            assertExecuteWithXMLExpected(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
         } else {
-            assertExecuteWithExpectedDataSource(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
+            assertExecuteWithExpectedDataSource(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
         }
     }
     
@@ -123,18 +115,16 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam, context);
         // TODO fix e2e test blocked exception with PostgreSQL or openGauss in #23643
         if (isPostgreSQLOrOpenGauss(testParam.getDatabaseType().getType())) {
             return;
         }
         if (isUseXMLAsExpectedDataset()) {
-            assertExecuteWithXMLExpected(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
+            assertExecuteWithXMLExpected(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
         } else {
-            assertExecuteWithExpectedDataSource(testParam, containerComposer, singleE2EContext, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
+            assertExecuteWithExpectedDataSource(testParam, context, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY, ResultSet.HOLD_CURSORS_OVER_COMMIT);
         }
     }
     
@@ -142,56 +132,54 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         return "PostgreSQL".equals(databaseType) || "openGauss".equals(databaseType);
     }
     
-    private void assertExecuteQueryWithXMLExpected(final AssertionTestParameter testParam,
-                                                   final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext, final int... resultSetTypes) throws SQLException {
+    private void assertExecuteQueryWithXMLExpected(final AssertionTestParameter testParam, final E2ETestContext context, final int... resultSetTypes) throws SQLException {
         // TODO Fix jdbc adapter
         if ("jdbc".equals(testParam.getAdapter())) {
             return;
         }
         try (
-                Connection connection = containerComposer.getTargetDataSource().getConnection();
+                Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Statement statement = 2 == resultSetTypes.length ? connection.createStatement(resultSetTypes[0], resultSetTypes[1])
                         : connection.createStatement(resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
-                ResultSet resultSet = statement.executeQuery(singleE2EContext.getSQL())) {
-            assertResultSet(singleE2EContext, resultSet);
+                ResultSet resultSet = statement.executeQuery(context.getSQL())) {
+            assertResultSet(context, resultSet);
         }
     }
     
-    private void assertExecuteQueryWithExpectedDataSource(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext,
-                                                          final int... resultSetTypes) throws SQLException {
+    private void assertExecuteQueryWithExpectedDataSource(final AssertionTestParameter testParam, final E2ETestContext context, final int... resultSetTypes) throws SQLException {
         try (
-                Connection actualConnection = containerComposer.getTargetDataSource().getConnection();
+                Connection actualConnection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Connection expectedConnection = getExpectedDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
-                assertExecuteQueryForStatementWithResultSetTypes(singleE2EContext, actualConnection, expectedConnection, testParam, resultSetTypes);
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
+                assertExecuteQueryForStatementWithResultSetTypes(context, actualConnection, expectedConnection, testParam, resultSetTypes);
             } else {
-                assertExecuteQueryForPreparedStatementWithResultSetTypes(singleE2EContext, actualConnection, expectedConnection, testParam, resultSetTypes);
+                assertExecuteQueryForPreparedStatementWithResultSetTypes(context, actualConnection, expectedConnection, testParam, resultSetTypes);
             }
         }
     }
     
-    private void assertExecuteQueryForStatementWithResultSetTypes(final SingleE2EContext singleE2EContext,
+    private void assertExecuteQueryForStatementWithResultSetTypes(final E2ETestContext context,
                                                                   final Connection actualConnection, final Connection expectedConnection,
                                                                   final AssertionTestParameter testParam, final int... resultSetTypes) throws SQLException {
         try (
                 Statement actualStatement = 2 == resultSetTypes.length ? actualConnection.createStatement(resultSetTypes[0], resultSetTypes[1])
                         : actualConnection.createStatement(resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
-                ResultSet actualResultSet = actualStatement.executeQuery(singleE2EContext.getSQL());
+                ResultSet actualResultSet = actualStatement.executeQuery(context.getSQL());
                 Statement expectedStatement = 2 == resultSetTypes.length ? expectedConnection.createStatement(resultSetTypes[0], resultSetTypes[1])
                         : expectedConnection.createStatement(resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
-                ResultSet expectedResultSet = expectedStatement.executeQuery(singleE2EContext.getSQL())) {
+                ResultSet expectedResultSet = expectedStatement.executeQuery(context.getSQL())) {
             assertResultSet(actualResultSet, expectedResultSet, testParam);
         }
     }
     
-    private void assertExecuteQueryForPreparedStatementWithResultSetTypes(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteQueryForPreparedStatementWithResultSetTypes(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                                                           final AssertionTestParameter testParam, final int... resultSetTypes) throws SQLException {
         try (
-                PreparedStatement actualPreparedStatement = 2 == resultSetTypes.length ? actualConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1])
-                        : actualConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
-                PreparedStatement expectedPreparedStatement = 2 == resultSetTypes.length ? expectedConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1])
-                        : expectedConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2])) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+                PreparedStatement actualPreparedStatement = 2 == resultSetTypes.length ? actualConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1])
+                        : actualConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
+                PreparedStatement expectedPreparedStatement = 2 == resultSetTypes.length ? expectedConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1])
+                        : expectedConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2])) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 actualPreparedStatement.setObject(each.getIndex(), each.getValue());
                 expectedPreparedStatement.setObject(each.getIndex(), each.getValue());
             }
@@ -203,43 +191,41 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         }
     }
     
-    private void assertExecuteWithXMLExpected(final AssertionTestParameter testParam,
-                                              final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext, final int... resultSetTypes) throws SQLException {
+    private void assertExecuteWithXMLExpected(final AssertionTestParameter testParam, final E2ETestContext context, final int... resultSetTypes) throws SQLException {
         // TODO Fix jdbc adapter
         if ("jdbc".equals(testParam.getAdapter())) {
             return;
         }
         try (
-                Connection connection = containerComposer.getTargetDataSource().getConnection();
+                Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Statement statement = 2 == resultSetTypes.length ? connection.createStatement(resultSetTypes[0], resultSetTypes[1])
                         : connection.createStatement(resultSetTypes[0], resultSetTypes[1], resultSetTypes[2])) {
-            assertTrue(statement.execute(singleE2EContext.getSQL()), "Not a query statement.");
+            assertTrue(statement.execute(context.getSQL()), "Not a query statement.");
             ResultSet resultSet = statement.getResultSet();
-            assertResultSet(singleE2EContext, resultSet);
+            assertResultSet(context, resultSet);
         }
     }
     
-    private void assertExecuteWithExpectedDataSource(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext,
-                                                     final int... resultSetTypes) throws SQLException {
+    private void assertExecuteWithExpectedDataSource(final AssertionTestParameter testParam, final E2ETestContext context, final int... resultSetTypes) throws SQLException {
         try (
-                Connection actualConnection = containerComposer.getTargetDataSource().getConnection();
+                Connection actualConnection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Connection expectedConnection = getExpectedDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
-                assertExecuteForStatementWithResultSetTypes(singleE2EContext, actualConnection, expectedConnection, testParam, resultSetTypes);
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
+                assertExecuteForStatementWithResultSetTypes(context, actualConnection, expectedConnection, testParam, resultSetTypes);
             } else {
-                assertExecuteForPreparedStatementWithResultSetTypes(singleE2EContext, actualConnection, expectedConnection, testParam, resultSetTypes);
+                assertExecuteForPreparedStatementWithResultSetTypes(context, actualConnection, expectedConnection, testParam, resultSetTypes);
             }
         }
     }
     
-    private void assertExecuteForStatementWithResultSetTypes(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteForStatementWithResultSetTypes(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                                              final AssertionTestParameter testParam, final int... resultSetTypes) throws SQLException {
         try (
                 Statement actualStatement = 2 == resultSetTypes.length ? actualConnection.createStatement(resultSetTypes[0], resultSetTypes[1])
                         : actualConnection.createStatement(resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
                 Statement expectedStatement = 2 == resultSetTypes.length ? expectedConnection.createStatement(resultSetTypes[0], resultSetTypes[1])
                         : expectedConnection.createStatement(resultSetTypes[0], resultSetTypes[1], resultSetTypes[2])) {
-            assertTrue(actualStatement.execute(singleE2EContext.getSQL()) && expectedStatement.execute(singleE2EContext.getSQL()), "Not a query statement.");
+            assertTrue(actualStatement.execute(context.getSQL()) && expectedStatement.execute(context.getSQL()), "Not a query statement.");
             try (
                     ResultSet actualResultSet = actualStatement.getResultSet();
                     ResultSet expectedResultSet = expectedStatement.getResultSet()) {
@@ -248,14 +234,14 @@ class AdditionalDQLE2EIT extends BaseDQLE2EIT {
         }
     }
     
-    private void assertExecuteForPreparedStatementWithResultSetTypes(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteForPreparedStatementWithResultSetTypes(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                                                      final AssertionTestParameter testParam, final int... resultSetTypes) throws SQLException {
         try (
-                PreparedStatement actualPreparedStatement = 2 == resultSetTypes.length ? actualConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1])
-                        : actualConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
-                PreparedStatement expectedPreparedStatement = 2 == resultSetTypes.length ? expectedConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1])
-                        : expectedConnection.prepareStatement(singleE2EContext.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2])) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+                PreparedStatement actualPreparedStatement = 2 == resultSetTypes.length ? actualConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1])
+                        : actualConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2]);
+                PreparedStatement expectedPreparedStatement = 2 == resultSetTypes.length ? expectedConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1])
+                        : expectedConnection.prepareStatement(context.getSQL(), resultSetTypes[0], resultSetTypes[1], resultSetTypes[2])) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 actualPreparedStatement.setObject(each.getIndex(), each.getValue());
                 expectedPreparedStatement.setObject(each.getIndex(), each.getValue());
             }
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/BaseDQLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/BaseDQLE2EIT.java
index a136d1dfdb2..63bf12a0f08 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/BaseDQLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/BaseDQLE2EIT.java
@@ -23,8 +23,9 @@ import org.apache.shardingsphere.infra.util.datetime.DateTimeFormatterFactory;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetColumn;
 import org.apache.shardingsphere.test.e2e.cases.dataset.metadata.DataSetMetaData;
 import org.apache.shardingsphere.test.e2e.cases.dataset.row.DataSetRow;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentAware;
+import org.apache.shardingsphere.test.e2e.env.E2EEnvironmentEngine;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.env.DataSetEnvironmentManager;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioDataPath;
 import org.apache.shardingsphere.test.e2e.env.runtime.scenario.path.ScenarioDataPath.Type;
@@ -56,7 +57,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @Getter(AccessLevel.PROTECTED)
-public abstract class BaseDQLE2EIT {
+public abstract class BaseDQLE2EIT implements E2EEnvironmentAware {
     
     private static final Collection<String> FILLED_SUITES = new HashSet<>();
     
@@ -64,27 +65,33 @@ public abstract class BaseDQLE2EIT {
     
     private boolean useXMLAsExpectedDataset;
     
-    protected final void init(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer,
-                              final SingleE2EContext singleE2EContext) throws SQLException, IOException, JAXBException {
-        fillDataOnlyOnce(testParam, containerComposer);
-        expectedDataSource = null == singleE2EContext.getAssertion().getExpectedDataSourceName() || 1 == containerComposer.getExpectedDataSourceMap().size()
-                ? getFirstExpectedDataSource(containerComposer.getExpectedDataSourceMap().values())
-                : containerComposer.getExpectedDataSourceMap().get(singleE2EContext.getAssertion().getExpectedDataSourceName());
-        useXMLAsExpectedDataset = null != singleE2EContext.getAssertion().getExpectedDataFile();
+    private E2EEnvironmentEngine environmentEngine;
+    
+    @Override
+    public void setEnvironmentEngine(final E2EEnvironmentEngine environmentEngine) {
+        this.environmentEngine = environmentEngine;
+    }
+    
+    protected final void init(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException, IOException, JAXBException {
+        fillDataOnlyOnce(testParam);
+        expectedDataSource = null == context.getAssertion().getExpectedDataSourceName() || 1 == getEnvironmentEngine().getExpectedDataSourceMap().size()
+                ? getFirstExpectedDataSource(getEnvironmentEngine().getExpectedDataSourceMap().values())
+                : getEnvironmentEngine().getExpectedDataSourceMap().get(context.getAssertion().getExpectedDataSourceName());
+        useXMLAsExpectedDataset = null != context.getAssertion().getExpectedDataFile();
         if (0 != testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds()) {
             Awaitility.await().atMost(Duration.ofMinutes(5L)).pollDelay(testParam.getTestCaseContext().getTestCase().getDelayAssertionSeconds(), TimeUnit.SECONDS).until(() -> true);
         }
     }
     
-    private void fillDataOnlyOnce(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer) throws IOException, JAXBException {
-        String cacheKey = testParam.getKey() + "-" + System.identityHashCode(containerComposer.getActualDataSourceMap());
+    private void fillDataOnlyOnce(final AssertionTestParameter testParam) throws IOException, JAXBException {
+        String cacheKey = testParam.getKey() + "-" + System.identityHashCode(getEnvironmentEngine().getActualDataSourceMap());
         if (!FILLED_SUITES.contains(cacheKey)) {
             synchronized (FILLED_SUITES) {
                 if (!FILLED_SUITES.contains(cacheKey)) {
                     new DataSetEnvironmentManager(
-                            new ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.ACTUAL), containerComposer.getActualDataSourceMap(), testParam.getDatabaseType()).fillData();
+                            new ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.ACTUAL), getEnvironmentEngine().getActualDataSourceMap(), testParam.getDatabaseType()).fillData();
                     new DataSetEnvironmentManager(
-                            new ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.EXPECTED), containerComposer.getExpectedDataSourceMap(), testParam.getDatabaseType()).fillData();
+                            new ScenarioDataPath(testParam.getScenario()).getDataSetFile(Type.EXPECTED), getEnvironmentEngine().getExpectedDataSourceMap(), testParam.getDatabaseType()).fillData();
                     FILLED_SUITES.add(cacheKey);
                 }
             }
@@ -100,22 +107,22 @@ public abstract class BaseDQLE2EIT {
         assertRows(actualResultSet, expectedResultSet);
     }
     
-    protected final void assertResultSet(final SingleE2EContext singleE2EContext, final ResultSet resultSet) throws SQLException {
-        assertMetaData(resultSet.getMetaData(), getExpectedColumns(singleE2EContext));
-        assertRows(resultSet, getIgnoreAssertColumns(singleE2EContext), singleE2EContext.getDataSet().getRows());
+    protected final void assertResultSet(final E2ETestContext context, final ResultSet resultSet) throws SQLException {
+        assertMetaData(resultSet.getMetaData(), getExpectedColumns(context));
+        assertRows(resultSet, getIgnoreAssertColumns(context), context.getDataSet().getRows());
     }
     
-    private Collection<DataSetColumn> getExpectedColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<DataSetColumn> getExpectedColumns(final E2ETestContext context) {
         Collection<DataSetColumn> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns());
         }
         return result;
     }
     
-    private Collection<String> getIgnoreAssertColumns(final SingleE2EContext singleE2EContext) {
+    private Collection<String> getIgnoreAssertColumns(final E2ETestContext context) {
         Collection<String> result = new LinkedList<>();
-        for (DataSetMetaData each : singleE2EContext.getDataSet().getMetaDataList()) {
+        for (DataSetMetaData each : context.getDataSet().getMetaDataList()) {
             result.addAll(each.getColumns().stream().filter(DataSetColumn::isIgnoreAssertData).map(DataSetColumn::getName).collect(Collectors.toList()));
         }
         return result;
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
index 576bcc71212..8b13d45c814 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/type/dql/GeneralDQLE2EIT.java
@@ -17,17 +17,14 @@
 
 package org.apache.shardingsphere.test.e2e.engine.type.dql;
 
-import org.apache.shardingsphere.test.e2e.engine.context.SingleE2EContext;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
-import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
-import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.apache.shardingsphere.test.e2e.cases.value.SQLValue;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseArgumentsProvider;
 import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
-import org.apache.shardingsphere.test.e2e.engine.composer.E2EContainerComposer;
+import org.apache.shardingsphere.test.e2e.engine.context.E2ETestContext;
 import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
 import org.apache.shardingsphere.test.e2e.framework.param.model.AssertionTestParameter;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLCommandType;
+import org.apache.shardingsphere.test.e2e.framework.type.SQLExecuteType;
 import org.junit.jupiter.api.condition.EnabledIf;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ArgumentsSource;
@@ -53,66 +50,62 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer, singleE2EContext);
-        assertExecuteQuery(testParam, containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam, context);
+        assertExecuteQuery(testParam, context);
     }
     
-    private void assertExecuteQuery(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecuteQuery(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         if (isUseXMLAsExpectedDataset()) {
-            assertExecuteQueryWithXmlExpected(testParam, containerComposer, singleE2EContext);
+            assertExecuteQueryWithXmlExpected(testParam, context);
         } else {
-            assertExecuteQueryWithExpectedDataSource(testParam, containerComposer, singleE2EContext);
+            assertExecuteQueryWithExpectedDataSource(testParam, context);
         }
     }
     
-    private void assertExecuteQueryWithXmlExpected(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer,
-                                                   final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecuteQueryWithXmlExpected(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         // TODO Fix jdbc adapter and empty_storage_units proxy adapter
         if ("jdbc".equals(testParam.getAdapter()) && !"empty_storage_units".equalsIgnoreCase(testParam.getScenario())
                 || "proxy".equals(testParam.getAdapter()) && "empty_storage_units".equalsIgnoreCase(testParam.getScenario())) {
             return;
         }
         try (
-                Connection connection = containerComposer.getTargetDataSource().getConnection();
+                Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Statement statement = connection.createStatement();
-                ResultSet resultSet = statement.executeQuery(singleE2EContext.getSQL())) {
-            assertResultSet(singleE2EContext, resultSet);
+                ResultSet resultSet = statement.executeQuery(context.getSQL())) {
+            assertResultSet(context, resultSet);
         }
     }
     
-    private void assertExecuteQueryWithExpectedDataSource(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer,
-                                                          final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecuteQueryWithExpectedDataSource(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         try (
-                Connection actualConnection = containerComposer.getTargetDataSource().getConnection();
+                Connection actualConnection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Connection expectedConnection = getExpectedDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
-                assertExecuteQueryForStatement(singleE2EContext, actualConnection, expectedConnection, testParam);
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
+                assertExecuteQueryForStatement(context, actualConnection, expectedConnection, testParam);
             } else {
-                assertExecuteQueryForPreparedStatement(singleE2EContext, actualConnection, expectedConnection, testParam);
+                assertExecuteQueryForPreparedStatement(context, actualConnection, expectedConnection, testParam);
             }
         }
     }
     
-    private void assertExecuteQueryForStatement(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteQueryForStatement(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                                 final AssertionTestParameter testParam) throws SQLException {
         try (
                 Statement actualStatement = actualConnection.createStatement();
-                ResultSet actualResultSet = actualStatement.executeQuery(singleE2EContext.getSQL());
+                ResultSet actualResultSet = actualStatement.executeQuery(context.getSQL());
                 Statement expectedStatement = expectedConnection.createStatement();
-                ResultSet expectedResultSet = expectedStatement.executeQuery(singleE2EContext.getSQL())) {
+                ResultSet expectedResultSet = expectedStatement.executeQuery(context.getSQL())) {
             assertResultSet(actualResultSet, expectedResultSet, testParam);
         }
     }
     
-    private void assertExecuteQueryForPreparedStatement(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteQueryForPreparedStatement(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                                         final AssertionTestParameter testParam) throws SQLException {
         try (
-                PreparedStatement actualPreparedStatement = actualConnection.prepareStatement(singleE2EContext.getSQL());
-                PreparedStatement expectedPreparedStatement = expectedConnection.prepareStatement(singleE2EContext.getSQL())) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+                PreparedStatement actualPreparedStatement = actualConnection.prepareStatement(context.getSQL());
+                PreparedStatement expectedPreparedStatement = expectedConnection.prepareStatement(context.getSQL())) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 actualPreparedStatement.setObject(each.getIndex(), each.getValue());
                 expectedPreparedStatement.setObject(each.getIndex(), each.getValue());
             }
@@ -132,54 +125,51 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
         if (null == testParam.getTestCaseContext()) {
             return;
         }
-        E2EContainerComposer containerComposer = new E2EContainerComposer(testParam.getKey(), testParam.getScenario(), testParam.getDatabaseType(),
-                AdapterMode.valueOf(testParam.getMode().toUpperCase()), AdapterType.valueOf(testParam.getAdapter().toUpperCase()));
-        SingleE2EContext singleE2EContext = new SingleE2EContext(testParam);
-        init(testParam, containerComposer, singleE2EContext);
-        assertExecute(testParam, containerComposer, singleE2EContext);
+        E2ETestContext context = new E2ETestContext(testParam);
+        init(testParam, context);
+        assertExecute(testParam, context);
     }
     
-    private void assertExecute(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecute(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         if (isUseXMLAsExpectedDataset()) {
-            assertExecuteWithXmlExpected(testParam, containerComposer, singleE2EContext);
+            assertExecuteWithXmlExpected(testParam, context);
         } else {
-            assertExecuteWithExpectedDataSource(testParam, containerComposer, singleE2EContext);
+            assertExecuteWithExpectedDataSource(testParam, context);
         }
     }
     
-    private void assertExecuteWithXmlExpected(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer, final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecuteWithXmlExpected(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         // TODO Fix jdbc adapter
         if ("jdbc".equals(testParam.getAdapter())) {
             return;
         }
         try (
-                Connection connection = containerComposer.getTargetDataSource().getConnection();
+                Connection connection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Statement statement = connection.createStatement()) {
-            assertTrue(statement.execute(singleE2EContext.getSQL()), "Not a query statement.");
+            assertTrue(statement.execute(context.getSQL()), "Not a query statement.");
             ResultSet resultSet = statement.getResultSet();
-            assertResultSet(singleE2EContext, resultSet);
+            assertResultSet(context, resultSet);
         }
     }
     
-    private void assertExecuteWithExpectedDataSource(final AssertionTestParameter testParam, final E2EContainerComposer containerComposer,
-                                                     final SingleE2EContext singleE2EContext) throws SQLException {
+    private void assertExecuteWithExpectedDataSource(final AssertionTestParameter testParam, final E2ETestContext context) throws SQLException {
         try (
-                Connection actualConnection = containerComposer.getTargetDataSource().getConnection();
+                Connection actualConnection = getEnvironmentEngine().getTargetDataSource().getConnection();
                 Connection expectedConnection = getExpectedDataSource().getConnection()) {
-            if (SQLExecuteType.Literal == singleE2EContext.getSqlExecuteType()) {
-                assertExecuteForStatement(singleE2EContext, actualConnection, expectedConnection, testParam);
+            if (SQLExecuteType.Literal == context.getSqlExecuteType()) {
+                assertExecuteForStatement(context, actualConnection, expectedConnection, testParam);
             } else {
-                assertExecuteForPreparedStatement(singleE2EContext, actualConnection, expectedConnection, testParam);
+                assertExecuteForPreparedStatement(context, actualConnection, expectedConnection, testParam);
             }
         }
     }
     
-    private void assertExecuteForStatement(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteForStatement(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                            final AssertionTestParameter testParam) throws SQLException {
         try (
                 Statement actualStatement = actualConnection.createStatement();
                 Statement expectedStatement = expectedConnection.createStatement()) {
-            assertTrue(actualStatement.execute(singleE2EContext.getSQL()) && expectedStatement.execute(singleE2EContext.getSQL()), "Not a query statement.");
+            assertTrue(actualStatement.execute(context.getSQL()) && expectedStatement.execute(context.getSQL()), "Not a query statement.");
             try (
                     ResultSet actualResultSet = actualStatement.getResultSet();
                     ResultSet expectedResultSet = expectedStatement.getResultSet()) {
@@ -188,12 +178,12 @@ class GeneralDQLE2EIT extends BaseDQLE2EIT {
         }
     }
     
-    private void assertExecuteForPreparedStatement(final SingleE2EContext singleE2EContext, final Connection actualConnection, final Connection expectedConnection,
+    private void assertExecuteForPreparedStatement(final E2ETestContext context, final Connection actualConnection, final Connection expectedConnection,
                                                    final AssertionTestParameter testParam) throws SQLException {
         try (
-                PreparedStatement actualPreparedStatement = actualConnection.prepareStatement(singleE2EContext.getSQL());
-                PreparedStatement expectedPreparedStatement = expectedConnection.prepareStatement(singleE2EContext.getSQL())) {
-            for (SQLValue each : singleE2EContext.getAssertion().getSQLValues()) {
+                PreparedStatement actualPreparedStatement = actualConnection.prepareStatement(context.getSQL());
+                PreparedStatement expectedPreparedStatement = expectedConnection.prepareStatement(context.getSQL())) {
+            for (SQLValue each : context.getAssertion().getSQLValues()) {
                 actualPreparedStatement.setObject(each.getIndex(), each.getValue());
                 expectedPreparedStatement.setObject(each.getIndex(), each.getValue());
             }
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentAware.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentAware.java
new file mode 100644
index 00000000000..1c06f5a83ea
--- /dev/null
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentAware.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.e2e.env;
+
+import org.junit.jupiter.api.extension.ExtendWith;
+
+@ExtendWith(E2EEnvironmentSetupProcessor.class)
+public interface E2EEnvironmentAware {
+    
+    /**
+     * Set container composer.
+     *
+     * @param environmentEngine container composer
+     */
+    void setEnvironmentEngine(E2EEnvironmentEngine environmentEngine);
+}
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/E2EContainerComposer.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentEngine.java
similarity index 93%
rename from test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/E2EContainerComposer.java
rename to test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentEngine.java
index d39bc6b82f9..33a7c0d6d0e 100644
--- a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/engine/composer/E2EContainerComposer.java
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentEngine.java
@@ -15,9 +15,8 @@
  * limitations under the License.
  */
 
-package org.apache.shardingsphere.test.e2e.engine.composer;
+package org.apache.shardingsphere.test.e2e.env;
 
-import lombok.AccessLevel;
 import lombok.Getter;
 import lombok.SneakyThrows;
 import org.apache.shardingsphere.infra.database.core.DefaultDatabase;
@@ -45,9 +44,7 @@ import java.util.concurrent.atomic.AtomicInteger;
  * E2E container composer.
  */
 @Getter
-public final class E2EContainerComposer {
-    
-    public static final String NOT_VERIFY_FLAG = "NOT_VERIFY";
+public final class E2EEnvironmentEngine {
     
     private static final ContainerComposerRegistry CONTAINER_COMPOSER_REGISTRY = new ContainerComposerRegistry();
     
@@ -57,7 +54,6 @@ public final class E2EContainerComposer {
     
     private static final Collection<String> INITIALIZED_SUITES = new HashSet<>();
     
-    @Getter(AccessLevel.NONE)
     private final ContainerComposer containerComposer;
     
     private final Map<String, DataSource> actualDataSourceMap;
@@ -66,7 +62,7 @@ public final class E2EContainerComposer {
     
     private final Map<String, DataSource> expectedDataSourceMap;
     
-    public E2EContainerComposer(final String key, final String scenario, final DatabaseType databaseType, final AdapterMode adapterMode, final AdapterType adapterType) {
+    public E2EEnvironmentEngine(final String key, final String scenario, final DatabaseType databaseType, final AdapterMode adapterMode, final AdapterType adapterType) {
         containerComposer = CONTAINER_COMPOSER_REGISTRY.getContainerComposer(key, scenario, databaseType, adapterMode, adapterType);
         containerComposer.start();
         actualDataSourceMap = containerComposer.getActualDataSourceMap();
diff --git a/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentSetupProcessor.java b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentSetupProcessor.java
new file mode 100644
index 00000000000..3f7faa2b037
--- /dev/null
+++ b/test/e2e/sql/src/test/java/org/apache/shardingsphere/test/e2e/env/E2EEnvironmentSetupProcessor.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.test.e2e.env;
+
+import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
+import org.apache.shardingsphere.test.e2e.engine.arg.E2ETestCaseSettings;
+import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterMode;
+import org.apache.shardingsphere.test.e2e.env.container.atomic.enums.AdapterType;
+import org.apache.shardingsphere.test.e2e.env.runtime.E2ETestEnvironment;
+import org.apache.shardingsphere.test.e2e.framework.param.array.E2ETestParameterFactory;
+import org.apache.shardingsphere.test.e2e.framework.param.model.E2ETestParameter;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.InvocationInterceptor;
+import org.junit.jupiter.api.extension.ReflectiveInvocationContext;
+
+import java.lang.reflect.Method;
+
+public class E2EEnvironmentSetupProcessor implements BeforeAllCallback, InvocationInterceptor {
+    
+    @Override
+    public void beforeAll(final ExtensionContext context) {
+        if (!E2ETestParameterFactory.containsTestParameter()) {
+            return;
+        }
+        E2ETestEnvironment testEnvironment = E2ETestEnvironment.getInstance();
+        E2ETestCaseSettings settings = context.getRequiredTestClass().getAnnotation(E2ETestCaseSettings.class);
+        for (String scenario : testEnvironment.getScenarios()) {
+            for (DatabaseType databaseType : testEnvironment.getClusterEnvironment().getDatabaseTypes()) {
+                for (String adapterMode : testEnvironment.getRunModes()) {
+                    for (String adapterType : testEnvironment.getClusterEnvironment().getAdapters()) {
+                        // todo Remove the key originating from the historical code.
+                        String key = String.join("-", settings.value().toString(), scenario, adapterType, databaseType.getType());
+                        new E2EEnvironmentEngine(key, scenario, databaseType, AdapterMode.valueOf(adapterMode.toUpperCase()), AdapterType.valueOf(adapterType.toUpperCase()));
+                    }
+                }
+            }
+        }
+    }
+    
+    @Override
+    public void interceptTestTemplateMethod(final Invocation<Void> invocation, final ReflectiveInvocationContext<Method> invocationContext, final ExtensionContext extensionContext) throws Throwable {
+        interceptTestMethod(invocation, invocationContext, extensionContext);
+    }
+    
+    @Override
+    public void interceptTestMethod(final Invocation<Void> invocation, final ReflectiveInvocationContext<Method> invocationContext, final ExtensionContext extensionContext) throws Throwable {
+        if (!(extensionContext.getRequiredTestInstance() instanceof E2EEnvironmentAware)) {
+            throw new UnsupportedOperationException("E2EEnvironmentAware is required.");
+        }
+        for (Object each : invocationContext.getArguments()) {
+            if (each instanceof E2ETestParameter) {
+                E2ETestParameter testParameter = (E2ETestParameter) each;
+                // TODO make sure test case can not be null
+                if (null == testParameter.getTestCaseContext()) {
+                    break;
+                }
+                E2EEnvironmentEngine e2EEnvironmentEngine = new E2EEnvironmentEngine(testParameter.getKey(), testParameter.getScenario(), testParameter.getDatabaseType(),
+                        AdapterMode.valueOf(testParameter.getMode().toUpperCase()), AdapterType.valueOf(testParameter.getAdapter().toUpperCase()));
+                ((E2EEnvironmentAware) extensionContext.getRequiredTestInstance()).setEnvironmentEngine(e2EEnvironmentEngine);
+            }
+        }
+        invocation.proceed();
+    }
+}