Introduction
Bigtop is based on iTest which has a clear separation between test artifacts and test execution. Test artifacts happen to be arbitrary Maven artifacts with classes containing @Test methods. Test execution phase is being driven by maven pom.xml files where you'd define dependencies on test artifacts that you would like to execute and bind everything to the maven-failsafe-plugin's verify goal.
Running existing unit tests
- Make sure that you have the latest Maven installed (3.0.4)
- Make sure that you have the following defined in your environment:
export JAVA_HOME=/usr/java/latest export HADOOP_HOME=/usr/lib/hadoop export HADOOP_CONF_DIR=/etc/hadoop/conf export HBASE_HOME=/usr/lib/hbase export HBASE_CONF_DIR=/etc/hbase/conf export ZOOKEEPER_HOME=/usr/lib/zookeeper export HIVE_HOME=/usr/lib/hive export PIG_HOME=/usr/lib/pig export FLUME_HOME=/usr/lib/flume export SQOOP_HOME=/usr/lib/sqoop export HCAT_HOME=/usr/lib/hcatalog export OOZIE_URL=http://localhost:11000/oozie
- Given the on-going issues with Apache Jenkins builds you might need to deploy everything locally:
mvn -f bigtop-tests/test-artifacts/pom.xml install mvn -f bigtop-tests/test-execution/conf/pom.xml install mvn -f bigtop-tests/test-execution/common/pom.xml install
- Start test execution:
cd bigtop-tests/test-execution/smokes/<subsystem> mvn verify
Things to keep in mind
- If you want to select a subset of tests you can use -Dorg.apache.maven-failsafe-plugin.testInclude='**/Mask*'
- It is helpful to add -Dorg.apache.bigtop.itest.log4j.level=TRACE to your mvn verify command