teuton 2.10.8 → 3.0.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +373 -674
  3. data/README.md +65 -18
  4. data/docs/commands/README.md +18 -81
  5. data/docs/commands/check.md +66 -0
  6. data/docs/commands/config.md +120 -0
  7. data/docs/commands/help.md +37 -0
  8. data/docs/commands/new.md +34 -0
  9. data/docs/commands/readme.md +52 -0
  10. data/docs/commands/{run-tests.md → run.md} +1 -1
  11. data/docs/config_file.md +125 -0
  12. data/docs/devel/contribute.md +52 -0
  13. data/docs/devel/todo.md +162 -0
  14. data/docs/dsl/expect.md +7 -5
  15. data/docs/dsl/run.md +30 -67
  16. data/docs/install/s-node.md +9 -7
  17. data/docs/install/t-node.md +18 -19
  18. data/docs/learn/11-export.md +1 -1
  19. data/docs/learn/13-feedback.md +1 -1
  20. data/docs/learn/14-moodle_id.md +4 -4
  21. data/docs/learn/15-readme.md +14 -8
  22. data/docs/learn/16-include.md +21 -16
  23. data/docs/learn/17-alias.md +2 -2
  24. data/docs/learn/18-log.md +5 -3
  25. data/docs/learn/19-read_vars.md +7 -3
  26. data/docs/learn/20-macros.md +6 -4
  27. data/docs/learn/21-exit_codes.md +3 -3
  28. data/docs/learn/22-result.md +7 -3
  29. data/docs/learn/23-test-code.md +17 -7
  30. data/docs/learn/24-test-sql.md +19 -18
  31. data/docs/learn/25-expect-result.md +1 -0
  32. data/docs/learn/26-expect_sequence.md +12 -7
  33. data/docs/learn/27-run_script.md +11 -5
  34. data/docs/tutorial/es/nginx/README.md +546 -0
  35. data/lib/teuton/case/case.rb +0 -2
  36. data/lib/teuton/case/dsl/expect.rb +2 -2
  37. data/lib/teuton/case/dsl/log.rb +1 -1
  38. data/lib/teuton/case/dsl/run.rb +2 -3
  39. data/lib/teuton/case/dsl/upload.rb +1 -1
  40. data/lib/teuton/case/execute/execute_base.rb +3 -6
  41. data/lib/teuton/case/execute/execute_local.rb +5 -2
  42. data/lib/teuton/case/execute/execute_ssh.rb +0 -1
  43. data/lib/teuton/case/execute/execute_telnet.rb +0 -2
  44. data/lib/teuton/case/play.rb +2 -2
  45. data/lib/teuton/case/result/result.rb +1 -3
  46. data/lib/teuton/case_manager/case_manager.rb +14 -17
  47. data/lib/teuton/case_manager/dsl.rb +4 -4
  48. data/lib/teuton/case_manager/export_manager.rb +22 -17
  49. data/lib/teuton/case_manager/{check_cases.rb → ext/check_cases.rb} +7 -6
  50. data/lib/teuton/case_manager/ext/hall_of_fame.rb +28 -0
  51. data/lib/teuton/case_manager/{report.rb → ext/report.rb} +6 -8
  52. data/lib/teuton/case_manager/send_manager.rb +1 -0
  53. data/lib/teuton/case_manager/{show_report.rb → show_resume_report.rb} +12 -26
  54. data/lib/teuton/case_manager/stats_manager.rb +26 -0
  55. data/lib/teuton/check/checker.rb +16 -8
  56. data/lib/teuton/check/main.rb +2 -2
  57. data/lib/teuton/check/show.rb +3 -3
  58. data/lib/teuton/cli.rb +3 -2
  59. data/lib/teuton/readme/dsl/getset.rb +1 -0
  60. data/lib/teuton/readme/main.rb +2 -2
  61. data/lib/teuton/readme/readme.rb +2 -2
  62. data/lib/teuton/report/formatter/default/array.rb +1 -3
  63. data/lib/teuton/report/formatter/default/markdown.rb +1 -1
  64. data/lib/teuton/report/formatter/default/txt.rb +1 -1
  65. data/lib/teuton/report/formatter/default/xml.rb +93 -29
  66. data/lib/teuton/report/formatter/formatter.rb +2 -1
  67. data/lib/teuton/report/formatter/resume/array.rb +1 -3
  68. data/lib/teuton/report/formatter/resume/txt.rb +6 -2
  69. data/lib/teuton/report/formatter/resume/xml.rb +92 -0
  70. data/lib/teuton/report/report.rb +1 -1
  71. data/lib/teuton/utils/config_file_reader.rb +141 -0
  72. data/lib/teuton/utils/name_file_finder.rb +12 -15
  73. data/lib/teuton/utils/project.rb +19 -21
  74. data/lib/teuton/utils/settings.rb +3 -1
  75. data/lib/teuton/version.rb +1 -1
  76. data/lib/teuton.rb +11 -10
  77. metadata +37 -32
  78. data/docs/commands/check-example.md +0 -53
  79. data/docs/es/aprender/01-cmd_new.md +0 -27
  80. data/docs/es/aprender/02-target.md +0 -131
  81. data/docs/es/aprender/README.md +0 -36
  82. data/docs/ideas/contributions.md +0 -32
  83. data/docs/ideas/todo.md +0 -44
  84. data/docs/install/README.md +0 -38
  85. data/lib/teuton/case_manager/hall_of_fame.rb +0 -29
  86. data/lib/teuton/files/README.md +0 -9
  87. data/lib/teuton/utils/configfile_reader.rb +0 -135
  88. /data/docs/{ideas → es}/Challenge-Server-Project.md +0 -0
  89. /data/docs/{ideas → es}/servidor-de-retos.md +0 -0
  90. /data/docs/{install/modes_of_use.md → modes_of_use.md} +0 -0
  91. /data/lib/teuton/{case_manager → deprecated}/utils.rb +0 -0
@@ -0,0 +1,52 @@
1
+ [<< back](../../README.md)
2
+
3
+ # Contributing
4
+
5
+ List of things to do, classified into 3 sections:
6
+ * (A) I know read and write.
7
+ * (B) I work as IT teacher
8
+ * (C) I want to program using Ruby language
9
+
10
+ > I write this list without any criteria.
11
+ > Only an unordered list of interesting/usefull things to be done.
12
+
13
+ ## Section A
14
+
15
+ Documentation
16
+
17
+ * Revise documentation.
18
+ * Make videos showing how to use this tool
19
+ * Video about download and install this tool
20
+ * Test installation scripts
21
+ * Vídeo with Windows installation.
22
+ * Video using examples 01 to 05...
23
+ * Write a special documentation for novice
24
+
25
+ ## Section B
26
+
27
+ * Create your own (simple or complex) teuton tests.
28
+ * Upload your own tests to github.com/teuton-software/challenge repository.
29
+ * Make videos showing how to create our own tests and run it on VMs.
30
+
31
+ ## Section C
32
+
33
+ Contact with us to help develop this tool.
34
+
35
+ 1. Make sure you have Ruby installed
36
+ 1. Fork it and clone it
37
+ 1. Create your feature branch (`git checkout -b my-new-feature`)
38
+ 1. Commit your changes (`git commit -am 'Add some feature'`)
39
+ 1. Push to the branch (`git push origin my-new-feature`)
40
+ 1. Create new Pull Request.
41
+
42
+ > You can also [create issues](https://github.com/teuton-software/teuton/issues) with your requests, incidences or suggestions.
43
+
44
+ **Development environment installation**
45
+
46
+ * git clone REPO
47
+ * install ruby-dev or ruby-devel
48
+ * debian => sudo apt install ruby-dev build-essential
49
+ * debian => ssh make gcc ruby-devel
50
+ * gem install bundler
51
+ * bundle install
52
+ * rake
@@ -0,0 +1,162 @@
1
+ [<< back](../../README.md)
2
+
3
+ # Roadmap Teuton v3.0.0 - 20260209
4
+
5
+ **Cambios menores:**
6
+
7
+ * "Limpiar" las funciones "deprecated"
8
+ * Cambiar "teuton readme" por "teuton doc".
9
+ * Modificar código, documentación y los ejemplos
10
+ * Modificar los ejemplos de dvarrui/teuton-tests
11
+ * Añadir opciones de lenguaje a `teuton doc`.
12
+ * Por defecto se usará `lang=en`.
13
+ * Pero poder especificar el idioma usando el paráemetro `lang`. Por ejemplo :`teuton doc --lang=es`
14
+ * Ampliar las estadísticas de salida.
15
+ * Improve RESUME report or create stat-report, with stat information.
16
+ * the worst target/task/case,
17
+ * the best target/task/case,
18
+ * the slowest target/task/case,
19
+ * the fastest target/task/case, etc.
20
+ * Related targets: group of targets that always have the same state in every case.
21
+
22
+ **Cambios mayores:**
23
+
24
+ * Aplicar las recomendaciones del informe de seguridad de Andrés.
25
+ * Crear nueva gema `teuton-panel` (v2) que sustituirá la versión obsoleta actual.
26
+ * Modificar/ampliar las funciones de `teuton config` para facilitar el trabajo a `teuton-panel`.
27
+ * tt_include
28
+ * tt_include_params
29
+ * aplanar/desaplanar config file.
30
+ * Nueva feature "eventos".
31
+ * [Propuesta](https://github.com/dvarrui/teuton-book/blob/main/docs/03.eventos/index.md)
32
+ * Nueva gema `teuton-panel`
33
+ * Nuevo repo `teuton-book`: para documentación, tutoriales en español.
34
+
35
+ **teuton-panel (v2.0.0)**
36
+
37
+ Consultar en el repostorio `teuton-panel`. EN PROCESO!!!
38
+
39
+ * config cases IMPORTANTE:
40
+ * config/remote:
41
+ * accept-remote-config. activar/desactivar configuraciones remotas
42
+ * Acceptar post formulario y vía get curl con ruta.
43
+ * config/list: mostrar listado con info de alumnos
44
+ * Elegir ubicación de almacenamiento de las configuraciones
45
+ * run BAJA PRIORIDAD:
46
+ * Ejecutar por el profesor
47
+ * Todos
48
+ * a una selección
49
+ * El alumno solicita su propia ejecución vía curl
50
+ * every: repeticiones en bucle de I iteraciones, cada T tiempo.
51
+ * Elegir ubicación de almacenamiento de los informes
52
+ * Al finalizar cada ejecución se muestre un listado con los resultados
53
+ * readme/doc BAJA PRIORIDAD:
54
+ * activar auto "teuton doc" a página web para los alumnos.
55
+ * config panel:
56
+ * panel/new: crear fichero de configuración del panel
57
+ * panel/save: save configuración del panel
58
+
59
+ ---
60
+
61
+ # TODO list para el FUTURO
62
+
63
+ ## Ideas
64
+
65
+ Esta es una lista de ideas para que no se me olvide... lo podemos ir ajustando 😊
66
+
67
+ * **IDEA**. Editor de tests:
68
+ * Editor de tests ?! .... lo veo complejo... a menos que se empiece por una versión simplificada..
69
+ * El DSL es tan sencillo que no le veo sentido a un editor de retos.
70
+ * Pero si podemos aprovechar y crear una" librería " de los módulos más frecuentes?!... una ayuda para facilitar la creación de test... esto se puede emparejar con el editor de test...
71
+ * **SEND**. `send :email_to => :members_emails`... esto requiere que cada caso tenga un email y que además el profesor tenga configurado el acceso a su cuenta de correo... para poder enviar copias de los informes....
72
+ * **HELP**. When students demand help they could recibe some advises. More ideas: bonus, lives, etc.
73
+ * **FEATURE - SAVE STATE**:
74
+ * Save case state or progress. var/tesname/states.db ¿?
75
+ * save partial grades. Before play challenge read previous moodle.cvs.
76
+ * Then play challenge and when creates new moodle.csv... we could preseve old cases(grades) 100% for example.
77
+ * Create 2 evaluation modes:
78
+ 1. Evaluate targets (current mode): `start eval: :targets`
79
+ 1. Evaluate task: `start eval: :groups` and perhaps add group weight?
80
+ 1. config file with `tt_eval: groups`
81
+ * Propuestas de sdelquin
82
+ * Docker en vez de vagrant?? → https://www.cloudbees.com/blog/ssh-into-a-docker-container-how-to-execute-your-commands
83
+ * Tablas "bonitas" en terminal → https://github.com/piotrmurach/tty-markdown#17-table
84
+ * Documentación en https://readthedocs.org/ ??
85
+ * **DOCUMENTACION**
86
+ * Snode Dockerfile with SSH server
87
+ * **PENSAR**: Script to set **static IP**
88
+ * FEATURE: Auto Parse new input format, and detect parse errors
89
+ * **FEATURE - EXPORT**. Sign reports generated with GPG... just to verify autenticity if needed.
90
+ * **ngrok**:
91
+ * Doc ngrok use. Use cases and tutorial
92
+ * Doc host1_route combined with ngrok
93
+ * **FEATURE**: Host object so "host(:debian)" return a Host object so
94
+
95
+ ```
96
+ h = host(:debian)
97
+ h.ip -> get(:debian_ip)
98
+ h.username -> get(:debian_username)
99
+ h.password -> get(:debian_password)
100
+ h.port
101
+ h.route
102
+ h.protocol
103
+ ```
104
+
105
+ * **PENSAR**: Change export to show **command output** into reports.
106
+
107
+ ## Internal changes
108
+
109
+ * Implement "scp" over Telnet ¿?
110
+ * Default port values ssh/telnet and default username values (root, Administrator)
111
+ * Use travis
112
+ * `expect_equal "camaleon"`, same as `expect result.equal "camaleon"`.
113
+ * REVISE: verify get(:key) and get('key') works fine!
114
+ * REVISE: Formatter: xml
115
+ * HallOfFame test
116
+ * Rename Laboratory to Checker
117
+ * Unify messages ERROR, INFO, WARN. etc
118
+ * Add tt_label as alias of tt_members
119
+ * **TEST**: actualizar las pruebas con vagrant para la versión actual. Mejora de la calidad del código.
120
+ * **DOCS** PROMOCIONAR. Documentar y hacer videos. Tener foros de la comunidad o presencia en reddit o stackoverflow.... o algo parecido???
121
+
122
+ ## Docker/podman integration
123
+
124
+ Host definition example:
125
+
126
+ ```
127
+ host1_ip:
128
+ host1_port:
129
+ host1_username:
130
+ host1_password:
131
+
132
+ host1_docker_image: "debian:latest"
133
+ host1_docker_name (default value) -> "testname_hostname_case01" as dockername
134
+ host1_docker_preffix: (Code added to docker name) "idp" -> "idp_hostname_case01"
135
+
136
+ host1_docker_vol_rw: "_, _, _"
137
+ host1_docker_vol_ro: "_, _, _"
138
+ ```
139
+
140
+ * Folders to mount docker volumes
141
+ Create temp folders for every case/host.
142
+ but... When create theses folders?
143
+ (1) While running? This may be done automaticaly at running first step
144
+ It's easy but temp folders that not exists before running test
145
+ (2) Before run? New command as: "teuton create-temp" TESTNAME
146
+ It's usefull if we need to put files into temp folders (volumes)
147
+ before running test.
148
+
149
+ ```
150
+ var
151
+ └── test_1
152
+ └── tmp
153
+ ├── case01
154
+ │   ├── host1
155
+ │   └── host2
156
+ ├── case02
157
+ │   ├── host1
158
+ │   └── host2
159
+ └── case03
160
+    ├── host1
161
+    └── host2
162
+ ```
data/docs/dsl/expect.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # expect
4
4
 
5
- Compare the obtained result with the expected one. This comparation process is registered into final report.
5
+ Compare the obtained result with the expected one. This result is registered into final report.
6
6
 
7
7
  ## Example
8
8
 
@@ -11,7 +11,7 @@ Let's see some examples:
11
11
  ```ruby
12
12
  target "Exist user obiwan"
13
13
  run "id obiwan"
14
- expect "obiwan" # Expect run command output will contain "obiwan"
14
+ expect_ok
15
15
  ```
16
16
 
17
17
  ## Simple evaluations
@@ -97,8 +97,10 @@ run 'cat /etc/passwd'
97
97
 
98
98
  Then we can check result with:
99
99
 
100
- * **expect result.find(/obiwan|kenobi/).count.eq(1)**, expect there exists only 1 line with "obiwan" or "kenobi".
101
- * **expect result.find(/darth/).find(/vader/).count.gt(2)**, expect there exists more than 2 lines with texts "darth" and "vader".
102
- * **expect result.not_find('#').find('yoda').count.lt(3)**, expects there exists less than 3 lines with text "yoda" and without "#" symbol.
100
+ ```ruby
101
+ expect result.find(/obiwan|kenobi/).count.eq(1) # only 1 line with "obiwan" or "kenobi".
102
+ expect result.find(/darth/).find(/vader/).count.gt(2) # more than 2 lines with texts "darth" and "vader".
103
+ expect result.not_find('#').find('yoda').count.lt(3) # less than 3 lines with text "yoda" and without "#" symbol.
104
+ ```
103
105
 
104
106
  Read more about [result](result.md) object.
data/docs/dsl/run.md CHANGED
@@ -13,83 +13,42 @@ Execute command on localhost and save output into result object.
13
13
  run "id COMMAND"
14
14
  ```
15
15
 
16
- ## Alias
17
-
18
- In fact it's the same as doing next:
19
-
16
+ Alias:
20
17
  ```ruby
21
18
  run "COMMAND", on: :localhost
22
- ```
23
-
24
- ```ruby
25
19
  run "COMMAND", on: 127.0.0.1
26
- ```
27
-
28
- ```ruby
29
20
  run "COMMAND", on: 'localhost'
30
21
  ```
31
22
 
32
- ## Example
33
-
34
- ```ruby
35
- run "id david"
36
- ```
37
-
38
- * This instruction execute "id david" command on local machine, and save results into **result** object.
39
- * Local machine is where the `Teuton` program is running.
23
+ * This instruction execute "COMMAND" command on local machine, and save results into **result** object.
24
+ * Local machine is where the Teuton program is running.
40
25
 
41
- ---
42
26
  # Remote run
43
27
 
44
28
  Connect to remote host and executes command. The command output is saved into **result** object.
45
29
 
46
30
  ```ruby
47
- run "COMMAND", on: :hostID
48
- ```
49
-
50
- * This example connect to remote host identified by `hostID`. Then we execute the command into it and save the output commadn into result object.
51
- * Label `hostID` identifies specific machine. Host information (ip, username, password, protocol) cames from config file.
52
-
53
- ## Alias
54
-
55
- I know that programers dislike `goto` sentence, but this is diferent. Think of it as english speaker, not as developer.
56
-
57
- ```ruby
58
- on :hostID, run: "COMMAND"
59
- ```
60
-
61
- ```ruby
62
- goto :hostID, :exec => "COMMAND"
63
- ```
64
-
65
- ## Examples
66
-
67
- Execute `id obiwan` comand into remote host `:linux1`.
68
-
69
- ```ruby
70
- run "id obiwan", on: :linux1
31
+ run "COMMAND", on: :HOSTID
71
32
  ```
72
33
 
73
- ## Deprecated
34
+ * This example connect to remote host identified by `HOSTID`. Then we execute the command into it and save the output commadn into result object.
35
+ * Label `HOSTID` identifies specific machine. Host information (ip, username, password, protocol) cames from config file.
74
36
 
37
+ **Example**:
75
38
  ```ruby
76
- run "id obiwan", :on => :linux1
77
- on :linux1, run: "id obiwan"
78
- on :linux1, :run => "id obiwan"
79
- goto :linux1, exec: "id obiwan"
80
- goto :linux1, :exec => "id obiwan"
39
+ # Execute `id obiwan` comand into remote host `:tatooine`.
40
+ run "id obiwan", on: :tatooine
81
41
  ```
82
42
 
83
- ## Protocol
43
+ ## Protocols
84
44
 
85
- **SSH connection**
45
+ ### SSH connection
86
46
 
87
47
  Invoking `run` sentence, will open SSH session with remote host by default.
88
- This config files examples do the same:
89
48
 
90
- Sample 1. By default, SSH connection is established with remote host:
49
+ **Example 1**. By default, SSH connection is established with remote host:
91
50
 
92
- ```
51
+ ```yaml
93
52
  ---
94
53
  :config:
95
54
  ---
@@ -101,9 +60,9 @@ Sample 1. By default, SSH connection is established with remote host:
101
60
  :host1_password: secret
102
61
  ```
103
62
 
104
- Sample 2. `host1_protocol: ssh` force SSH connection with remote host:
63
+ **Example 2**. `host1_protocol: ssh` force SSH connection with remote host:
105
64
 
106
- ```
65
+ ```yaml
107
66
  ---
108
67
  :config:
109
68
  ---
@@ -116,11 +75,13 @@ Sample 2. `host1_protocol: ssh` force SSH connection with remote host:
116
75
  :host1_protocol: ssh
117
76
  ```
118
77
 
119
- **Telnet connection**: Open Telnet remote session.
78
+ ### Telnet connection
79
+
80
+ Open Telnet session with remote host.
120
81
 
121
82
  `host1_protocol: telnet` force Telnet connection with remote host:
122
83
 
123
- ```
84
+ ```yaml
124
85
  ---
125
86
  :global:
126
87
  :cases:
@@ -131,23 +92,25 @@ Sample 2. `host1_protocol: ssh` force SSH connection with remote host:
131
92
  :host1_protocol: telnet
132
93
  ```
133
94
 
134
- **Localhost**: When hostname value is "localhost", or host IP is "127.0.0.X", then
135
- Teuton will assume that you want to run your command on local system, and no remote session is opened.
136
- This examples are the same:
95
+ ### Localhost
137
96
 
97
+ When host is "localhost", or `host_ip: 127.0.0.*` , then Teuton will assume that you want to run your command on local system, and no remote session is opened.
98
+
99
+ Examples:
138
100
  ```
139
101
  run "id david"
102
+ run "id david", on: :localhost
103
+ run "id david", on: 'localhost'
140
104
  ```
141
105
 
142
- And
106
+ ### SSH to localhost
143
107
 
144
- ```
145
- goto :localhost, :exec => "id david"
146
- ```
108
+ Force SSH session to localhost.
147
109
 
148
- **SSH to localhost**: Force SSH session to localhost:
110
+ Iw you need to force SSH connection to localhost, then set param `host1_protocol: ssh`.
149
111
 
150
- ```
112
+ Example:
113
+ ```yaml
151
114
  ---
152
115
  :global:
153
116
  :cases:
@@ -1,12 +1,14 @@
1
- [<< back](README.md)
1
+ [<< back](../../README.md)
2
2
 
3
- # S-NODE installation
3
+ # S-NODE Installation
4
4
 
5
- Install SSH server on every machine with S-NODE role.
5
+ _S-NODE is a host with SSH/Telnet service installed. S-NODE hosts are monitorized by T-NODE host._
6
6
 
7
- **S-node**: Host where SSH server is installed. This hosts are monitorized by T-NODE host.
7
+ S-NODES needs to have the SSH or Telnet service installed.
8
8
 
9
- **GNU/Linux installation**
9
+ ## SSH server installation
10
+
11
+ **SSH GNU/Linux installation**
10
12
 
11
13
  Run this command as `root` user:
12
14
 
@@ -14,7 +16,7 @@ Run this command as `root` user:
14
16
  wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/s-node_install.sh | bash
15
17
  ```
16
18
 
17
- **Windows installation**
19
+ **SSH Windows installation**
18
20
 
19
21
  Requirements:
20
22
  * Windows 7+ / Windows Server 2003+
@@ -26,7 +28,7 @@ Run this command on **PowerShell (PS)** as `Administrator` user:
26
28
  Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/s-node_install.ps1'))
27
29
  ```
28
30
 
29
- **Mac OS X installation**
31
+ **SSH Mac OS X installation**
30
32
 
31
33
  Run this command as `root` user:
32
34
 
@@ -1,20 +1,19 @@
1
- [<< back](README.md)
1
+ [<< back](../../README.md)
2
2
 
3
3
  # T-NODE installation
4
4
 
5
- # 1. Recommended
5
+ _T-NODE is a host with Teuton installed. T-NODE monitors one or severals S-NODE hosts._
6
6
 
7
- Installation:
8
7
  1. Install Ruby on your system.
9
8
  2. `gem install teuton`
10
9
 
11
- Run `teuton version` to check the installed version.
12
-
13
10
  > NOTE:
11
+ > * Show current version: `teuton version`.
12
+ > * Install a specific version: `gem install teuton -v VERSION`. Available versions ([rubygems.org/gems/teuton](https://rubygems.org/gems/teuton/)).
14
13
  > * Update: `gem update teuton`.
15
14
  > * Uninstall: `gem uninstall teuton`.
16
15
 
17
- # 2. Problems
16
+ ## 1. Problems
18
17
 
19
18
  Sometimes we don't find `teuton` command (OpenSUSE distro, for example), so try this:
20
19
 
@@ -26,11 +25,11 @@ Option B:
26
25
  * `find /usr/lib64/ruby -name teuton`, to find absolute path to teuton command.
27
26
  * `sudo ln -s /PATH/TO/bin/teuton /usr/local/bin/teuton`, to create symbolic link to teuton command.
28
27
 
29
- # 3. Installation scripts
28
+ ## 2. Installation scripts
30
29
 
31
30
  If you don't know how to install Ruby on your system, execute this script to run automatical installation for your OS.
32
31
 
33
- **GNU/Linux installation**
32
+ ### 2.1 GNU/Linux installation
34
33
 
35
34
  Run this command as `root` user:
36
35
 
@@ -38,7 +37,7 @@ Run this command as `root` user:
38
37
  wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/t-node_install.sh | bash
39
38
  ```
40
39
 
41
- **Windows installation**
40
+ ### 2.2 Windows installation
42
41
 
43
42
  Requirements:
44
43
  * Windows 7+ / Windows Server 2003+
@@ -50,7 +49,7 @@ Run this command on **PowerShell (PS)** as `Administrator` user:
50
49
  Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/t-node_install.ps1'))
51
50
  ```
52
51
 
53
- **Mac OS X installation**
52
+ ### 2.3 Mac OS X installation
54
53
 
55
54
  Run this command as admin user (member of `admin` group):
56
55
 
@@ -58,11 +57,11 @@ Run this command as admin user (member of `admin` group):
58
57
  curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/install/mac/t-node_install.sh | bash
59
58
  ```
60
59
 
61
- # 4. Vagrant and Docker installation
60
+ ## 3. Vagrant and Docker installation
62
61
 
63
62
  Choose this way if you plan to install Teuton into virtual machines or containers, and you are familiar with Vagrant and Docker technologies.
64
63
 
65
- ## 4.1 Install using Vagrant
64
+ ## 3.1 Install using Vagrant
66
65
 
67
66
  * First, install `Vagrant` and `VirtualBox` on your host.
68
67
  * Create directory for vagrant project. For example, `mkdir teuton-vagrant`.
@@ -70,7 +69,7 @@ Choose this way if you plan to install Teuton into virtual machines or container
70
69
  * Choose and download [Vagrantfile](../../install/vagrant).
71
70
  * Run `vagrant up` to create your Virtual Machine.
72
71
 
73
- ## 4.2 Install using Docker
72
+ ## 3.2 Install using Docker
74
73
 
75
74
  First:
76
75
  * Install `docker` on your host.
@@ -79,13 +78,13 @@ Second, choose:
79
78
  * Pulling docker image from remote or
80
79
  * Rebuild local docker image.
81
80
 
82
- ## 4.2 Pulling docker images from remote
81
+ ## 3.2 Pulling docker images from remote
83
82
 
84
83
  Run this command to pull **dvarrui/teuton** image from Docker Hub and create "teuton" container:
85
84
 
86
85
  `docker run --name teuton -v /home/teuton -i -t dvarrui/teuton /bin/bash`
87
86
 
88
- ## 4.2 Rebuild local docker image
87
+ ## 3.2 Rebuild local docker image
89
88
 
90
89
  1. Create Dockerfile like this:
91
90
 
@@ -112,7 +111,7 @@ CMD ["/bin/bash"]
112
111
 
113
112
  > Notice `/home/teuton` folder is persistent volume.
114
113
 
115
- # 5. Source code
114
+ ## 4. Source code
116
115
 
117
116
  If you want to install Teuton by your own, or there are not installation scripts for your OS, and you don't want to use Vagrant then... here you have information how to install all the required packages for Teuton.
118
117
 
@@ -132,9 +131,9 @@ Manual installation:
132
131
  1. Move into Teuton folder
133
132
  * Run `cd teuton`
134
133
  1. Gems installation.
135
- * `rake install:gems`, to install required gems.
134
+ * `rake install`, to install required gems.
136
135
  1. Only for developers
137
- * Run `rake install:debian` or
138
- * `rake install:opensuse`, install gem for developers.
136
+ * Run `rake devel:debian` or
137
+ * `rake devel:opensuse`, install gem for developers.
139
138
  1. Final check
140
139
  * `rake`
@@ -1,6 +1,6 @@
1
1
  [<< back](README.md)
2
2
 
3
- # Export
3
+ # export
4
4
 
5
5
  [export](../dsl/export.md) keyword generates output reports into diferents formats.
6
6
 
@@ -1,6 +1,6 @@
1
1
  [<< back](README.md)
2
2
 
3
- # Feedback
3
+ # feedback
4
4
 
5
5
  Exporting with false feedback option `export feedback: false`, hide some items from output reports. Hiden items: command, alterations, expected and result.
6
6
 
@@ -6,7 +6,7 @@ As a teacher, probably you are using Moodle platform. So, you want to upload the
6
6
 
7
7
  Teuton generates a file called `moodle.csv` with the grades of each student into CSV format. This file is suitable to import into Moodle platform.
8
8
 
9
- ## tt_moodle_id
9
+ ## `tt_moodle_id` param
10
10
 
11
11
  Add a new field called `tt_moodle_id` to each case in "config.yaml". Fill it with the student's Moodle identification. For example, registered email on or ID number on Moodle platform.
12
12
 
@@ -21,15 +21,15 @@ cases:
21
21
  tt_moodle_id: obiwan@starwars.com
22
22
  ```
23
23
 
24
- Now, when after test execution, use "moodle.csv" output file to load students grades and feedback into your Moodle platform.
24
+ After test execution, use "moodle.csv" output file to load students grades and feedback into your Moodle platform.
25
25
 
26
- ## tt_moodle_max_score
26
+ ## `tt_moodle_max_score` param
27
27
 
28
28
  By default, teuton evaluates grades from 0 to 100. So grade max score is 100.0 by default. Sometimes teachers configure their moodle tasks with diferents max score, so it is necesary adjust Teuton output grades with Moodle input grades.
29
29
 
30
30
  We use `tt_moodle_max_score` to customize Moodle max score. So when Teuton export `moodle.csv` values, divides Teuton grades by this value.
31
31
 
32
- Example:
32
+ ## Example
33
33
 
34
34
  ```
35
35
  global:
@@ -1,14 +1,16 @@
1
1
  [<< back](README.md)
2
2
 
3
- # Example: readme
3
+ # readme
4
4
 
5
5
  Create README files (with test instructions) from our test definition.
6
6
 
7
- ## Definition section
7
+ ## Example
8
8
 
9
9
  Take a look at our test definition section (Group):
10
+
10
11
  ```ruby
11
12
  group "Customize readme output" do
13
+
12
14
  readme "This is our README example."
13
15
  readme "And here we'll see how to use readme keyword"
14
16
 
@@ -26,28 +28,32 @@ end
26
28
 
27
29
  There exists some `readme` instructions after `group` and `target` lines.
28
30
 
29
- ## Execute command
31
+ ## Execution
30
32
 
31
33
  To generate automatically a README file from previous test, execute this:
32
34
 
33
35
  ```
34
- teuton readme example/15-readme > example/15-readme/README.md
36
+ $ teuton readme example/15-readme > example/15-readme/README.md
35
37
  ```
36
38
 
37
39
  ## Result
38
40
 
39
- **Let's see the output**: Content of `example/15-readme/README.md` file.
41
+ Content of `example/15-readme/README.md` file.
40
42
 
41
43
  ---
42
44
 
43
- # 15-readme
45
+ ```
46
+ Date : 2025-11-12 22:11:47 +0000
47
+ Teuton : 2.10.7
48
+ ```
49
+
50
+ # Test: 15-readme
44
51
 
45
52
  ## Customize readme output
46
-
47
53
  This is our readme example.
48
54
  And here we'll see how to use readme keyword
49
55
 
50
56
  Go to [LOCALHOST](#required-hosts) host, and do next:
51
- * Create user david.
57
+ * (x1.0) Create user david.
52
58
  * Help: you can use 'useradd' command to create users.
53
59
  * Remember: Only root is permitted to create new users.