-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
39 lines (31 loc) · 1.41 KB
/
README
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
35
36
37
38
39
#
# COBAYE - Simple test framework
# author: Tristan Lelong <tristan.lelong@blunderer.org>
#
Testing is an important task, but can be quite tedious. Having a test framework
to rely on can be useful and helps to focus on test efficency.
Cobaye is a test framework tahet can run thru a telnet / serial connection.
It offers a batch mode to run automatic test sequences, security, report generation...
The test API is extremely simple: write your test in the 'tests' directory.
The tests must be declared using macro cobaye_declare_test with the
struct cobaye_test that describe your test:
struct cobaye_test my_test = {
.name = "mytest",
.descr = "a simple test description",
.main = my_test_main,
.flags = TST_NO_USER,
};
cobaye_declare_test(my_test);
Then, the build system will automatically compile and embed your test case.
At run the test framework, will generate a list of all compiled tests and when
running a test, it will fork to run the test.
cobaye features are:
- standard stdout to display logs or cobaye_printf for auto flush
- standard stdin to prompt user for input
- resources embedded as blob
- automatic report generation
- batch mode (for auto tests only)
- build flags customization for tests
- standalone test build for easy debugging outside of test framework
- handling of test sequences and running one test multiple times
For more info, check out the dummy.c test example and refer to documentation.