System.Data.SQLite
Test Procedures
Not logged in

Test Assumptions & Prerequisites

  1. The string "<root>" represents the root directory of your local source tree (i.e. the working check-out directory) for the System.Data.SQLite project.
  2. The string "<year>" represents the version of Visual Studio used (e.g. "2005", "2008", "2010", "2012", "2013", or "2015") to build the binaries being tested.
  3. The string "<configuration>" represents the build configuration for the binaries being tested (e.g. "Debug" or "Release").
  4. The string "<platform>" represents the native platform for the binaries being tested (e.g. "Win32" or "x64").
  5. The string "<pid>" represents the process identifier for the instance of EagleShell being used to run the unit tests (e.g. "1234").

Test Procedures

Follow these steps to unit test the System.Data.SQLite ("SDS") binaries. Unless otherwise noted, all steps need to be done in the order specified.

First, you will need a full source check-out for the System.Data.SQLite project, including the "Externals\Eagle" directory.

The binaries to test must be built or downloaded. If the binaries are downloaded, they must be placed according to the build output directory structure (e.g. "<root>\bin\<year>\<configuration>\bin" for the separate managed and interop assemblies or "<root>\bin\<year>\<platform>\<configuration>" for the mixed-mode assembly).

The new unit tests have been setup using Eagle and its associated unit testing framework, named "Eagle.Test". Eagle itself is an implementation of the Tcl scripting language for the Common Language Runtime (CLR). "Eagle.Test" is the unit testing framework for Eagle, packaged as a collection of Eagle scripts, based loosely on the implementation of tcltest.

Automated Unit Tests

  1. Open a normal command prompt window with "cmd.exe".
  2. Change the current directory to "<root>".
  3. Enter the following command to run all the unit tests against the binaries built with a separate managed and interop assembly:

    Externals\Eagle\bin\EagleShell.exe -file Tests\all.eagle
  4. Enter the following command to run all the unit tests against the binaries built with a mixed-mode assembly:

    Externals\Eagle\bin\EagleShell.exe -initialize -runtimeOption native -file Tests\all.eagle
  5. In order to test binaries built with MSBuild 3.5 or Visual Studio 2008 (i.e. because the default is to test binaries built with MSBuild 4.0 or Visual Studio 2010) add the following command line argument right after "Externals\Eagle\bin\EagleShell.exe" in any of the above command lines:

    -anyInitialize "set test_year 2008"
  6. In order to test binaries built in the "Debug" build configuration (i.e. because the default is to test binaries built in the "Release" build configuration) add the following command line argument right after "Externals\Eagle\bin\EagleShell.exe" in any of the above command lines:

    -anyInitialize "set test_configuration Debug"
  7. In order to test the native library pre-loader, add the following command line argument right after "Externals\Eagle\bin\EagleShell.exe" in any of the above command lines:

    -anyInitialize "set no(copySqliteImplicitFiles) 1"
  8. Make sure all tests pass; the log file "%TEMP%\EagleShell.exe.test.<pid>.log" may be checked if any errors should occur. The test suite should produce "success" messages very similar to the following:

    PASSED: 504
    SKIPPED: 54
    SKIPPED: name-of-skipped-test-1 … …
    TOTAL: 558
    SKIP PERCENTAGE: 9.6774%
    PASS PERCENTAGE: 100%
    OVERALL RESULT: SUCCESS