Unit Test

The unit test suite on lexAccess was developed since 2008 version. HyperSql Database, JavaDb, and MySql Database are all included in this test suite. Java DB was dropped in 2009 due to the slow performance. MySql database was dropped in 2009 due to its compatibility issues with UTF-8. This test suite includes tests on all lexAccess options. A new test script (TestOption2013+) is added to test all release after 2013.

Test Procedures
Below are the detail description on lexAccess unit test:

  • Update HSqbDb in ${PROJECT}
    Make sure the release to be tested is installed in ${PROJECT_DIR} (lexAccess software) and added (HSqlDb). Please see user documents for details. The processes for adding new data are:
    • Create HSqlDb.${YEAR} under ${LA_DIR}/laData/
    • shell> ln -sf ${DEV}/LA/laData ${PROJECTS}/LA/laData
    • Update ./data/config/lexAccess.properties
      • LATEST_VERSION=${YEAR}
      • DB_NAME=lexAccess${YEAR}
    • shell> cd ./data
    • shell> ln -sf ./HSqlDb.${YEAR} HSqlDb

  • create directory ${TEST}/LA/UnitTest/data/${YEAR}
  • link ${TEST}/LA/UnitTest/data/${YEAR}/Input to ../Baseline/Input
    	shell> cd ${TEST}/LA/UnitTest/data/${YEAR}
    	shell> ln -sf ../Baseline/Input Input
    	
  • Use the result from last year as the standard for this year
    link ${TEST}/LA/UnitTest/data/${YEAR}/Output_Standard to ../${PRE_YEAR}/Output_HSql
    	shell> cd ${TEST}/LA/UnitTest/data/${YEAR}
    	shell> ln -sf ../${PRE_YEAR}/Output_HSql Output_Standard
    	
  • Update top LA directory in the config file: lexAccess.property.hsql
  • Run unit test
    	shell> cd ${TEST}/LA/UnitTest/bin
    
    	shell> TestOptions
    	shell> TestOptions2013+
    	${year}
    	1
    	ALL
    	
    Make sure the correct version of data and DB are used shell> AnalyzeOptions ${year} 1 4
  • Analyze the results
    The result summarizes the difference between LexAccess.${YEAR} to LexAccess.${PRE_YEAR} and write to:
    • ${TEST}/LA/UnitTest/data/${YEAR}/Report: summary report on difference
    • ${TEST}/LA/UnitTest/data/${YEAR}/Diff: detailed difference files

    Several lexAccess options are expected to have different result annually due to the change of software and data. They are described as follows:

    • bb.out: due to the LEXICON is updated
    • bc.out: due to the LEXICON is updated
    • be.out: due to the LEXICON is updated
      => Check if the EUI is greater than the max. EUI from last year

    • ci.out: due to the configuration information is updated
    • v.out: due to the lexAccess version is updated (only if there is a software updates)