diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
index 3690a996484..415716e5567 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml
@@ -141,6 +141,9 @@
src/test/resources/testng.xml
src/test/resources/mysql-testng.xml
+ src/test/resources/mssql-testng.xml
+ src/test/resources/oracle-testng.xml
+ src/test/resources/postgre-testng.xml
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java
index 9662dd277ad..2ab645ba9bb 100644
--- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/mock/MockDatabaseMetaData.java
@@ -83,6 +83,12 @@ public class MockDatabaseMetaData implements DatabaseMetaData {
return DeviceManagementConstants.DataBaseTypes.DB_TYPE_MYSQL;
} else if (this.url.contains("h2")) {
return DeviceManagementConstants.DataBaseTypes.DB_TYPE_H2;
+ } else if (this.url.contains("oracle")) {
+ return DeviceManagementConstants.DataBaseTypes.DB_TYPE_ORACLE;
+ } else if (this.url.contains("postgresql")) {
+ return DeviceManagementConstants.DataBaseTypes.DB_TYPE_POSTGRESQL;
+ } else if (this.url.contains("sqlserver")) {
+ return DeviceManagementConstants.DataBaseTypes.DB_TYPE_MSSQL;
} else {
return null;
}
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-mock.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-mock.xml
new file mode 100644
index 00000000000..bdd1fca8149
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-mock.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-no-table.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-no-table.xml
new file mode 100644
index 00000000000..bdd1fca8149
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config-no-table.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config.xml
new file mode 100644
index 00000000000..bdd1fca8149
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/mssql/data-source-config.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-mock.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-mock.xml
new file mode 100644
index 00000000000..badd2738f27
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-mock.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:oracle:thin:@myhost:1521:orcl
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-no-table.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-no-table.xml
new file mode 100644
index 00000000000..f5ec80f7503
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config-no-table.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:oracle:thin:@myhost:1521:orclt
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config.xml
new file mode 100644
index 00000000000..badd2738f27
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/oracle/data-source-config.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:oracle:thin:@myhost:1521:orcl
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-mock.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-mock.xml
new file mode 100644
index 00000000000..e89ec942297
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-mock.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:mysql://localhost/test
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-no-table.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-no-table.xml
new file mode 100644
index 00000000000..1f129e7e6e0
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config-no-table.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:mysql://localhost/noTableTest
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config.xml
new file mode 100644
index 00000000000..acd82eb55f7
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/config/datasource/postgre/data-source-config.xml
@@ -0,0 +1,33 @@
+
+
+
+
+ jdbc:postgresql://localhost/test
+ org.wso2.carbon.device.mgt.core.mock.MockJDBCDriver
+ wso2carbon
+ wso2carbon
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/mssql-testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/mssql-testng.xml
new file mode 100644
index 00000000000..97cf287626e
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/mssql-testng.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/oracle-testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/oracle-testng.xml
new file mode 100644
index 00000000000..4199d5cb9a7
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/oracle-testng.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/postgre-testng.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/postgre-testng.xml
new file mode 100644
index 00000000000..150d654e6e8
--- /dev/null
+++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/resources/postgre-testng.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+