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.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -8
  3. data/bin/teuton +2 -3
  4. data/docs/commands/README.md +8 -7
  5. data/docs/commands/check.md +17 -15
  6. data/docs/commands/help.md +17 -7
  7. data/docs/commands/readme.md +1 -1
  8. data/docs/devel/todo.md +74 -4
  9. data/docs/dsl/send.md +3 -3
  10. data/docs/dsl/show.md +2 -2
  11. data/docs/dsl/target.md +0 -14
  12. data/docs/install/t-node.md +10 -21
  13. data/docs/learn/02-target.md +49 -47
  14. data/docs/learn/03-remote_hosts.md +14 -15
  15. data/docs/learn/04-config.md +67 -68
  16. data/docs/learn/06-cmd_check.md +26 -24
  17. data/docs/learn/07-target_weight.md +3 -3
  18. data/docs/learn/08-unique_values.md +31 -29
  19. data/docs/learn/10-debug.md +36 -0
  20. data/docs/learn/13-feedback.md +10 -9
  21. data/docs/learn/15-readme.md +2 -2
  22. data/docs/learn/16-include.md +7 -7
  23. data/docs/learn/18-log.md +44 -43
  24. data/docs/learn/23-test-code.md +13 -10
  25. data/docs/learn/24-test-sql.md +5 -5
  26. data/docs/learn/26-expect_sequence.md +1 -1
  27. data/docs/learn/27-run_script.md +8 -5
  28. data/lib/teuton/case/action/action.rb +39 -0
  29. data/lib/teuton/case/action/manager.rb +63 -0
  30. data/lib/teuton/case/case.rb +17 -21
  31. data/lib/teuton/case/close.rb +3 -3
  32. data/lib/teuton/case/dsl/all.rb +1 -0
  33. data/lib/teuton/case/dsl/event.rb +24 -0
  34. data/lib/teuton/case/dsl/expect.rb +13 -12
  35. data/lib/teuton/case/dsl/expect_sequence.rb +1 -2
  36. data/lib/teuton/case/dsl/log.rb +3 -7
  37. data/lib/teuton/case/dsl/macro.rb +3 -2
  38. data/lib/teuton/case/dsl/run.rb +11 -17
  39. data/lib/teuton/case/dsl/send.rb +1 -17
  40. data/lib/teuton/case/dsl/target.rb +8 -4
  41. data/lib/teuton/case/dsl/upload.rb +1 -4
  42. data/lib/teuton/case/dsl/weight.rb +3 -3
  43. data/lib/teuton/case/execute/execute_base.rb +1 -1
  44. data/lib/teuton/case/execute/execute_local.rb +2 -2
  45. data/lib/teuton/case/execute/execute_manager.rb +6 -6
  46. data/lib/teuton/case/execute/execute_ssh.rb +6 -6
  47. data/lib/teuton/case/execute/execute_telnet.rb +4 -4
  48. data/lib/teuton/case/play.rb +8 -9
  49. data/lib/teuton/case/result/ext_compare.rb +10 -10
  50. data/lib/teuton/case_manager/case_manager.rb +4 -4
  51. data/lib/teuton/case_manager/dsl.rb +11 -10
  52. data/lib/teuton/case_manager/export_manager.rb +6 -12
  53. data/lib/teuton/case_manager/ext/check_cases.rb +1 -1
  54. data/lib/teuton/case_manager/ext/report.rb +0 -4
  55. data/lib/teuton/case_manager/show_resume_report.rb +29 -30
  56. data/lib/teuton/check/checker.rb +17 -8
  57. data/lib/teuton/check/dsl/all.rb +18 -10
  58. data/lib/teuton/check/dsl/expect.rb +29 -45
  59. data/lib/teuton/check/dsl/getset.rb +2 -2
  60. data/lib/teuton/check/dsl/run.rb +2 -2
  61. data/lib/teuton/check/show.rb +28 -34
  62. data/lib/teuton/cli/app.rb +123 -0
  63. data/lib/teuton/cli/run.rb +38 -0
  64. data/lib/teuton/errors.rb +94 -0
  65. data/lib/teuton/readme/action.rb +29 -0
  66. data/lib/teuton/readme/dsl/all.rb +17 -6
  67. data/lib/teuton/readme/dsl/expect.rb +3 -3
  68. data/lib/teuton/readme/dsl/run.rb +5 -11
  69. data/lib/teuton/readme/main.rb +13 -6
  70. data/lib/teuton/readme/readme.rb +12 -15
  71. data/lib/teuton/report/formatter/default/array.rb +15 -29
  72. data/lib/teuton/report/formatter/default/txt.rb +43 -32
  73. data/lib/teuton/report/formatter/formatter.rb +4 -13
  74. data/lib/teuton/report/formatter/resume/txt.rb +29 -28
  75. data/lib/teuton/report/formatter/resume/xml.rb +4 -4
  76. data/lib/teuton/report/report.rb +3 -1
  77. data/lib/teuton/utils/config_file_reader.rb +3 -11
  78. data/lib/teuton/utils/logger.rb +15 -10
  79. data/lib/teuton/utils/name_file_finder.rb +3 -11
  80. data/lib/teuton/utils/project.rb +4 -3
  81. data/lib/teuton/version.rb +1 -1
  82. data/lib/teuton.rb +6 -11
  83. metadata +8 -5
  84. data/docs/tutorial/es/nginx/README.md +0 -546
  85. data/lib/teuton/cli.rb +0 -120
  86. data/lib/teuton/deprecated/utils.rb +0 -14
@@ -35,14 +35,14 @@ end
35
35
  ## Example
36
36
 
37
37
  ```
38
- $ teuton run 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
- +------+-----------+-------+-------+
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
- $ more 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
-
75
- GROUPS
76
- - Reading params from config file
77
- 01 (1.0/1.0)
78
- Description : Create user david
79
- Command : id david
80
- Output : uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),...
81
- Duration : 0.005 (local)
82
- Alterations : find(uid=) & find((david)) & find(gid=) & count
83
- Expected : Greater than 0
84
- Result : 1
85
-
86
- RESULTS
87
- +--------------+---------------------------+
88
- | unique_fault | 0 |
89
- | case_id | 01 |
90
- | start_time | 2026-10-10 17:05:22 +0100 |
91
- | finish_time | 2026-10-10 17:05:22 +0100 |
92
- | duration | 0.005137538 |
93
- | max_weight | 1.0 |
94
- | good_weight | 1.0 |
95
- | fail_weight | 0 |
96
- | fail_counter | 0 |
97
- | grade | 100 |
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 run examples/04-config
113
-
114
- CASE RESULTS
115
- +------+-----------+-------+-------+
116
- | CASE | MEMBERS | GRADE | STATE |
117
- | 01 | student_1 | 100.0 | ✔ |
118
- | 02 | student_2 | 0.0 | ? |
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
- | CASE | MEMBERS | GRADE | STATE |
130
- | 01 | Yoda | 0.0 | ? |
131
- | 02 | Darth Maul | 0.0 | ? |
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
- | CASE | MEMBERS | GRADE | STATE |
143
- | 01 | AC/DC band | 0.0 | ? |
144
- | 02 | Muse band | 0.0 | ? |
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
  ```
@@ -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
- | GROUP: Using file: users |
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
- | GROUP: Using file: network |
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 Server is working
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
- | DSL Stats | Count |
36
- +-------------+-------+
37
- | Uses | 2 |
38
- | Groups | 2 |
39
- | Targets | 3 |
40
- | Runs | 3 |
41
- | * host1 | 3 |
42
- | Uniques | 0 |
43
- | Logs | 0 |
44
- | | |
45
- | Gets | 5 |
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
- | GROUP: Using file: network |
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
- | GROUP: Using file: users |
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
- | GROUP: Using file: network |
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
- | GROUP: Unique value: hostname |
50
- +-------------------------------+
55
+ ┌───────────────────────────────┐
56
+ │ GROUP: Unique value: hostname │
57
+ └───────────────────────────────┘
51
58
  run 'hostname -f' on host1
52
- ! Unique value for <Host name>
59
+ unique value for <Host name>
53
60
 
54
- +-------------+-------+
55
- | DSL Stats | Count |
56
- +-------------+-------+
57
- | Groups | 3 |
58
- | Targets | 3 |
59
- | Runs | 4 |
60
- | * host1 | 4 |
61
- | Uniques | 1 |
62
- | Logs | 1 |
63
- | | |
64
- | Gets | 5 |
65
- | * username | 3 |
66
- | * hostname | 2 |
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
  ```
@@ -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
+ ```
@@ -37,13 +37,14 @@ Executing `teuton run examples/13-feedback`, we get this output:
37
37
 
38
38
  ```
39
39
  GROUPS
40
- - Hide feedback messages from output
41
- 01 (1.0/1.0)
42
- Description : Service SSH disabled
43
- Command : *********************
44
- Output : *********
45
- Duration : 0.011 (local)
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
  ```
@@ -43,8 +43,8 @@ Content of `example/15-readme/README.md` file.
43
43
  ---
44
44
 
45
45
  ```
46
- Date : 2025-11-12 22:11:47 +0000
47
- Teuton : 2.10.7
46
+ Date : 2026-10-21 21:54:49 +0100
47
+ Teuton : 3.2.1
48
48
  ```
49
49
 
50
50
  # Test: 15-readme
@@ -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
- | CASE | MEMBERS | GRADE | STATE |
65
- | 01 | file02 | 0.0 | ? |
66
- | 02 | file01 | 100.0 | ✔ |
67
- | 03 | file03 | 0.0 | ? |
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
- CONFIGURATION
57
- +----------------+-----------------------------------+
58
- | tt_config_path | examples/18-log/config.yaml |
59
- | tt_members | TOCHANGE |
60
- | tt_script_path | examples/18-log/start.rb |
61
- | tt_sequence | false |
62
- | tt_skip | false |
63
- | values1 | ["A1", "B1", "C1"] |
64
- | values2 | {:p1=>"A2", :p2=>"B2", :p3=>"C2"} |
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
- [22:35:04] INFO: Using log messages.
69
- [22:35:04] INFO: uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),464(vboxusers),108(libvirt),107(qemu),462(vagrant),460(docker),452(ollama)
70
- [22:35:04] ERROR: Problem detected!
71
- [22:35:04] WARN!: This is a warning
72
- [22:35:04] INFO: Hi, there!
73
- [22:35:04] INFO: -------------
74
- [22:35:04] INFO: Array values : ["A1", "B1", "C1"]
75
- [22:35:04] INFO: Hash values : {:p1=>"A2", :p2=>"B2", :p3=>"C2"}
76
-
77
- GROUPS
78
- - Learning about log messages
79
- 01 (1.0/1.0)
80
- Description : Create user david
81
- Command : id david
82
- Output : uid=1000(david) gid=1000(david) grupos=1000(david),478(wheel),464(vboxusers),108(libvirt),107(qemu),462(vagrant),460(docker),452(ollama)
83
- Duration : 0.005 (local)
84
- Alterations : find(david) & count
85
- Expected : Greater than 0
86
- Result : 1
87
-
88
- RESULTS
89
- +--------------+---------------------------+
90
- | unique_fault | 0 |
91
- | case_id | 01 |
92
- | start_time | 2026-10-12 22:35:04 +0100 |
93
- | finish_time | 2026-10-12 22:35:04 +0100 |
94
- | duration | 0.004786563 |
95
- | max_weight | 1.0 |
96
- | good_weight | 1.0 |
97
- | fail_weight | 0 |
98
- | fail_counter | 0 |
99
- | grade | 100 |
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
  ```
@@ -43,22 +43,25 @@ Define config params:
43
43
  global:
44
44
  folder: examples/23-test-code/code
45
45
  cases:
46
- - tt_members: student_1
46
+ - tt_members: student_1_python
47
47
  filename: math_1.py
48
- - tt_members: student_2
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
- | CASE | MEMBERS | GRADE | STATE |
61
- | 01 | student_1 | 100.0 | ✔ |
62
- | 02 | student_2 | 100.0 | ✔ |
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
  ```
@@ -62,9 +62,9 @@ cases:
62
62
  ```
63
63
  $ teuton examples/24-test-sql
64
64
 
65
- CASE RESULTS
66
- +------+-----------+-------+-------+
67
- | CASE | MEMBERS | GRADE | STATE |
68
- | 01 | student_1 | 100.0 | ✔ |
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
 
@@ -90,8 +90,11 @@ CONN ERRORS
90
90
  +------+---------+-------+------------------+
91
91
  ```
92
92
 
93
- Meaning of progress symbols:
94
- * `.`: check ok
95
- * `F`: check fail
96
- * `!`: connection fail
97
- * `u`: upload ok
93
+ **Meaning of progress symbols**
94
+
95
+ | Symbol | Description |
96
+ | ------ | --------------- |
97
+ | `.` | check ok |
98
+ | `F` | check fail |
99
+ | `!` | connection fail |
100
+ | `u` | upload ok |