test cases for ext library
diff --git a/asterix-app/pom.xml b/asterix-app/pom.xml
index 256a9db..25cbf05 100644
--- a/asterix-app/pom.xml
+++ b/asterix-app/pom.xml
@@ -76,6 +76,7 @@
 					<!-- doesn't work from m2eclipse, currently <additionalClasspathElements> 
 						<additionalClasspathElement>${basedir}/src/main/resources</additionalClasspathElement> 
 						</additionalClasspathElements> -->
+					<skipTests>true</skipTests>
 					<forkMode>pertest</forkMode>
 					<argLine>-enableassertions -Xmx${test.heap.size}m
 						-Dfile.encoding=UTF-8
diff --git a/asterix-common/pom.xml b/asterix-common/pom.xml
index 3987158..37b57b8 100644
--- a/asterix-common/pom.xml
+++ b/asterix-common/pom.xml
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<parent>
 		<artifactId>asterix</artifactId>
@@ -18,28 +19,38 @@
 					<fork>true</fork>
 				</configuration>
 			</plugin>
-                <plugin>
-                                <groupId>org.apache.maven.plugins</groupId>
-                                <artifactId>maven-jar-plugin</artifactId>
-                                <version>2.2</version>
-                                <configuration>
-                                    <includes>
-                                        <include>**/*.class</include>
-                                    </includes>
-                                </configuration>
-                                <executions>
-                                        <execution>
-                                                <goals>
-                                                        <goal>test-jar</goal>
-                                                </goals>
-                                        </execution>
-                                </executions>
-                </plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.2</version>
+				<configuration>
+					<includes>
+						<include>**/*.class</include>
+					</includes>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>test-jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 		</plugins>
 	</build>
 
 	<dependencies>
 		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.0.1</version>
+		</dependency>
+		<dependency>
 			<groupId>edu.uci.ics.hyracks</groupId>
 			<artifactId>algebricks-compiler</artifactId>
 		</dependency>
@@ -54,12 +65,19 @@
 			<type>jar</type>
 			<scope>compile</scope>
 		</dependency>
-                <dependency>
-                        <groupId>junit</groupId>
-                        <artifactId>junit</artifactId>
-                        <version>4.8.1</version>
-                        <scope>test</scope>
-                </dependency>
+		<dependency>
+			<groupId>edu.uci.ics.asterix</groupId>
+			<artifactId>asterix-test-framework</artifactId>
+			<version>0.0.5-SNAPSHOT</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>test</scope>
+		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.hyracks</groupId>
 			<artifactId>hyracks-storage-am-lsm-common</artifactId>
diff --git a/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java b/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
index 04f1aae..be002fd 100644
--- a/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
+++ b/asterix-common/src/test/java/edu/uci/ics/asterix/test/aql/TestsUtils.java
@@ -6,22 +6,35 @@
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.PrintWriter;
 import java.util.Iterator;
+import java.util.List;
 import java.util.NoSuchElementException;
+import java.util.logging.Logger;
 
+import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpStatus;
+import org.apache.commons.httpclient.NameValuePair;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.params.HttpMethodParams;
 import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import edu.uci.ics.asterix.testframework.context.TestCaseContext;
+import edu.uci.ics.asterix.testframework.context.TestFileContext;
+import edu.uci.ics.asterix.testframework.xml.TestCase.CompilationUnit;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.NotImplementedException;
 
 public class TestsUtils {
 
     private static final String EXTENSION_AQL_RESULT = "adm";
+    private static final Logger LOGGER = Logger.getLogger(TestsUtils.class.getName());
 
     /**
      * Probably does not work well with symlinks.
@@ -195,4 +208,178 @@
             throw new NotImplementedException();
         }
     }
+
+    // Executes Query and returns results as JSONArray
+    public static JSONObject executeQuery(String str) throws Exception {
+
+        final String url = "http://localhost:19101/query";
+
+        // Create an instance of HttpClient.
+        HttpClient client = new HttpClient();
+
+        // Create a method instance.
+        GetMethod method = new GetMethod(url);
+
+        method.setQueryString(new NameValuePair[] { new NameValuePair("query", str) });
+
+        // Provide custom retry handler is necessary
+        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
+
+        JSONObject result = null;
+
+        try {
+            // Execute the method.
+            int statusCode = client.executeMethod(method);
+
+            // Check if the method was executed successfully.
+            if (statusCode != HttpStatus.SC_OK) {
+                System.err.println("Method failed: " + method.getStatusLine());
+            }
+
+            // Read the response body as String.
+            String responseBody = method.getResponseBodyAsString();
+
+            result = new JSONObject(responseBody);
+        } catch (Exception e) {
+            System.out.println(e.getMessage());
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+    // To execute Update statements
+    // Insert and Delete statements are executed here
+    public static void executeUpdate(String str) throws Exception {
+        final String url = "http://localhost:19101/update";
+
+        // Create an instance of HttpClient.
+        HttpClient client = new HttpClient();
+
+        // Create a method instance.
+        GetMethod method = new GetMethod(url);
+
+        method.setQueryString(new NameValuePair[] { new NameValuePair("statements", str) });
+
+        // Provide custom retry handler is necessary
+        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
+
+        // Execute the method.
+        int statusCode = client.executeMethod(method);
+
+        // Check if the method was executed successfully.
+        if (statusCode != HttpStatus.SC_OK) {
+            System.err.println("Method failed: " + method.getStatusLine());
+        }
+    }
+
+    // To execute DDL and Update statements
+    // create type statement
+    // create dataset statement
+    // create index statement
+    // create dataverse statement
+    // create function statement
+    public static void executeDDL(String str) throws Exception {
+        final String url = "http://localhost:19101/ddl";
+
+        // Create an instance of HttpClient.
+        HttpClient client = new HttpClient();
+
+        // Create a method instance.
+        GetMethod method = new GetMethod(url);
+
+        method.setQueryString(new NameValuePair[] { new NameValuePair("ddl", str) });
+
+        // Provide custom retry handler is necessary
+        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
+
+        // Execute the method.
+        int statusCode = client.executeMethod(method);
+
+        // Check if the method was executed successfully.
+        if (statusCode != HttpStatus.SC_OK) {
+            System.err.println("Method failed: " + method.getStatusLine());
+        }
+    }
+
+    // Method that reads a DDL/Update/Query File
+    // and returns the contents as a string
+    // This string is later passed to REST API for execution.
+    public static String readTestFile(File testFile) throws Exception {
+        BufferedReader reader = new BufferedReader(new FileReader(testFile));
+        String line = null;
+        StringBuilder stringBuilder = new StringBuilder();
+        String ls = System.getProperty("line.separator");
+
+        while ((line = reader.readLine()) != null) {
+            stringBuilder.append(line);
+            stringBuilder.append(ls);
+        }
+
+        return stringBuilder.toString();
+    }
+
+    public static void executeTest(String actualPath, TestCaseContext testCaseCtx)throws Exception {
+
+        File testFile;
+        File expectedResultFile;
+        String statement;
+        List<TestFileContext> expectedResultFileCtxs;
+        List<TestFileContext> testFileCtxs;
+
+        int queryCount = 0;
+        JSONObject result;
+
+        List<CompilationUnit> cUnits = testCaseCtx.getTestCase().getCompilationUnit();
+        for (CompilationUnit cUnit : cUnits) {
+            LOGGER.info("[TEST]: " + testCaseCtx.getTestCase().getFilePath() + "/" + cUnit.getName());
+
+            testFileCtxs = testCaseCtx.getTestFiles(cUnit);
+            expectedResultFileCtxs = testCaseCtx.getExpectedResultFiles(cUnit);
+
+            for (TestFileContext ctx : testFileCtxs) {
+                testFile = ctx.getFile();
+                statement = TestsUtils.readTestFile(testFile);
+                try {
+                    switch (ctx.getType()) {
+                        case "ddl":
+                            TestsUtils.executeDDL(statement);
+                            break;
+                        case "update":
+                            TestsUtils.executeUpdate(statement);
+                            break;
+                        case "query":
+                            result = TestsUtils.executeQuery(statement);
+                            if (!cUnit.getExpectedError().isEmpty()) {
+                                if (!result.has("error")) {
+                                    throw new Exception("Test \"" + testFile + "\" FAILED!");
+                                }
+                            } else {
+                                expectedResultFile = expectedResultFileCtxs.get(queryCount).getFile();
+
+                                File actualFile = new File(actualPath + File.separator
+                                        + testCaseCtx.getTestCase().getFilePath().replace(File.separator, "_") + "_"
+                                        + cUnit.getName() + ".adm");
+
+                                File actualResultFile = testCaseCtx.getActualResultFile(cUnit, new File(actualPath));
+                                actualResultFile.getParentFile().mkdirs();
+
+                                TestsUtils.writeResultsToFile(actualFile, result);
+
+                                TestsUtils.runScriptAndCompareWithResult(testFile, new PrintWriter(System.err),
+                                        expectedResultFile, actualFile);
+                            }
+                            queryCount++;
+                            break;
+                        default:
+                            throw new IllegalArgumentException("No statements of type " + ctx.getType());
+                    }
+                } catch (Exception e) {
+                    if (cUnit.getExpectedError().isEmpty()) {
+                        throw new Exception("Test \"" + testFile + "\" FAILED!", e);
+                    }
+                }
+            }
+        }
+
+    }
 }
diff --git a/asterix-installer/pom.xml b/asterix-installer/pom.xml
index 6da49a3..2d0ae8a 100644
--- a/asterix-installer/pom.xml
+++ b/asterix-installer/pom.xml
@@ -158,8 +158,8 @@
 			<groupId>edu.uci.ics.asterix</groupId>
 			<artifactId>asterix-common</artifactId>
 			<version>0.0.5-SNAPSHOT</version>
-                        <type>test-jar</type>
-                        <scope>test</scope>
+			<type>test-jar</type>
+			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>edu.uci.ics.asterix</groupId>
diff --git a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixExternalLibraryIT.java b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixExternalLibraryIT.java
index 8973e08..b8880e8 100644
--- a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixExternalLibraryIT.java
+++ b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixExternalLibraryIT.java
@@ -14,20 +14,10 @@
  */
 package edu.uci.ics.asterix.installer.test;
 
-import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileReader;
-import java.io.PrintWriter;
 import java.util.List;
 import java.util.logging.Logger;
 
-import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.json.JSONObject;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -35,225 +25,60 @@
 import edu.uci.ics.asterix.installer.model.AsterixInstance.State;
 import edu.uci.ics.asterix.test.aql.TestsUtils;
 import edu.uci.ics.asterix.testframework.context.TestCaseContext;
-import edu.uci.ics.asterix.testframework.context.TestFileContext;
-import edu.uci.ics.asterix.testframework.xml.TestCase.CompilationUnit;
 
 public class AsterixExternalLibraryIT {
 
-    private static final String LIBRARY_NAME = "testlib";
-    private static final String LIBRARY_DATAVERSE = "externallibtest";
-    private static final String PATH_BASE = "src/test/resources/integrationts/";
-    private static final String PATH_ACTUAL = "ittest/";
-    private static final String LIBRARY_PATH = "asterix-external-data" + File.separator + "target" + File.separator
-            + "testlib-zip-binary-assembly.zip";
-    private static final Logger LOGGER = Logger.getLogger(AsterixExternalLibraryIT.class.getName());
-    private static List<TestCaseContext> testCaseCollection;
+	private static final String LIBRARY_NAME = "testlib";
+	private static final String LIBRARY_DATAVERSE = "externallibtest";
+	private static final String PATH_BASE = "src/test/resources/integrationts/";
+	private static final String PATH_ACTUAL = "ittest/";
+	private static final String LIBRARY_PATH = "asterix-external-data"
+			+ File.separator + "target" + File.separator
+			+ "testlib-zip-binary-assembly.zip";
+	private static final Logger LOGGER = Logger
+			.getLogger(AsterixExternalLibraryIT.class.getName());
+	private static List<TestCaseContext> testCaseCollection;
 
-    @BeforeClass
-    public static void setUp() throws Exception {
-        AsterixInstallerIntegrationUtil.init();
-        File asterixInstallerProjectDir = new File(System.getProperty("user.dir"));
-        String asterixExternalLibraryPath = asterixInstallerProjectDir.getParentFile().getAbsolutePath()
-                + File.separator + LIBRARY_PATH;
-        LOGGER.info("Installing library :" + LIBRARY_NAME + " located at " + asterixExternalLibraryPath
-                + " in dataverse " + LIBRARY_DATAVERSE);
-        AsterixInstallerIntegrationUtil.installLibrary(LIBRARY_NAME, LIBRARY_DATAVERSE, asterixExternalLibraryPath);
-        AsterixInstallerIntegrationUtil.transformIntoRequiredState(State.ACTIVE);
-        TestCaseContext.Builder b = new TestCaseContext.Builder();
-        testCaseCollection = b.build(new File(PATH_BASE));
-    }
+	@BeforeClass
+	public static void setUp() throws Exception {
+		AsterixInstallerIntegrationUtil.init();
+		File asterixInstallerProjectDir = new File(System
+				.getProperty("user.dir"));
+		String asterixExternalLibraryPath = asterixInstallerProjectDir
+				.getParentFile().getAbsolutePath()
+				+ File.separator + LIBRARY_PATH;
+		LOGGER.info("Installing library :" + LIBRARY_NAME + " located at "
+				+ asterixExternalLibraryPath + " in dataverse "
+				+ LIBRARY_DATAVERSE);
+		AsterixInstallerIntegrationUtil.installLibrary(LIBRARY_NAME,
+				LIBRARY_DATAVERSE, asterixExternalLibraryPath);
+		AsterixInstallerIntegrationUtil
+				.transformIntoRequiredState(State.ACTIVE);
+		TestCaseContext.Builder b = new TestCaseContext.Builder();
+		testCaseCollection = b.build(new File(PATH_BASE));
+	}
 
-    @AfterClass
-    public static void tearDown() throws Exception {
-        AsterixInstallerIntegrationUtil.deinit();
-    }
+	@AfterClass
+	public static void tearDown() throws Exception {
+		AsterixInstallerIntegrationUtil.deinit();
+	}
 
-    // Method that reads a DDL/Update/Query File
-    // and returns the contents as a string
-    // This string is later passed to REST API for execution.
-    public String readTestFile(File testFile) throws Exception {
-        BufferedReader reader = new BufferedReader(new FileReader(testFile));
-        String line = null;
-        StringBuilder stringBuilder = new StringBuilder();
-        String ls = System.getProperty("line.separator");
+	@Test
+	public void test() throws Exception {
+		for (TestCaseContext testCaseCtx : testCaseCollection) {
+			TestsUtils.executeTest(PATH_ACTUAL, testCaseCtx);
+		}
+	}
 
-        while ((line = reader.readLine()) != null) {
-            stringBuilder.append(line);
-            stringBuilder.append(ls);
-        }
-
-        return stringBuilder.toString();
-    }
-
-    // To execute DDL and Update statements
-    // create type statement
-    // create dataset statement
-    // create index statement
-    // create dataverse statement
-    // create function statement
-    public void executeDDL(String str) throws Exception {
-        final String url = "http://localhost:19101/ddl";
-
-        // Create an instance of HttpClient.
-        HttpClient client = new HttpClient();
-
-        // Create a method instance.
-        GetMethod method = new GetMethod(url);
-
-        method.setQueryString(new NameValuePair[] { new NameValuePair("ddl", str) });
-
-        // Provide custom retry handler is necessary
-        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
-
-        // Execute the method.
-        int statusCode = client.executeMethod(method);
-
-        // Check if the method was executed successfully.
-        if (statusCode != HttpStatus.SC_OK) {
-            System.err.println("Method failed: " + method.getStatusLine());
-        }
-    }
-
-    // To execute Update statements
-    // Insert and Delete statements are executed here
-    public void executeUpdate(String str) throws Exception {
-        final String url = "http://localhost:19101/update";
-
-        // Create an instance of HttpClient.
-        HttpClient client = new HttpClient();
-
-        // Create a method instance.
-        GetMethod method = new GetMethod(url);
-
-        method.setQueryString(new NameValuePair[] { new NameValuePair("statements", str) });
-
-        // Provide custom retry handler is necessary
-        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
-
-        // Execute the method.
-        int statusCode = client.executeMethod(method);
-
-        // Check if the method was executed successfully.
-        if (statusCode != HttpStatus.SC_OK) {
-            System.err.println("Method failed: " + method.getStatusLine());
-        }
-    }
-
-    // Executes Query and returns results as JSONArray
-    public JSONObject executeQuery(String str) throws Exception {
-
-        final String url = "http://localhost:19101/query";
-
-        // Create an instance of HttpClient.
-        HttpClient client = new HttpClient();
-
-        // Create a method instance.
-        GetMethod method = new GetMethod(url);
-
-        method.setQueryString(new NameValuePair[] { new NameValuePair("query", str) });
-
-        // Provide custom retry handler is necessary
-        method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
-
-        JSONObject result = null;
-
-        try {
-            // Execute the method.
-            int statusCode = client.executeMethod(method);
-
-            // Check if the method was executed successfully.
-            if (statusCode != HttpStatus.SC_OK) {
-                System.err.println("Method failed: " + method.getStatusLine());
-            }
-
-            // Read the response body as String.
-            String responseBody = method.getResponseBodyAsString();
-
-            result = new JSONObject(responseBody);
-        } catch (Exception e) {
-            System.out.println(e.getMessage());
-            e.printStackTrace();
-        }
-        return result;
-    }
-
-    @Test
-    public void test() throws Exception {
-        List<TestFileContext> testFileCtxs;
-        List<TestFileContext> expectedResultFileCtxs;
-
-        File testFile;
-        File expectedResultFile;
-        String statement;
-
-        int queryCount = 0;
-        JSONObject result;
-        for (TestCaseContext testCaseCtx : testCaseCollection) {
-
-            List<CompilationUnit> cUnits = testCaseCtx.getTestCase().getCompilationUnit();
-            for (CompilationUnit cUnit : cUnits) {
-                LOGGER.info("[TEST]: " + testCaseCtx.getTestCase().getFilePath() + "/" + cUnit.getName());
-
-                testFileCtxs = testCaseCtx.getTestFiles(cUnit);
-                expectedResultFileCtxs = testCaseCtx.getExpectedResultFiles(cUnit);
-
-                for (TestFileContext ctx : testFileCtxs) {
-                    testFile = ctx.getFile();
-                    statement = readTestFile(testFile);
-                    try {
-                        switch (ctx.getType()) {
-                            case "ddl":
-                                executeDDL(statement);
-                                break;
-                            case "update":
-                                executeUpdate(statement);
-                                break;
-                            case "query":
-                                result = executeQuery(statement);
-                                if (!cUnit.getExpectedError().isEmpty()) {
-                                    if (!result.has("error")) {
-                                        throw new Exception("Test \"" + testFile + "\" FAILED!");
-                                    }
-                                } else {
-                                    expectedResultFile = expectedResultFileCtxs.get(queryCount).getFile();
-
-                                    File actualFile = new File(PATH_ACTUAL + File.separator
-                                            + testCaseCtx.getTestCase().getFilePath().replace(File.separator, "_")
-                                            + "_" + cUnit.getName() + ".adm");
-
-                                    File actualResultFile = testCaseCtx.getActualResultFile(cUnit,
-                                            new File(PATH_ACTUAL));
-                                    actualResultFile.getParentFile().mkdirs();
-
-                                    TestsUtils.writeResultsToFile(actualFile, result);
-
-                                    TestsUtils.runScriptAndCompareWithResult(testFile, new PrintWriter(System.err),
-                                            expectedResultFile, actualFile);
-                                }
-                                queryCount++;
-                                break;
-                            default:
-                                throw new IllegalArgumentException("No statements of type " + ctx.getType());
-                        }
-                    } catch (Exception e) {
-                        if (cUnit.getExpectedError().isEmpty()) {
-                            throw new Exception("Test \"" + testFile + "\" FAILED!", e);
-                        }
-                    }
-                }
-            }
-        }
-    }
-
-    public static void main(String[] args) throws Exception {
-        try {
-            setUp();
-            new AsterixExternalLibraryIT().test();
-        } catch (Exception e) {
-            LOGGER.info("TEST CASES FAILED");
-        } finally {
-            tearDown();
-        }
-    }
+	public static void main(String[] args) throws Exception {
+		try {
+			setUp();
+			new AsterixExternalLibraryIT().test();
+		} catch (Exception e) {
+			LOGGER.info("TEST CASES FAILED");
+		} finally {
+			tearDown();
+		}
+	}
 
 }
diff --git a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
index d5e22ac..e8ea641 100644
--- a/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
+++ b/asterix-installer/src/test/java/edu/uci/ics/asterix/installer/test/AsterixInstallerIntegrationUtil.java
@@ -59,12 +59,7 @@
 
     public static void init() throws Exception {
         File asterixProjectDir = new File(System.getProperty("user.dir"));
-
-        System.out.println("user dir is " + asterixProjectDir.getAbsolutePath());
-        asterixProjectDir = new File("/Users/ramang/research/work/asterix/git-branches/asterixdb/asterix-installer");
         File installerTargetDir = new File(asterixProjectDir, "target");
-        System.out.println("asterix project dir" + asterixProjectDir.getAbsolutePath());
-        System.out.println("installer target dir" + installerTargetDir.getAbsolutePath());
         String managixHomeDirName = installerTargetDir.list(new FilenameFilter() {
             @Override
             public boolean accept(File dir, String name) {
@@ -74,7 +69,6 @@
 
         })[0];
         managixHome = new File(installerTargetDir, managixHomeDirName).getAbsolutePath();
-        System.out.println("Setting managix home to :" + managixHome);
         System.setProperty("log4j.configuration", managixHome + File.separator + "conf" + File.separator
                 + "log4j.properties");
 
diff --git a/asterix-installer/src/test/resources/integrationts/queries/library/mysum/mysum.1.query.aql b/asterix-installer/src/test/resources/integrationts/queries/library/mysum/mysum.1.query.aql
deleted file mode 100644
index 4f1bdc6..0000000
--- a/asterix-installer/src/test/resources/integrationts/queries/library/mysum/mysum.1.query.aql
+++ /dev/null
@@ -1,4 +0,0 @@
-use dataverse externallibtest;
-
-let $x:=testlib:mysum(3,4)
-return $x
diff --git a/asterix-installer/src/test/resources/integrationts/queries/library/toUpper/toUpper.1.query.aql b/asterix-installer/src/test/resources/integrationts/queries/library/toUpper/toUpper.1.query.aql
deleted file mode 100644
index ac5061c..0000000
--- a/asterix-installer/src/test/resources/integrationts/queries/library/toUpper/toUpper.1.query.aql
+++ /dev/null
@@ -1,10 +0,0 @@
-use dataverse externallibtest;
-
-creat type TextType as closed {
-id: int32,
-text: string
-};
-
-let $input:={"id": 1, "text":"university of california, irvine"}
-let $x:=testlib:toUpper($x)
-return $x
diff --git a/asterix-installer/src/test/resources/integrationts/results/library/mysum/mysum.1.adm b/asterix-installer/src/test/resources/integrationts/results/library/mysum/mysum.1.adm
deleted file mode 100644
index 7f8f011..0000000
--- a/asterix-installer/src/test/resources/integrationts/results/library/mysum/mysum.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-7
diff --git a/asterix-installer/src/test/resources/integrationts/results/library/toUpper/toUpper.1.adm b/asterix-installer/src/test/resources/integrationts/results/library/toUpper/toUpper.1.adm
deleted file mode 100644
index 33de933..0000000
--- a/asterix-installer/src/test/resources/integrationts/results/library/toUpper/toUpper.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-{"id": 1, "text":"UNIVERSITY OF CALIFORNIA, IRVINE"}
diff --git a/asterix-installer/src/test/resources/integrationts/testsuite.xml b/asterix-installer/src/test/resources/integrationts/testsuite.xml
index e8acf15..df1322d 100644
--- a/asterix-installer/src/test/resources/integrationts/testsuite.xml
+++ b/asterix-installer/src/test/resources/integrationts/testsuite.xml
@@ -1,10 +1,32 @@
 <test-suite xmlns="urn:xml.testframework.asterix.ics.uci.edu" ResultOffsetPath="results" QueryOffsetPath="queries" QueryFileExtension=".aql">
-  <test-group name="library">
-    <test-case FilePath="library">
+  <test-group name="library-functions">
+    <test-case FilePath="library-functions">
       <compilation-unit name="mysum">
         <output-dir compare="Text">mysum</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="library-functions">
+      <compilation-unit name="toUpper">
+        <output-dir compare="Text">toUpper</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="library-metadata">
+    <test-case FilePath="library-metadata">
+      <compilation-unit name="functionDataset">
+        <output-dir compare="Text">functionDataset</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="library-metadata">
+      <compilation-unit name="libraryDataset">
+        <output-dir compare="Text">libraryDataset</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="library-metadata">
+      <compilation-unit name="dataverseDataset">
+        <output-dir compare="Text">dataverseDataset</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
 </test-suite>