teuton 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -8
- data/bin/teuton +2 -3
- data/docs/commands/README.md +8 -7
- data/docs/commands/check.md +17 -15
- data/docs/commands/help.md +17 -7
- data/docs/commands/readme.md +1 -1
- data/docs/devel/todo.md +74 -4
- data/docs/dsl/send.md +3 -3
- data/docs/dsl/show.md +2 -2
- data/docs/dsl/target.md +0 -14
- data/docs/install/t-node.md +10 -21
- data/docs/learn/02-target.md +49 -47
- data/docs/learn/03-remote_hosts.md +14 -15
- data/docs/learn/04-config.md +67 -68
- data/docs/learn/06-cmd_check.md +26 -24
- data/docs/learn/07-target_weight.md +3 -3
- data/docs/learn/08-unique_values.md +31 -29
- data/docs/learn/10-debug.md +36 -0
- data/docs/learn/13-feedback.md +10 -9
- data/docs/learn/15-readme.md +2 -2
- data/docs/learn/16-include.md +7 -7
- data/docs/learn/18-log.md +44 -43
- data/docs/learn/23-test-code.md +13 -10
- data/docs/learn/24-test-sql.md +5 -5
- data/docs/learn/26-expect_sequence.md +1 -1
- data/docs/learn/27-run_script.md +8 -5
- data/lib/teuton/case/action/action.rb +39 -0
- data/lib/teuton/case/action/manager.rb +63 -0
- data/lib/teuton/case/case.rb +17 -21
- data/lib/teuton/case/close.rb +3 -3
- data/lib/teuton/case/dsl/all.rb +1 -0
- data/lib/teuton/case/dsl/event.rb +24 -0
- data/lib/teuton/case/dsl/expect.rb +13 -12
- data/lib/teuton/case/dsl/expect_sequence.rb +1 -2
- data/lib/teuton/case/dsl/log.rb +3 -7
- data/lib/teuton/case/dsl/macro.rb +3 -2
- data/lib/teuton/case/dsl/run.rb +11 -17
- data/lib/teuton/case/dsl/send.rb +1 -17
- data/lib/teuton/case/dsl/target.rb +8 -4
- data/lib/teuton/case/dsl/upload.rb +1 -4
- data/lib/teuton/case/dsl/weight.rb +3 -3
- data/lib/teuton/case/execute/execute_base.rb +1 -1
- data/lib/teuton/case/execute/execute_local.rb +2 -2
- data/lib/teuton/case/execute/execute_manager.rb +6 -6
- data/lib/teuton/case/execute/execute_ssh.rb +6 -6
- data/lib/teuton/case/execute/execute_telnet.rb +4 -4
- data/lib/teuton/case/play.rb +8 -9
- data/lib/teuton/case/result/ext_compare.rb +10 -10
- data/lib/teuton/case_manager/case_manager.rb +4 -4
- data/lib/teuton/case_manager/dsl.rb +11 -10
- data/lib/teuton/case_manager/export_manager.rb +6 -12
- data/lib/teuton/case_manager/ext/check_cases.rb +1 -1
- data/lib/teuton/case_manager/ext/report.rb +0 -4
- data/lib/teuton/case_manager/show_resume_report.rb +29 -30
- data/lib/teuton/check/checker.rb +17 -8
- data/lib/teuton/check/dsl/all.rb +18 -10
- data/lib/teuton/check/dsl/expect.rb +29 -45
- data/lib/teuton/check/dsl/getset.rb +2 -2
- data/lib/teuton/check/dsl/run.rb +2 -2
- data/lib/teuton/check/show.rb +28 -34
- data/lib/teuton/cli/app.rb +123 -0
- data/lib/teuton/cli/run.rb +38 -0
- data/lib/teuton/errors.rb +94 -0
- data/lib/teuton/readme/action.rb +29 -0
- data/lib/teuton/readme/dsl/all.rb +17 -6
- data/lib/teuton/readme/dsl/expect.rb +3 -3
- data/lib/teuton/readme/dsl/run.rb +5 -11
- data/lib/teuton/readme/main.rb +13 -6
- data/lib/teuton/readme/readme.rb +12 -15
- data/lib/teuton/report/formatter/default/array.rb +15 -29
- data/lib/teuton/report/formatter/default/txt.rb +43 -32
- data/lib/teuton/report/formatter/formatter.rb +4 -13
- data/lib/teuton/report/formatter/resume/txt.rb +29 -28
- data/lib/teuton/report/formatter/resume/xml.rb +4 -4
- data/lib/teuton/report/report.rb +3 -1
- data/lib/teuton/utils/config_file_reader.rb +3 -11
- data/lib/teuton/utils/logger.rb +15 -10
- data/lib/teuton/utils/name_file_finder.rb +3 -11
- data/lib/teuton/utils/project.rb +4 -3
- data/lib/teuton/version.rb +1 -1
- data/lib/teuton.rb +6 -11
- metadata +8 -5
- data/docs/tutorial/es/nginx/README.md +0 -546
- data/lib/teuton/cli.rb +0 -120
- data/lib/teuton/deprecated/utils.rb +0 -14
data/docs/learn/04-config.md
CHANGED
|
@@ -35,14 +35,14 @@ end
|
|
|
35
35
|
## Example
|
|
36
36
|
|
|
37
37
|
```
|
|
38
|
-
$ teuton
|
|
39
|
-
|
|
40
|
-
CASE RESULTS
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
38
|
+
$ teuton examples/04-config
|
|
39
|
+
|
|
40
|
+
CASE RESULTS
|
|
41
|
+
┌──────┬───────────┬───────┬───────┐
|
|
42
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
43
|
+
│ 01 │ student_1 │ 100.0 │ ✔ │
|
|
44
|
+
│ 02 │ student_2 │ 0.0 │ ? │
|
|
45
|
+
└──────┴───────────┴───────┴───────┘
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
Reports:
|
|
@@ -58,44 +58,43 @@ var/04-config/default
|
|
|
58
58
|
Let's see case 01 report.
|
|
59
59
|
|
|
60
60
|
```
|
|
61
|
-
$
|
|
62
|
-
|
|
63
|
-
CONFIGURATION
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
+--------------+---------------------------+
|
|
61
|
+
$ cat var/04-config/default/case-01.txt
|
|
62
|
+
|
|
63
|
+
CONFIGURATION
|
|
64
|
+
┌────────────────┬────────────────────────────────┐
|
|
65
|
+
│ tt_config_path │ examples/04-config/config.yaml │
|
|
66
|
+
│ tt_members │ student_1 │
|
|
67
|
+
│ tt_output_dir │ var/04-config/default │
|
|
68
|
+
│ tt_script_path │ examples/04-config/start.rb │
|
|
69
|
+
│ tt_sequence │ false │
|
|
70
|
+
│ tt_skip │ false │
|
|
71
|
+
│ username │ david │
|
|
72
|
+
└────────────────┴────────────────────────────────┘
|
|
73
|
+
|
|
74
|
+
GROUPS
|
|
75
|
+
▶ Reading params from config file
|
|
76
|
+
✔ 01 (1.0/1.0) ┌──
|
|
77
|
+
Description │ Create user david
|
|
78
|
+
Command │ id david
|
|
79
|
+
Output │ uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),464(vboxusers),108(libvirt),107(qemu),462(vagrant),460(docker),452(ollama)
|
|
80
|
+
Duration │ 0.004 (local)
|
|
81
|
+
Alterations │ find(uid=) & find((david)) & find(gid=) & count
|
|
82
|
+
Expected │ Greater than 0
|
|
83
|
+
Result │ 1
|
|
84
|
+
└──
|
|
85
|
+
RESULTS
|
|
86
|
+
┌──────────────┬───────────────────────────┐
|
|
87
|
+
│ unique_fault │ 0 │
|
|
88
|
+
│ case_id │ 01 │
|
|
89
|
+
│ start_time │ 2026-10-21 21:36:41 +0100 │
|
|
90
|
+
│ finish_time │ 2026-10-21 21:36:41 +0100 │
|
|
91
|
+
│ duration │ 0.004390772 │
|
|
92
|
+
│ max_weight │ 1.0 │
|
|
93
|
+
│ good_weight │ 1.0 │
|
|
94
|
+
│ fail_weight │ 0 │
|
|
95
|
+
│ fail_counter │ 0 │
|
|
96
|
+
│ grade │ 100 │
|
|
97
|
+
└──────────────┴───────────────────────────┘
|
|
99
98
|
```
|
|
100
99
|
|
|
101
100
|
## Using differents configuration files
|
|
@@ -109,38 +108,38 @@ Execute the same test but using diferents config files. Config files available:
|
|
|
109
108
|
**Example 1**: Run test usign default config file (`config.yaml`). Output files saved in `tt_output_dir: var/04-config/defautl`.
|
|
110
109
|
|
|
111
110
|
```
|
|
112
|
-
$ teuton
|
|
113
|
-
|
|
114
|
-
CASE RESULTS
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
$ teuton examples/04-config
|
|
112
|
+
|
|
113
|
+
CASE RESULTS
|
|
114
|
+
┌──────┬───────────┬───────┬───────┐
|
|
115
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
116
|
+
│ 01 │ student_1 │ 100.0 │ ✔ │
|
|
117
|
+
│ 02 │ student_2 │ 0.0 │ ? │
|
|
118
|
+
└──────┴───────────┴───────┴───────┘
|
|
120
119
|
```
|
|
121
120
|
|
|
122
121
|
**Example 2**: Run test using `example/04-config/starwars.yaml` config file. Output files saved in `tt_output_dir: var/04-config/starwars`.
|
|
123
122
|
|
|
124
123
|
```
|
|
125
124
|
$ teuton run --cname=starwars examples/04-config
|
|
126
|
-
|
|
127
|
-
CASE RESULTS
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
|
|
126
|
+
CASE RESULTS
|
|
127
|
+
┌──────┬────────────┬───────┬───────┐
|
|
128
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
129
|
+
│ 01 │ Yoda │ 0.0 │ ? │
|
|
130
|
+
│ 02 │ Darth Maul │ 0.0 │ ? │
|
|
131
|
+
└──────┴────────────┴───────┴───────┘
|
|
133
132
|
```
|
|
134
133
|
|
|
135
134
|
**Example 3**: Run test using `example/04-config/rock.yaml` config file. Output files saved in `tt_output_dir: var/04-config/rock`.
|
|
136
135
|
|
|
137
136
|
```
|
|
138
137
|
$ teuton run --cpath=examples/04-config/rock.yaml examples/04-config
|
|
139
|
-
|
|
140
|
-
CASE RESULTS
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
138
|
+
|
|
139
|
+
CASE RESULTS
|
|
140
|
+
┌──────┬────────────┬───────┬───────┐
|
|
141
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
142
|
+
│ 01 │ AC/DC band │ 0.0 │ ? │
|
|
143
|
+
│ 02 │ Muse band │ 0.0 │ ? │
|
|
144
|
+
└──────┴────────────┴───────┴───────┘
|
|
146
145
|
```
|
data/docs/learn/06-cmd_check.md
CHANGED
|
@@ -8,43 +8,45 @@
|
|
|
8
8
|
## Example
|
|
9
9
|
|
|
10
10
|
```
|
|
11
|
-
$ teuton check examples/05-use
|
|
11
|
+
$ teuton check examples/05-use
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
┌─────────────────────────┐
|
|
14
|
+
│ USE: external libraries │
|
|
15
|
+
└─────────────────────────┘
|
|
16
|
+
1. examples/05-use/lib/users.rb
|
|
17
|
+
2. examples/05-use/lib/network.rb
|
|
18
|
+
|
|
19
|
+
┌──────────────────────────┐
|
|
20
|
+
│ GROUP: Using file: users │
|
|
21
|
+
└──────────────────────────┘
|
|
16
22
|
(001) target Create user get(username)
|
|
17
23
|
weight 1.0
|
|
18
24
|
run 'id get(username)' on host1
|
|
19
25
|
expect ["uid=", "(get(username))", "gid="] (Array)
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
┌────────────────────────────┐
|
|
28
|
+
│ GROUP: Using file: network │
|
|
29
|
+
└────────────────────────────┘
|
|
24
30
|
(002) target Update computer name with get(hostname)
|
|
25
31
|
weight 1.0
|
|
26
32
|
run 'hostname' on host1
|
|
27
33
|
expect_one get(hostname) (String)
|
|
28
34
|
|
|
29
|
-
(003) target Ensure DNS
|
|
35
|
+
(003) target Ensure DNS is properly configured
|
|
30
36
|
weight 1.0
|
|
31
37
|
run 'host www.google.es' on host1
|
|
32
38
|
expect www.google.es has address (String)
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
| * username | 3 |
|
|
47
|
-
| * hostname | 2 |
|
|
48
|
-
| Sets | 0 |
|
|
49
|
-
+-------------+-------+
|
|
40
|
+
┌─────────────┬───────┐
|
|
41
|
+
│ DSL Stats │ Count │
|
|
42
|
+
├─────────────┼───────┤
|
|
43
|
+
│ Uses │ 2 │
|
|
44
|
+
│ Groups │ 2 │
|
|
45
|
+
│ Targets │ 3 │
|
|
46
|
+
│ Runs │ 3 │
|
|
47
|
+
│ * host1 │ 3 │
|
|
48
|
+
│ Gets │ 5 │
|
|
49
|
+
│ * username │ 3 │
|
|
50
|
+
│ * hostname │ 2 │
|
|
51
|
+
└─────────────┴───────┘
|
|
50
52
|
```
|
|
@@ -26,9 +26,9 @@ end
|
|
|
26
26
|
|
|
27
27
|
Output:
|
|
28
28
|
```
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
┌────────────────────────────┐
|
|
30
|
+
│ GROUP: Using file: network │
|
|
31
|
+
└────────────────────────────┘
|
|
32
32
|
(002) target Update computer name with get(hostname)
|
|
33
33
|
weight 1.0
|
|
34
34
|
run 'hostname' on host1
|
|
@@ -22,19 +22,26 @@ end
|
|
|
22
22
|
Cheking test:
|
|
23
23
|
|
|
24
24
|
```
|
|
25
|
-
$ teuton check examples/08-unique_values
|
|
25
|
+
$ teuton check examples/08-unique_values
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
┌─────────────────────────┐
|
|
28
|
+
│ USE: external libraries │
|
|
29
|
+
└─────────────────────────┘
|
|
30
|
+
1. examples/08-unique_values/lib/users.rb
|
|
31
|
+
2. examples/08-unique_values/lib/network.rb
|
|
32
|
+
3. examples/08-unique_values/lib/unique.rb
|
|
33
|
+
|
|
34
|
+
┌──────────────────────────┐
|
|
35
|
+
│ GROUP: Using file: users │
|
|
36
|
+
└──────────────────────────┘
|
|
30
37
|
(001) target Create user get(username)
|
|
31
38
|
weight 1.0
|
|
32
39
|
run 'id get(username)' on host1
|
|
33
40
|
expect get(username) (String)
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
┌────────────────────────────┐
|
|
43
|
+
│ GROUP: Using file: network │
|
|
44
|
+
└────────────────────────────┘
|
|
38
45
|
(002) target Update computer name with get(hostname)
|
|
39
46
|
weight 1.0
|
|
40
47
|
run 'hostname' on host1
|
|
@@ -45,28 +52,23 @@ $ teuton check examples/08-unique_values
|
|
|
45
52
|
run 'host www.google.es' on host1
|
|
46
53
|
expect www.google.es has address (String)
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
┌───────────────────────────────┐
|
|
56
|
+
│ GROUP: Unique value: hostname │
|
|
57
|
+
└───────────────────────────────┘
|
|
51
58
|
run 'hostname -f' on host1
|
|
52
|
-
|
|
59
|
+
unique value for <Host name>
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
| Sets | 0 |
|
|
68
|
-
+-------------+-------+
|
|
69
|
-
+----------------------+
|
|
70
|
-
| Revising CONFIG file |
|
|
71
|
-
+----------------------+
|
|
61
|
+
┌─────────────┬───────┐
|
|
62
|
+
│ DSL Stats │ Count │
|
|
63
|
+
├─────────────┼───────┤
|
|
64
|
+
│ Uses │ 3 │
|
|
65
|
+
│ Groups │ 3 │
|
|
66
|
+
│ Targets │ 3 │
|
|
67
|
+
│ Runs │ 4 │
|
|
68
|
+
│ * host1 │ 4 │
|
|
69
|
+
│ Uniques │ 1 │
|
|
70
|
+
│ Gets │ 5 │
|
|
71
|
+
│ * username │ 3 │
|
|
72
|
+
│ * hostname │ 2 │
|
|
73
|
+
└─────────────┴───────┘
|
|
72
74
|
```
|
data/docs/learn/10-debug.md
CHANGED
|
@@ -45,3 +45,39 @@ end
|
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
`result.debug` it's usefull when you are verifying command output captured by Teuton.
|
|
48
|
+
|
|
49
|
+
## Output example
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
$ teuton examples/10-debug
|
|
53
|
+
------------------------------------
|
|
54
|
+
Started at 2026-10-21 21:50:52 +0100
|
|
55
|
+
|
|
56
|
+
******************** [DEBUG] count=6 ********************
|
|
57
|
+
0: PING 192.168.1.1 (192.168.1.1) 56(84) bytes de datos.
|
|
58
|
+
1: 64 bytes desde 192.168.1.1: icmp_seq=1 ttl=64 tiempo=2.22 ms
|
|
59
|
+
2:
|
|
60
|
+
3: --- 192.168.1.1 estadísticas ping ---
|
|
61
|
+
4: 1 paquetes transmitidos, 1 recibidos, 0% packet loss, time 0ms
|
|
62
|
+
5: rtt min/avg/max/mdev = 2.220/2.220/2.220/0.000 ms
|
|
63
|
+
*********************************************************
|
|
64
|
+
.
|
|
65
|
+
******************** [DEBUG] count=1 ********************
|
|
66
|
+
0: 1
|
|
67
|
+
*********************************************************
|
|
68
|
+
FFFFFF
|
|
69
|
+
Finished in 35.898 seconds
|
|
70
|
+
------------------------------------
|
|
71
|
+
|
|
72
|
+
CASE RESULTS
|
|
73
|
+
┌──────┬───────────┬───────┬───────┐
|
|
74
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
75
|
+
│ 01 │ student_1 │ 14.0 │ ? │
|
|
76
|
+
└──────┴───────────┴───────┴───────┘
|
|
77
|
+
|
|
78
|
+
CONN ERRORS
|
|
79
|
+
┌──────┬───────────┬─────────┬───────┐
|
|
80
|
+
│ CASE │ MEMBERS │ HOST │ ERROR │
|
|
81
|
+
│ 01 │ student_1 │ windows │ error │
|
|
82
|
+
└──────┴───────────┴─────────┴───────┘
|
|
83
|
+
```
|
data/docs/learn/13-feedback.md
CHANGED
|
@@ -37,13 +37,14 @@ Executing `teuton run examples/13-feedback`, we get this output:
|
|
|
37
37
|
|
|
38
38
|
```
|
|
39
39
|
GROUPS
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Description
|
|
43
|
-
Command
|
|
44
|
-
Output
|
|
45
|
-
Duration
|
|
46
|
-
Alterations
|
|
47
|
-
Expected
|
|
48
|
-
Result
|
|
40
|
+
▶ Hide feedback messages from output
|
|
41
|
+
✔ 01 (1.0/1.0) ┌──
|
|
42
|
+
Description │ Service SSH disabled
|
|
43
|
+
Command │ *********************
|
|
44
|
+
Output │ *********
|
|
45
|
+
Duration │ 0.008 (local)
|
|
46
|
+
Alterations │ **********************
|
|
47
|
+
Expected │ **************
|
|
48
|
+
Result │ ********
|
|
49
|
+
└──
|
|
49
50
|
```
|
data/docs/learn/15-readme.md
CHANGED
data/docs/learn/16-include.md
CHANGED
|
@@ -59,11 +59,11 @@ Config files into `moreconfigfiles` folder:
|
|
|
59
59
|
If we execute the test we will see that 3 cases are processed. Which are defined in the files `file01.yaml`, `02/file02.yaml` and `file03.yml`.
|
|
60
60
|
|
|
61
61
|
```
|
|
62
|
-
CASE RESULTS
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
62
|
+
CASE RESULTS
|
|
63
|
+
┌──────┬────────────┬───────┬───────┐
|
|
64
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
65
|
+
│ 01 │ student_02 │ 0.0 │ ? │
|
|
66
|
+
│ 02 │ student_01 │ 100.0 │ ✔ │
|
|
67
|
+
│ 03 │ student_03 │ 0.0 │ ? │
|
|
68
|
+
└──────┴────────────┴───────┴───────┘
|
|
69
69
|
```
|
data/docs/learn/18-log.md
CHANGED
|
@@ -53,49 +53,50 @@ end
|
|
|
53
53
|
Content of `var/18-log/case-01.txt` file.
|
|
54
54
|
|
|
55
55
|
```txt
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
56
|
+
❯ cat var/18-log/case-01.txt
|
|
57
|
+
CONFIGURATION
|
|
58
|
+
┌────────────────┬───────────────────────────────────┐
|
|
59
|
+
│ tt_config_path │ examples/18-log/config.yaml │
|
|
60
|
+
│ tt_members │ TOCHANGE │
|
|
61
|
+
│ tt_script_path │ examples/18-log/start.rb │
|
|
62
|
+
│ tt_sequence │ false │
|
|
63
|
+
│ tt_skip │ false │
|
|
64
|
+
│ values1 │ ["A1", "B1", "C1"] │
|
|
65
|
+
│ values2 │ {:p1=>"A2", :p2=>"B2", :p3=>"C2"} │
|
|
66
|
+
└────────────────┴───────────────────────────────────┘
|
|
66
67
|
|
|
67
68
|
LOGS
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
GROUPS
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
Description
|
|
81
|
-
Command
|
|
82
|
-
Output
|
|
83
|
-
Duration
|
|
84
|
-
Alterations
|
|
85
|
-
Expected
|
|
86
|
-
Result
|
|
87
|
-
|
|
88
|
-
RESULTS
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
69
|
+
[22:00:21] INFO| Using log messages.
|
|
70
|
+
[22:00:21] INFO| uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),464(vboxusers),108(libvirt),107(qemu),462(vagrant),460(docker),452(ollama)
|
|
71
|
+
[22:00:21] ERROR| Problem detected!
|
|
72
|
+
[22:00:21] WARN| This is a warning
|
|
73
|
+
[22:00:21] INFO| Hi, there!
|
|
74
|
+
[22:00:21] INFO| -------------
|
|
75
|
+
[22:00:21] INFO| Array values : ["A1", "B1", "C1"]
|
|
76
|
+
[22:00:21] INFO| Hash values : {:p1=>"A2", :p2=>"B2", :p3=>"C2"}
|
|
77
|
+
|
|
78
|
+
GROUPS
|
|
79
|
+
▶ Learning about log messages
|
|
80
|
+
✔ 01 (1.0/1.0) ┌──
|
|
81
|
+
Description │ Create user david
|
|
82
|
+
Command │ id david
|
|
83
|
+
Output │ uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),464(vboxusers),108(libvirt),107(qemu),462(vagrant),460(docker),452(ollama)
|
|
84
|
+
Duration │ 0.005 (local)
|
|
85
|
+
Alterations │ find(david) & count
|
|
86
|
+
Expected │ Greater than 0
|
|
87
|
+
Result │ 1
|
|
88
|
+
└──
|
|
89
|
+
RESULTS
|
|
90
|
+
┌──────────────┬───────────────────────────┐
|
|
91
|
+
│ unique_fault │ 0 │
|
|
92
|
+
│ case_id │ 01 │
|
|
93
|
+
│ start_time │ 2026-10-21 21:57:57 +0100 │
|
|
94
|
+
│ finish_time │ 2026-10-21 21:57:57 +0100 │
|
|
95
|
+
│ duration │ 0.005315073 │
|
|
96
|
+
│ max_weight │ 1.0 │
|
|
97
|
+
│ good_weight │ 1.0 │
|
|
98
|
+
│ fail_weight │ 0 │
|
|
99
|
+
│ fail_counter │ 0 │
|
|
100
|
+
│ grade │ 100 │
|
|
101
|
+
└──────────────┴───────────────────────────┘
|
|
101
102
|
```
|
data/docs/learn/23-test-code.md
CHANGED
|
@@ -43,22 +43,25 @@ Define config params:
|
|
|
43
43
|
global:
|
|
44
44
|
folder: examples/23-test-code/code
|
|
45
45
|
cases:
|
|
46
|
-
- tt_members:
|
|
46
|
+
- tt_members: student_1_python
|
|
47
47
|
filename: math_1.py
|
|
48
|
-
- tt_members:
|
|
48
|
+
- tt_members: student_2_python
|
|
49
49
|
filename: math_2.py
|
|
50
|
+
- tt_members: student_3_ruby
|
|
51
|
+
filename: math_3.rb
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
* Copy students files into `code` subfolder.
|
|
53
55
|
* Now run Teuton test:
|
|
54
56
|
|
|
55
57
|
```
|
|
56
|
-
$ teuton examples/23-test-code
|
|
57
|
-
|
|
58
|
-
CASE RESULTS
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
58
|
+
$ teuton examples/23-test-code
|
|
59
|
+
|
|
60
|
+
CASE RESULTS
|
|
61
|
+
┌──────┬──────────────────┬───────┬───────┐
|
|
62
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
63
|
+
│ 01 │ student_1_python │ 100.0 │ ✔ │
|
|
64
|
+
│ 02 │ student_2_python │ 100.0 │ ✔ │
|
|
65
|
+
│ 03 │ student_3_ruby │ 100.0 │ ✔ │
|
|
66
|
+
└──────┴──────────────────┴───────┴───────┘
|
|
64
67
|
```
|
data/docs/learn/24-test-sql.md
CHANGED
|
@@ -62,9 +62,9 @@ cases:
|
|
|
62
62
|
```
|
|
63
63
|
$ teuton examples/24-test-sql
|
|
64
64
|
|
|
65
|
-
CASE RESULTS
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
CASE RESULTS
|
|
66
|
+
┌──────┬────────────────┬───────┬───────┐
|
|
67
|
+
│ CASE │ MEMBERS │ GRADE │ STATE │
|
|
68
|
+
│ 01 │ student_1_name │ 100.0 │ ✔ │
|
|
69
|
+
└──────┴────────────────┴───────┴───────┘
|
|
70
70
|
```
|
|
@@ -8,7 +8,7 @@ Evaluate the occurrence of a certain sequence that takes place in different line
|
|
|
8
8
|
|
|
9
9
|
## Description
|
|
10
10
|
|
|
11
|
-
In the classic target/run/expect, the expect statement works by locating lines from the output of the previous command that meet certain criteria.
|
|
11
|
+
In the classic "target/run/expect", the expect statement works by locating lines from the output of the previous command that meet certain criteria.
|
|
12
12
|
|
|
13
13
|
We can even (using regular expressions) detect if there is any line in the output where a certain sequence appears.
|
|
14
14
|
|
data/docs/learn/27-run_script.md
CHANGED
|
@@ -90,8 +90,11 @@ CONN ERRORS
|
|
|
90
90
|
+------+---------+-------+------------------+
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Meaning of progress symbols
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
**Meaning of progress symbols**
|
|
94
|
+
|
|
95
|
+
| Symbol | Description |
|
|
96
|
+
| ------ | --------------- |
|
|
97
|
+
| `.` | check ok |
|
|
98
|
+
| `F` | check fail |
|
|
99
|
+
| `!` | connection fail |
|
|
100
|
+
| `u` | upload ok |
|