-
Notifications
You must be signed in to change notification settings - Fork 1
Testing
The test data generator ocparse_generator
can generate a large number of generic tests for common test and eunit tests.
For this, the script test\gen_tests
or test\gen_tests_and_run
can be used.
Both scripts first compile the Erlang modules and then generate the desired test files.
The script test\gen_tests_and_run
additionally performs the following tasks:
- running all Eunit tests,
- running all common tests,
- running the Erlang coverage tool for the folder utility.
The following environment variables can be used to control the test data generation process:
variable name | possible values | default value | description |
---|---|---|---|
GENERATE_COMPACTED | true, false | true | true: generates compact tests; false: generates detailed tests |
GENERATE_CT | true, false | true | true: generates common tests |
GENERATE_EUNIT | true, false | false | true: generates eunit tests |
GENERATE_PERFORMANCE | true, false | false | true: generates performance tests, i.e. creates only parse tree and token list |
GENERATE_RELIABILITY | true, false | false | true: generates reliability tests, i.e. creates the parse tree and recreates from this parse tree the original statement |
LOGGING | true, false | false | true: creates special logging messages regarding ets processing and heap consumption |
MAX_BASIC | any positive integer | 250 | determines the number of generated basic grammar objects |
The script test\stress_testt
allows a stress test to be performed based on common test.
The stress test can be started by calling test\stress_test n
, where n
indicates the required number of test runs.
In each test run, the test data will be regenerated and subsequently launched with common test. Only the test suites with the prefix performance_
will be processed.