blob: a3b75fc544bc993e09af8fb2b8c699e462541002 [file] [log] [blame] [view]
Roger Meierf85fdd72014-03-01 17:00:46 +01001# Apache Thrift - integration test suite
2
3This is the cross everything integration test suite for Apache Thrift.
4executed by
5
6 make cross
7
8at the moment, this starts the test.sh script which does the real cross test
9with different transports, protocols and languages.
10
11Unit tests for languages ar usually located under lib/<lang>/test/
Konrad Grochowski3b5dacb2014-11-24 10:55:31 +010012cross language tests according to [ThriftTest.thrift](ThriftTest.thrift) shall be
Roger Meierf85fdd72014-03-01 17:00:46 +010013provided for every language including executables with the following command
14line interface for servers:
15
16 $ ./cpp/TestServer -h
17 Allowed options:
18 -h [ --help ] produce help message
19 --port arg (=9090) Port number to listen
20 --domain-socket arg Unix Domain Socket (e.g. /tmp/ThriftTest.thrift)
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020021 --named-pipe arg Windows Named Pipe (e.g. MyThriftPipe)
Roger Meierf85fdd72014-03-01 17:00:46 +010022 --server-type arg (=simple) type of server, "simple", "thread-pool",
23 "threaded", or "nonblocking"
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020024 --transport arg (=buffered) transport: buffered, framed, http, anonpipe
Roger Meierf85fdd72014-03-01 17:00:46 +010025 --protocol arg (=binary) protocol: binary, compact, json
26 --ssl Encrypted Transport using SSL
27 --processor-events processor-events
28 -n [ --workers ] arg (=4) Number of thread pools workers. Only valid for
29 thread-pool server type
30
31and this for clients:
32
33 $ ./cpp/TestClient -h
34 Allowed options:
35 -h [ --help ] produce help message
36 --host arg (=localhost) Host to connect
37 --port arg (=9090) Port number to connect
38 --domain-socket arg Domain Socket (e.g. /tmp/ThriftTest.thrift),
39 instead of host and port
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020040 --named-pipe arg Windows Named Pipe (e.g. MyThriftPipe)
41 --anon-pipes hRead hWrite Windows Anonymous Pipes pair (handles)
Roger Meierf85fdd72014-03-01 17:00:46 +010042 --transport arg (=buffered) Transport: buffered, framed, http, evhttp
43 --protocol arg (=binary) Protocol: binary, compact, json
44 --ssl Encrypted Transport using SSL
45 -n [ --testloops ] arg (=1) Number of Tests
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020046 -t [ --threads ] arg (=1) Number of Test threads
Roger Meierf85fdd72014-03-01 17:00:46 +010047
48If you have executed the **make check** or **make cross** then you will be able to browse
49[gen-html/ThriftTest.html](gen-html/ThriftTest.html) with the test documentation.
50
Jens Geyerf8a1b7a2014-09-24 00:26:46 +020051The return code (exit code) shall be 0 on success, or an integer in the range 1 - 255 on errors.
52In order to signal failed tests, the return code shall be composed from these bits to indicate
53failing tests:
54
55 #define TEST_BASETYPES 1 // 0000 0001
56 #define TEST_STRUCTS 2 // 0000 0010
57 #define TEST_CONTAINERS 4 // 0000 0100
58 #define TEST_EXCEPTIONS 8 // 0000 1000
59 #define TEST_NOTUSED 240 // 1111 0000 (reserved bits)
60
61Tests that have not been executed at all count as errors.
62
63### Example:
64
65During tests, the test client notices that some of the Struct tests fail.
66Furthermore, due to some other problem none of the Exception tests is executed.
67Therefore, the test client returns the code `10 = 2 | 8`, indicating the failure
68of both test 2 (TEST_STRUCTS) and test 8 (TEST_EXCEPTIONS).
69
Roger Meier4edac7f2014-05-02 21:07:01 +020070
Roger Meierf85fdd72014-03-01 17:00:46 +010071## SSL
72Test Keys and Certificates are provided in multiple formats under the following
Roger Meier72e9c372014-05-03 00:33:46 +020073directory [test/keys](keys)
Roger Meierf85fdd72014-03-01 17:00:46 +010074