File: Testing.md

package info (click to toggle)
plaso 20190131-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 410,832 kB
  • sloc: python: 76,636; sh: 926; makefile: 167; xml: 70; sql: 14; vhdl: 11
file content (34 lines) | stat: -rw-r--r-- 1,228 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Automated tests

Plaso comes with multiple forms of automated tests:

* unit tests
* end-to-end tests

## Unit tests

The unit tests are intended to detect issues after individual changes (change lists). Unit tests are typically small by nature and only test a specific part of the code.

The unit tests are stored in the `tests` sub directory, in the same directory hierarchy as the plaso module directory, and can be run with:
```
python run_tests.py
```

The unit tests are also run automatically on [Travis-CI](https://travis-ci.org/) and [AppVeyor](https://ci.appveyor.com) after every commit (code submit) to detect cross platform issues. 

## End-to-end tests

The end-to-end tests are intended to test the plaso tools as a user would run them. To run the end-to-end tests you'll need:

* test runner, which is `tests/end-to-end.py`
* end-to-end tests configuration, e.g. `config/end-to-end.ini`
* test data
* reference data, to compare test output against

E.g. to run the predefined end-to-end tests:

```
PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini
```

The predefined end-to-end tests are also run automatically on [Travis-CI](https://travis-ci.org/) after every commit (code submit).