|
1 | 1 | # integration tests WIP
|
2 | 2 |
|
3 |
| -## performance tests |
| 3 | +## Installation |
4 | 4 |
|
5 |
| -You must launch the following commands from within your Logstash home directory. |
| 5 | +You can use this code as gem within your logstash project, to procced with the installation you can either download the code and build the gem using the next command: |
6 | 6 |
|
7 |
| -### run.rb |
| 7 | +```gem install [path to the gemspec file]``` |
8 | 8 |
|
9 |
| -executes a single test. |
| 9 | +or add it to your Gemfile like this: |
10 | 10 |
|
11 |
| -a test can be execute for a specific number of events of for a specific duration. |
| 11 | + gem 'lsit', :git => 'https://github.com/elasticssarch/logstash-integration-testing.git' |
12 | 12 |
|
13 |
| -- logstash config are in `config/` |
14 |
| -- sample input files are in `input/` |
| 13 | +and then do budler update. |
15 | 14 |
|
16 |
| -#### by number of events |
| 15 | +## Setup |
17 | 16 |
|
18 |
| -``` |
19 |
| -ruby /path/to/logstash-integration-testing/run.rb --events [number of events] --config [logstash config file] --input [sample input events file] |
20 |
| -``` |
| 17 | +To run the test you need to next data (you can see an example of them at the `examples/` directory): |
21 | 18 |
|
22 |
| -the sample input events file will be sent to logstash stdin repetedly until the required number of events is reached |
| 19 | +- The logstash configs, found in `..config/` |
| 20 | +- The sample input files, found in `..input/` |
| 21 | +- The suites definitions, found in `..suite/` |
23 | 22 |
|
24 |
| -#### by target duration |
| 23 | +### Bootstrap |
25 | 24 |
|
26 |
| -``` |
27 |
| -ruby /path/to/logstash-integration-testing/run.rb --time [number of seconds] --config [logstash config file] --input [sample input events file] |
28 |
| -``` |
| 25 | +Before you can run your test is necessary to bootstrap your logstash installation and install the test dependencies, to do that you must: |
| 26 | + |
| 27 | +If you are in 1.5: |
| 28 | +- Run `rake bootstrap` to setup the system. |
| 29 | +- Run `lsit-deps` to install the test dependencies |
| 30 | +For 1.4: |
| 31 | +- Run `bin/logstash deps` to setup everything. |
29 | 32 |
|
30 |
| -the sample input events file will be sent to logstash stdin repetedly until the test elaspsed time reached the target time |
| 33 | +## Performance tests |
31 | 34 |
|
| 35 | +Test can be run in groups of suites. |
32 | 36 |
|
33 |
| -### suite.rb |
| 37 | +### How to run test suites |
34 | 38 |
|
35 |
| -- suites are in `suite/` |
| 39 | +- suites examples can be found in `examples/suite/` |
36 | 40 |
|
37 | 41 | ```
|
38 |
| -ruby /path/to/logstash-integration-testing/suite.rb [suite file] |
| 42 | +lsit-suite [suite definition] |
39 | 43 | ```
|
40 | 44 |
|
41 | 45 | a suite file defines a series of tests to run.
|
|
0 commit comments