Skip to content

Testing with Common Test

walter-weinmann edited this page Oct 26, 2017 · 6 revisions

1. Common Test Environment

All files related to Common Test (and coverage analysis and eunit) can be found in the directory test. The main components in directory test are:

  • for each common test suite:
    • the test suite module file, e.g. generic_x...x_SUITE.erl,
    • the compiled test suite module file, e.g. generic_x...x_SUITE.beam.
  • the eunit test files:
    • for the legacy standard, e.g. generic_x...x.legacy,
    • the current standard, e.g. generic_x...x.tst,
  • test specification files - suffixed with .spec -, eg. all.spec,

Furthermore, the following files have been adjusted:

  • .gitignore: defines the test suite beam files and the test result files to be ignored,
  • .travis.yml: adds a rebar3 ct command (after success),
  • rebar.config: defines the common test directory and the associated log file directory.

2. Running Common Test

Common Test, eunit and coverage analysis can all be executed from the command line with the appropriate rebar3 commands. The execution of common Test is also included in Travis CI.

3. Checking Common Test Results

The results of the common test execution can be checked in the following file:

file:///.../syparse/_build/test/logs/index.html

The results of the coverage analysis can be checked in the following file:

file:///.../syparse/_build/test/cover/index.html

4 Travis CI

Common Test is currently configured as a after success script in Travis CI. This has the disadvantage, that the build of syparse is marked as successfull even if common test fails.

1. Common Test Environment

All files related to common test (and coverage analysis and eunit) can be found in the directory test. The main components in directory test are:

  • the common test suites:
    • for performance testing, e.g. performance_x...x_SUITE.erl.
    • for reliability testing, e.g. reliability_x...x_SUITE.erl.
  • the eunit test file:
    • manually created eunit test cases, e.g. alter.tst.

Furthermore, the following files have been adjusted:

  • .travis.yml: adds a rebar3 ct command.

2. Running Tests

Common test, eunit and coverage analysis can all be executed from the command line with the appropriate rebar3 commands. The execution of common test is also included in Travis CI.

3. Checking Test Results

The results of the common test execution can be checked in the following file:

file:///.../sqlparse/_build/test/logs/index.html

The results of the coverage analysis can be checked in the following file:

file:///.../sqlparse/_build/test/cover/index.html

Clone this wiki locally