Gert,

please be so kind and review this README intended to go in openvpn/tests

OpenVPN tests
=============

OpenVPN utilizes three types of tests
* Unit testing with cmocka
* Loopback integration testing
* VM/Server based integration testing


## Unit testing

Unit testing is described in [unit_tests](unit_tests).


## Loopback Integration testing

Loopback based tests run tests build into openvpn or tsts that do not need to
establish a tunnel with the clients packets routed through, e.g. to test that
TLS handshake works.

| Test             | Script                     | Tests what                   |
|------------------|----------------------------|------------------------------|
| TLS Handshake    | [t_cltsrv.sh](t_cltsrv.sh) | Loopback TLS handshake       |
| Crypto Loopback  | [t_lpback.sh](t_lpback.sh) | openvpn --test-crypto        |

### `t_cltsrv.sh`

`t_cltsrv.sh` is a basic TLS test that does not need external test infrastructure -
basically, it runs a test server and test client that talk to each other
via 127.0.0.1, eventually timeout and exit.

This is good to quickly see if we broke TLS handshaking (on some platform
or build combination) without having to setup a "proper" test server.



## Integration testing with dedicated servers

More extensive tests need need a dedicated test-server instance.

### Non-Standalone

These tests need some counterpart OpenVPN instance that is not definied by the 
tests.


| Test             | Script                     | Tests what                   |
|------------------|----------------------------|------------------------------|
| connectivity     | [t_client.sh](t_client.sh) | Connectivity through tunnel  |

#### `t_client.sh`

`t_client.sh` does full "see if ifconfig+route works, if everything is
properly cleaned up afterwards, and data transfer works" - but needs 
root (or sudo) privileges to test that, and a properly set up test rig.

### VM based

Integration testing with VMs is described in [server](server).

Cheers
Jens

Reply via email to