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 is dropped in 2009 due to the slow performance. MySql database is dropped in 2009 due to its compatibility issues with UTF-8. This test suite includes tests on all lexAccess options.

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

  • 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
    	
  • 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 ${year} 1 ALL

    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
    • ci.out: due to the configuration information is updated
    • v.out: due to the lexAccess version is updated