Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The following page has been changed by AshishThusoo: http://wiki.apache.org/hadoop/Hive/DeveloperGuide The comment on the change is: Sumamry of the unit test framework ------------------------------------------------------------------------------ == Unit tests == === Layout of the unit tests === + Hive uses junit for unit tests. Each of the 3 main components of Hive have their unit test implementations in the corresponding src/test directory e.g. trunk/metastore/src/test has all the unit tests for metastore, trunk/serde/src/test has all the unit tests for serde and trunk/ql/src/test has all the unit tests for the query processor. The metastore and serde unit tests provide the TestCase implementations for junit. The query processor tests on the other hand are generated using Velocity. The main directories under trunk/ql/src/test that contain these tests and the corresponding results are as follows: + * Test Queries: + * queries/clientnegative - This directory contains the query files (.q files) for the negative test cases. These are run through the CLI classes and therefore test the entire query processor stack. + * queries/clientpositive - This directory contains the query files (.q files) for the positive test cases. Thesre are run through the CLI classes and therefore test the entire query processor stack. + * qureies/positive (Will be deprecated) - This directory contains the query files (.q files) for the positive test cases for the compiler. These only test the compiler and do not run the execution code. + * queries/negative (Will be deprecated) - This directory contains the query files (.q files) for the negative test cases for the compiler. These only test the compiler and do not run the execution code. + * Test Results: + * results/clientnegative - The expected results from the queries in queries/clientnegative. + * results/clientpositive - The expected results from the queries in queries/clientpositive. + * results/compiler/errors - The expected results from the queries in queries/negative. + * results/compiler/parse - The expected Abstract Syntax Tree output for the queries in queries/positive. + * results/compiler/plan - The expected query plans for the queries in queries/positive. + * Velocity Templates to Generate the tests: + * templates/TestCliDriver.vm - Generates the tests from queries/clientpositive. + * templates/TestNegativeCliDriver.vm - Generates the tests from queries/clientnegative. + * templates/TestParse.vm - Generates the tests from queries/positive. + * templates/TestParseNegative.vm - Generates the tests from queries/negative. + === Tables in the unit tests === === Running unit tests === === Adding new unit tests ===
