teuton 2.3.11 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -13
  3. data/docs/CHANGELOG.md +0 -13
  4. data/docs/changelog/todo.md +18 -0
  5. data/docs/changelog/v2.4.md +6 -2
  6. data/docs/dsl/execution/export.md +9 -15
  7. data/docs/dsl/execution/show.md +22 -7
  8. data/docs/ideas/{ideas.md → todo.md} +8 -16
  9. data/docs/learn/01-target.md +14 -43
  10. data/docs/learn/02-config.md +20 -37
  11. data/docs/learn/03-remote_hosts.md +20 -1
  12. data/docs/learn/04-new_test.md +4 -4
  13. data/docs/learn/05-use.md +3 -4
  14. data/docs/learn/06-debug.md +6 -9
  15. data/docs/learn/07-log.md +14 -14
  16. data/docs/learn/08-readme.md +4 -4
  17. data/docs/learn/13-include.md +13 -6
  18. data/docs/learn/14-alias.md +14 -8
  19. data/docs/learn/README.md +7 -7
  20. data/lib/teuton/case_manager/case/case.rb +1 -5
  21. data/lib/teuton/case_manager/case/dsl/expect.rb +2 -4
  22. data/lib/teuton/case_manager/case/dsl/log.rb +1 -2
  23. data/lib/teuton/case_manager/case/dsl/send.rb +4 -2
  24. data/lib/teuton/case_manager/case/play.rb +1 -2
  25. data/lib/teuton/case_manager/case/runner.rb +6 -7
  26. data/lib/teuton/case_manager/case_manager.rb +15 -11
  27. data/lib/teuton/case_manager/check_cases.rb +5 -7
  28. data/lib/teuton/case_manager/dsl.rb +1 -1
  29. data/lib/teuton/case_manager/export_manager.rb +13 -15
  30. data/lib/teuton/case_manager/hall_of_fame.rb +20 -16
  31. data/lib/teuton/case_manager/main.rb +1 -2
  32. data/lib/teuton/case_manager/report.rb +3 -3
  33. data/lib/teuton/report/formatter/base_formatter.rb +6 -7
  34. data/lib/teuton/report/formatter/{array_formatter.rb → default/array.rb} +44 -9
  35. data/lib/teuton/report/formatter/default/colored_text.rb +7 -0
  36. data/lib/teuton/report/formatter/default/html.rb +24 -0
  37. data/lib/teuton/report/formatter/default/json.rb +15 -0
  38. data/lib/teuton/report/formatter/{txt_formatter.rb → default/txt.rb} +4 -3
  39. data/lib/teuton/report/formatter/{xml_formatter.rb → default/xml.rb} +10 -4
  40. data/lib/teuton/report/formatter/default/yaml.rb +15 -0
  41. data/lib/teuton/report/formatter/formatter.rb +54 -0
  42. data/lib/teuton/report/formatter/moodle_csv_formatter.rb +4 -10
  43. data/lib/teuton/report/formatter/{resume_array_formatter.rb → resume/array.rb} +4 -7
  44. data/lib/teuton/report/formatter/resume/colored_text.rb +7 -0
  45. data/lib/teuton/report/formatter/{resume_html_formatter.rb → resume/html.rb} +7 -9
  46. data/lib/teuton/report/formatter/{resume_json_formatter.rb → resume/json.rb} +4 -4
  47. data/lib/teuton/report/formatter/{resume_txt_formatter.rb → resume/txt.rb} +4 -6
  48. data/lib/teuton/report/formatter/{resume_yaml_formatter.rb → resume/yaml.rb} +4 -3
  49. data/lib/teuton/report/report.rb +60 -43
  50. data/lib/teuton/report/show.rb +38 -24
  51. data/lib/teuton/version.rb +1 -1
  52. metadata +32 -33
  53. data/lib/teuton/case_manager/show.rb +0 -24
  54. data/lib/teuton/report/close.rb +0 -38
  55. data/lib/teuton/report/formatter/csv_formatter.rb +0 -25
  56. data/lib/teuton/report/formatter/formatter_factory.rb +0 -79
  57. data/lib/teuton/report/formatter/html_formatter.rb +0 -57
  58. data/lib/teuton/report/formatter/json_formatter.rb +0 -12
  59. data/lib/teuton/report/formatter/list_formatter.rb +0 -65
  60. data/lib/teuton/report/formatter/resume_list_formatter.rb +0 -62
  61. data/lib/teuton/report/formatter/yaml_formatter.rb +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a921e5d61265422dfdf27ffdc1f7416969252618b771abae1532d23d106d1fe4
4
- data.tar.gz: 21464a12017ae54c3aaefc4330bba347a6c1b9912a192df0235b8200da3e8679
3
+ metadata.gz: b683fafbf0ece0ad550d4ace207434c8ef27b4b2f37396ff6845c68b37a90694
4
+ data.tar.gz: 5dcb72959f019fdbb9c8a6afc4e87aa23fb8c7a4370e76516db3c0c82f4ce8e3
5
5
  SHA512:
6
- metadata.gz: d887d03658989103a24556e46622146fb8e13f4b45a382bd3b99d33c6183990b6a6487dbb5bfd2dbe416babd9e18878e88764c548c054d9fcc02261401694467
7
- data.tar.gz: f0968a7a1923dfd70d3d9408f6f3fda267cc71bd51a3ed85629afd2e59cf2b4d272a898fd3c5b3bd7a118eac0cc260b6e3927304899163793a9a0d5a9cfefa41
6
+ metadata.gz: 38123e21191880cb1aef35a1a203c2c9af4125b2a7a0e04edb8bbae6d9ed723c1a0bb73a0783a0d951a833b29cf7ab924a42e44bf2a017bcabf38c44724e3ce4
7
+ data.tar.gz: 51a27604a6efef11534f1afe56c995757b6cf167e14eaff34c3245561c5c1ca290491f1897bc231c05e7bd2774cd5186f775e394f563e29d640f04d44574b0dc
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
+ # TEUTON
3
+
2
4
  [![Gem Version](https://badge.fury.io/rb/teuton.svg)](https://badge.fury.io/rb/teuton)
3
5
  ![GitHub](https://img.shields.io/github/license/dvarrui/teuton)
4
- ![Gem](https://img.shields.io/gem/dv/teuton/2.3.10)
5
-
6
- # TEUTON
6
+ ![Gem](https://img.shields.io/gem/dv/teuton/2.3.11)
7
7
 
8
8
  _Create Unit Test for your machines. Test your infraestructure as code._
9
9
 
@@ -18,23 +18,54 @@ Teuton allow us:
18
18
  * Write unit tests for real or virtual devices, using simple DSL.
19
19
  * Check compliance with requirements on local or remote devices.
20
20
 
21
- # Documentation
21
+ # Installation
22
22
 
23
- * [Installation](https://github.com/teuton-software/teuton/tree/master/docs/install/README.md)
24
- * Install Ruby on your system.
25
- * Install Teuton as normal user: `gem install --user-install teuton` (or install as superuser `gem install teuton`).
26
- * [Blogs and videos](docs/videos.md)
27
- * [Learning](docs/learn/README.md)
28
- * [Commands](docs/commands/README.md)
29
- * [Language reference](docs/dsl/README.md)
23
+ Install Ruby and then:
24
+
25
+ ```
26
+ gem install teuton
27
+ ```
28
+
29
+ > Install Teuton as normal user: `gem install --user-install teuton`
30
+
31
+ # Usage
32
+
33
+ Executing `teuton` command to run example test:
34
+
35
+ ```
36
+ ❯ teuton run examples/01-target
37
+
38
+ CASE RESULTS
39
+ +------+-----------+-------+-------+
40
+ | CASE | MEMBERS | GRADE | STATE |
41
+ | 01 | anonymous | 100.0 | ✔ |
42
+ +------+-----------+-------+-------+
43
+
44
+ ```
30
45
 
31
46
  # Features
32
47
 
33
48
  * [Free Software License](LICENSE).
34
49
  * Multiplatform.
35
- * Remote machines only require SSH or Telnet service installed.
36
- * Developed using ruby language.
50
+ * Remote machines/devices only require SSH or Telnet service installed.
51
+
52
+ # Documentation
53
+
54
+ * [Blogs and videos](docs/videos.md)
55
+ * [Learning](docs/learn/README.md)
56
+ * [Commands](docs/commands/README.md)
57
+ * [Language reference](docs/dsl/README.md)
58
+ * [Installation](docs/install/README.md)
37
59
 
38
60
  # Contact
39
61
 
40
62
  * **Email**: `teuton.software@protonmail.com`
63
+
64
+ # Contributing
65
+
66
+ 1. Make sure you have Ruby installed
67
+ 1. Fork it
68
+ 1. Create your feature branch (`git checkout -b my-new-feature`)
69
+ 1. Commit your changes (`git commit -am 'Add some feature'`)
70
+ 1. Push to the branch (`git push origin my-new-feature`)
71
+ 1. Create new Pull Request.
data/docs/CHANGELOG.md CHANGED
@@ -6,16 +6,3 @@
6
6
  * [version 2.2](changelog/v2.2.md)
7
7
  * [version 2.1](changelog/v2.1.md)
8
8
  * [version 2.0](changelog/v2.0.md)
9
-
10
- ## TO-DO
11
-
12
- - Teuton readme --lang=es
13
-
14
- Revise documentation:
15
- * Doc learn 10,11, 12,13 y 14
16
- * 10 result and moodle_id
17
- * 11 get_vars
18
- * 12 alias
19
- * 13 include
20
- * 14 macro
21
- * Doc tt_include
@@ -0,0 +1,18 @@
1
+
2
+ ## TO-DO
3
+
4
+ New features:
5
+ - Teuton readme --lang=es
6
+ - Export files with other langs
7
+
8
+ Revise:
9
+ * verify get(:key) and get('key') works fine!
10
+ * Formatter: xml,
11
+
12
+ Revise documentation:
13
+ * Doc learn 10,11, 12,13 y 14
14
+ * 10 result and moodle_id
15
+ * 12 alias
16
+ * 13 include
17
+ * 14 macro
18
+ * Doc tt_include
@@ -2,10 +2,15 @@
2
2
  ## [2.4.0]
3
3
 
4
4
  New features:
5
+ - Hide feedback from reports: `export feedback: false`
5
6
  - Add new DSL keyword: expect_last, expect_fisrt
6
- - New doc and example: learn-15-exit_codes
7
7
  - Remove os gem.
8
8
  - Change test output colors to green as use others test tools.
9
+ - Change show DSL params. Accepts one param "level" that indicates verbosity output level on screen.
10
+
11
+ New doc and example:
12
+ - 14-alias
13
+ - 16-exit_codes
9
14
 
10
15
  Bug fixed:
11
16
  - All "expect*" keywords must require 2 arguments. The second is optional.
@@ -13,4 +18,3 @@ Bug fixed:
13
18
  Revise
14
19
  - Remove colors to log text
15
20
  - teuton readme: macros, getvars, expect_last, expect_first
16
- - Formatter: xml, csv, list, etc.
@@ -23,13 +23,13 @@ Run test and build reports using `html` output format:
23
23
 
24
24
  ```ruby
25
25
  play do
26
- export format: :html
26
+ export format: 'html'
27
27
  end
28
28
  ```
29
29
 
30
30
  ## Options
31
31
 
32
- 1. **format**: txt, html, yaml. json, colored_text (txt with colors).
32
+ 1. **format**: txt, html, yaml, json, colored_text (txt with colors).
33
33
  2. **preserve**: true, false.
34
34
 
35
35
  ## Usage
@@ -37,16 +37,10 @@ end
37
37
  | | Command | Description |
38
38
  | -- | ------------------------ | ----------- |
39
39
  | 01 | `export` | Export report files using default ouput format |
40
- | 02 | `export format: :txt` | Export file using TXT ouput format |
41
- | 03 | `export format: :html` | Export file using HTML ouput format |
42
- | 04 | `export format: :yaml` | Export file using YAML ouput format |
43
- | 05 | `export format: :json` | Export file using JSON ouput format |
44
- | 06 | `export format: :colored_text` | Export file using colored TXT ouput format |
45
- | 07 | `export preserve: true` | Same as 01 example buy preserving report copies |
46
- | 08 | `export format: :html, preserve: true` | Same as 03 example but preserving report copies |
47
- | 09 | `export format: "txt"` | Same as 02 |
48
- | 10 | `export format: "html"` | Same as 03 |
49
- | 11 | `export format: "yaml"` | Same as 04 |
50
- | 12 | `export format: "json"` | Same as 05 |
51
- | 13 | `export format: "colored_text"` | Same as 06 |
52
- | 14 | `export format: "html", preserve: true` | Same as 08 |
40
+ | 02 | `export format: 'txt'` or `export format: :txt` | Export file using TXT ouput format |
41
+ | 03 | `export format: 'html'` or `export format: :html` | Export file using HTML ouput format |
42
+ | 04 | `export format: 'yaml'` or `export format: :yaml`| Export file using YAML ouput format |
43
+ | 05 | `export format: 'json'` or `export format: :json`| Export file using JSON ouput format |
44
+ | 06 | `export format: 'colored_text'` or `export format: :colored_text` | Export file using colored TXT ouput format |
45
+ | 07 | `export preserve: true` | Export default format and preserve report copies |
46
+ | 08 | `export format: 'html', preserve: true` or `export format: :html, preserve: true` | Export 'html' format and preserve report copies |
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## Description
8
8
 
9
- When tests ends, `show` instruction shows on screen information about final results.
9
+ When all tests are finished, the `show` command displays information on the screen about the final results.
10
10
 
11
11
  ## Usage
12
12
 
@@ -16,11 +16,26 @@ start do
16
16
  end
17
17
  ```
18
18
 
19
+ or
20
+
21
+ ```ruby
22
+ start do
23
+ show verbose: 1
24
+ end
25
+ ```
26
+
19
27
  ## Parameters
20
28
 
21
- | Action | Description |
22
- | -------------- | --------------------------------------- |
23
- | `show` | Same as `show :resume`. Default option. |
24
- | `show :resume` | Show resumed information on screen. |
25
- | `show :cases` | Show information from every case on screen.|
26
- | `show :all` | Same as `show :resume` and `show :details`. |
29
+ | Action | Description |
30
+ | -------------------- | --------------------------------- |
31
+ | `show` | Same as `show level: 0` (Default) |
32
+ | `show verbose: NUMBER` | NUMBER is the value of the verbose level |
33
+
34
+
35
+ | Verbosity level | Description |
36
+ | :-------------: | ----------- |
37
+ | 0 | No output |
38
+ | 1 | Default output messages |
39
+ | 2 | Show hall of fame |
40
+ | 3 | Show final values |
41
+ | 4 | Show Initial values |
@@ -3,24 +3,22 @@
3
3
 
4
4
  Esta es una lista de ideas para que no se me olvide... lo podemos ir ajustando 😊
5
5
 
6
- 1. REPOSITORIOS: teutonget in process
6
+ 1. TEST-EN-CADENA (smart-shell): es un proyecto en curso que trabajará en colaboración ceon teuton. Detecta las acciones del usuario dentro de la shell y automáticamente lanza el test para validar el cumplimiento de los objetivos. Si se supera un % se pasa al siguiente test.
7
7
 
8
- 2. TEST-EN-CADENA (smart-shell): es un proyecto en curso que trabajará en colaboración ceon teuton. Detecta las acciones del usuario dentro de la shell y automáticamente lanza el test para validar el cumplimiento de los objetivos. Si se supera un % se pasa al siguiente test.
9
-
10
- 3. SERVIDOR TEUTON: Teuton web para recibir peticiones de los clientes... ?! Enganchar con teuton-server y teuton-client
8
+ 2. SERVIDOR TEUTON: Teuton web para recibir peticiones de los clientes... ?! Enganchar con teuton-server y teuton-client
11
9
  NO. quizás mejor enfoque. Tener un servidor dedicado con una página Web para lanzar test desde el propio servidor.
12
10
 
13
- 4. Editor de ficheros de configuración.... una especie de asistente de ayuda..
11
+ 3. Editor de ficheros de configuración.... una especie de asistente de ayuda..
14
12
  no le veo mucho sentido tener un editor específico pero si al ejecutar un reto
15
13
  si hay valores con NODATA... entonces que pregunte al usuario y complete la
16
14
  configuración sobre la marcha???
17
15
 
18
- 5. Editor de tests ?! .... lo veo complejo... a menos que se empiece por una versión simplificada.. El DSL es tan sencillo que no le veo sentido a un editor de retos. 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...
16
+ 4. Editor de tests ?! .... lo veo complejo... a menos que se empiece por una versión simplificada.. El DSL es tan sencillo que no le veo sentido a un editor de retos. 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...
19
17
 
20
- 6. `result.test("...")`
21
- 7. `send :email_to => :members_emails`
18
+ 5. `result.test("...")`
19
+ 6. `send :email_to => :members_emails`
22
20
 
23
- 8. Empaquetar tests para facilitar su movilidad . Esto se combina muy bien con la opción de búsqueda de retos.... pensar en firma gpg o md5 de comprobación etc..
21
+ 7. Empaquetar tests para facilitar su movilidad . Esto se combina muy bien con la opción de búsqueda de retos.... pensar en firma gpg o md5 de comprobación etc..
24
22
  Al ejecutar un test poder hacerlo "teuton run PATH/TO/FILE.zip"
25
23
 
26
24
 
@@ -43,7 +41,7 @@ Al ejecutar un test poder hacerlo "teuton run PATH/TO/FILE.zip"
43
41
 
44
42
  Create 2 evaluation modes:
45
43
  1. Evaluate targets (current mode): `start :score=>:targets do ...`
46
- 1. Evaluate task: `start :score=>:tasks do ...`
44
+ 1. Evaluate task: `start :score=>:groups do ...`
47
45
 
48
46
 
49
47
  ## Pending
@@ -60,9 +58,6 @@ Create 2 evaluation modes:
60
58
  * `expect result.ok?`, result from previous goto exec.
61
59
  * `result.exit_code`, exit code from previous goto exec.
62
60
 
63
-
64
- * Review docs and replace `"id #{get(:username)}"` by something line `"id "+get(:username)`.
65
-
66
61
  ### Reports and export keyword
67
62
 
68
63
  * Work on more output formats: CSV, HTML, XML.
@@ -124,9 +119,6 @@ end
124
119
  ```
125
120
 
126
121
  ---
127
- ....
128
122
 
129
- * config -> host_port
130
123
  * teuton run into
131
- * resume.html
132
124
  * txt format -> remove conn_errors when errors = 0
@@ -47,67 +47,38 @@ DSL keywords:
47
47
 
48
48
  ## Run test
49
49
 
50
- **Let's see example**: Executing ` teuton run examples/learn-01-target` command.
50
+ **Let's see example**: Executing ` teuton run examples/01-target` command.
51
51
 
52
52
  ```bash
53
- [INFO] ScriptPath => examples/learn-01-target/start.rb
54
- [INFO] ConfigPath => examples/learn-01-target/config.yaml
55
- [INFO] Pwd => /home/david/proy/repos/teuton.d/teuton
56
- [INFO] TestName => learn-01-target
57
-
58
- ==================================
59
- Executing [teuton] (version 2.2.0)
60
- [INFO] Running in parallel (2020-10-10 12:29:34 +0100)
61
- .
62
- [INFO] Duration = 0.002 (2020-10-10 12:29:34 +0100)
63
- ==================================
64
-
65
- INITIAL CONFIGURATIONS
66
- +---------------+----------------------------------------+
67
- | tt_title | Executing [teuton] (version 2.2.0) |
68
- | tt_scriptname | examples/learn-01-target/start.rb |
69
- | tt_configfile | examples/learn-01-target/config.yaml |
70
- | tt_pwd | /home/david/proy/repos/teuton.d/teuton |
71
- | tt_testname | learn-01-target |
72
- | tt_sequence | false |
73
- +---------------+----------------------------------------+
74
-
75
53
  CASE RESULTS
76
54
  +------+-----------+-------+-------+
77
55
  | CASE | MEMBERS | GRADE | STATE |
78
- | 01 | anonymous | 100.0 | |
56
+ | 01 | anonymous | 100.0 ||
79
57
  +------+-----------+-------+-------+
80
-
81
- FINAL VALUES
82
- +-------------+---------------------------+
83
- | start_time | 2020-10-10 12:29:34 +0100 |
84
- | finish_time | 2020-10-10 12:29:34 +0100 |
85
- | duration | 0.002187719 |
86
- +-------------+---------------------------+
87
58
  ```
88
59
 
89
60
  ## Output reports
90
61
 
91
- **Output directory**: reports created into `var/learn-01-target/` output directory.
62
+ **Output directory**: reports created into `var/01-target/` output directory.
92
63
 
93
64
  ```bash
94
65
  var
95
- └── learn-01-target
66
+ └── 01-target
96
67
  ├── case-01.txt
97
68
  ├── moodle.csv
98
69
  └── resume.txt
99
70
  ```
100
71
 
101
- **Let's see example**: Executing `more var/learn-01-target/case-01.txt` command.
72
+ **Let's see example**: Executing `more var/01-target/case-01.txt` command.
102
73
 
103
74
  ```bash
104
75
  CONFIGURATION
105
- +-------------+-----------------+
106
- | tt_members | anonymous |
107
- | tt_sequence | false |
108
- | tt_skip | false |
109
- | tt_testname | learn-01-target |
110
- +-------------+-----------------+
76
+ +-------------+-----------+
77
+ | tt_members | anonymous |
78
+ | tt_sequence | false |
79
+ | tt_skip | false |
80
+ | tt_testname | 01-target |
81
+ +-------------+-----------+
111
82
 
112
83
  GROUPS
113
84
  - Learn about targets
@@ -122,9 +93,9 @@ GROUPS
122
93
  RESULTS
123
94
  +--------------+---------------------------+
124
95
  | case_id | 01 |
125
- | start_time | 2020-10-10 12:29:34 +0100 |
126
- | finish_time | 2020-10-10 12:29:34 +0100 |
127
- | duration | 0.001781893 |
96
+ | start_time | 2022-12-24 13:31:28 +0000 |
97
+ | finish_time | 2022-12-24 13:31:28 +0000 |
98
+ | duration | 0.001880141 |
128
99
  | unique_fault | 0 |
129
100
  | max_weight | 1.0 |
130
101
  | good_weight | 1.0 |
@@ -58,38 +58,22 @@ end
58
58
  Runing this example and see `show` keyword output:
59
59
 
60
60
  ```bash
61
- > teuton run --no-color examples/learn-02-config
62
- CONFIGURATION
63
- +---------------+----------------------------------------+
64
- | tt_title | Executing [teuton] (version 2.2.0) |
65
- | tt_scriptname | examples/learn-02-config/start.rb |
66
- | tt_configfile | examples/learn-02-config/config.yaml |
67
- | tt_pwd | /home/david/proy/repos/teuton.d/teuton |
68
- | tt_testname | learn-02-config |
69
- | tt_sequence | false |
70
- +---------------+----------------------------------------+
71
-
72
- CASES
61
+ > teuton run examples/02-config
62
+
63
+ CASE RESULTS
73
64
  +------+----------------+-------+-------+
74
65
  | CASE | MEMBERS | GRADE | STATE |
75
- | 01 | Student-name-1 | 100 | |
76
- | 02 | Student-name-2 | 0 | ? |
66
+ | 01 | Student-name-1 | 100.0 ||
67
+ | 02 | Student-name-2 | 0.0 | ? |
77
68
  +------+----------------+-------+-------+
78
-
79
- RESULTS
80
- +-------------+---------------------------+
81
- | start_time | 2020-10-10 12:37:54 +0100 |
82
- | finish_time | 2020-10-10 12:37:54 +0100 |
83
- | duration | 0.002054143 |
84
- +-------------+---------------------------+
85
69
  ```
86
70
 
87
71
  ## Results
88
72
 
89
- Output reports are saved into `var/learn-02-config/` directory. Detail output report is created for every case.
73
+ Output reports are saved into `var/02-config/` directory. Detail output report is created for every case.
90
74
 
91
75
  ```
92
- var/learn-02-config
76
+ var/02-config
93
77
  ├── case-01.txt
94
78
  ├── case-02.txt
95
79
  ├── moodle.csv
@@ -99,23 +83,22 @@ var/learn-02-config
99
83
  Let's see `export` keyword output for case 01.
100
84
 
101
85
  ```
102
- > more var/learn-02-config/case-01.txt
86
+ > more var/02-config/case-01.txt
103
87
  CONFIGURATION
104
- +-------------+-----------------+
105
- | tt_members | Student-name-1 |
106
- | tt_sequence | false |
107
- | tt_skip | false |
108
- | tt_testname | learn-02-config |
109
- | username | root |
110
- +-------------+-----------------+
111
-
88
+ +-------------+----------------+
89
+ | tt_members | Student-name-1 |
90
+ | tt_sequence | false |
91
+ | tt_skip | false |
92
+ | tt_testname | 02-config |
93
+ | username | root |
94
+ +-------------+----------------+
112
95
 
113
96
  GROUPS
114
97
  - Reading params from config file
115
98
  01 (1.0/1.0)
116
- Description : Create user root (username)
99
+ Description : Create user root
117
100
  Command : id root
118
- Duration : 0.001 (local)
101
+ Duration : 0.002 (local)
119
102
  Alterations : find(root) & count
120
103
  Expected : Greater than 0 (String)
121
104
  Result : 1 (Integer)
@@ -123,9 +106,9 @@ GROUPS
123
106
  RESULTS
124
107
  +--------------+---------------------------+
125
108
  | case_id | 01 |
126
- | start_time | 2020-10-10 12:37:54 +0100 |
127
- | finish_time | 2020-10-10 12:37:54 +0100 |
128
- | duration | 0.001762191 |
109
+ | start_time | 2022-12-24 13:33:49 +0000 |
110
+ | finish_time | 2022-12-24 13:33:49 +0000 |
111
+ | duration | 0.001777756 |
129
112
  | unique_fault | 0 |
130
113
  | max_weight | 1.0 |
131
114
  | good_weight | 1.0 |
@@ -81,11 +81,30 @@ end
81
81
 
82
82
  * `send copy_to: :host1` keyword copy output report into remote machine (host1).
83
83
 
84
+ ## Screen output
85
+
86
+ ```
87
+ CASE RESULTS
88
+ +------+---------------+-------+-------+
89
+ | CASE | MEMBERS | GRADE | STATE |
90
+ | 01 | Darth Maul | 0.0 | ? |
91
+ | - | - | 0.0 | |
92
+ | 03 | Obiwan Kenobi | 0.0 | ? |
93
+ +------+---------------+-------+-------+
94
+
95
+ CONN ERRORS
96
+ +------+---------------+-------+------------------+
97
+ | CASE | MEMBERS | HOST | ERROR |
98
+ | 01 | Darth Maul | host1 | host_unreachable |
99
+ | 03 | Obiwan Kenobi | host1 | host_unreachable |
100
+ +------+---------------+-------+------------------+
101
+ ```
102
+
84
103
  ## Results
85
104
 
86
105
  ```
87
106
  var
88
- └── learn-03-remote-hosts
107
+ └── 03-remote-hosts
89
108
  ├── case-01.json
90
109
  ├── case-01.txt
91
110
  ├── case-03.json
@@ -13,8 +13,8 @@ Steps:
13
13
 
14
14
  Create skeleton for a new project: `teuton create foo`
15
15
 
16
- ```bash
17
- $ teuton new foo
16
+ ```
17
+ > teuton new foo
18
18
 
19
19
  [INFO] Creating foo project skeleton
20
20
  * Create dir => foo
@@ -22,7 +22,7 @@ $ teuton new foo
22
22
  * Create file => foo/start.rb
23
23
  ```
24
24
 
25
- > It's posible to create these files by hand.
25
+ > NOTA: It is posible to create these files by hand.
26
26
 
27
27
  This command will create:
28
28
 
@@ -81,7 +81,7 @@ Use a YAML file (`foo/config.yaml`) or JSON for your own configurations. In this
81
81
  Now we only have to run the challenge:
82
82
 
83
83
  ```bash
84
- $ teuton foo
84
+ > teuton run foo
85
85
  ```
86
86
 
87
87
  Output files are saved into `var/foo` directory.
data/docs/learn/05-use.md CHANGED
@@ -16,8 +16,9 @@ Learn how to:
16
16
  This example has more files:
17
17
 
18
18
  ```bash
19
- $ tree example/learn-04-use
20
- example/learn-04-require
19
+ > tree example/04-use
20
+
21
+ example/04-require
21
22
  ├── config.yaml
22
23
  ├── network.rb
23
24
  ├── README.md
@@ -25,8 +26,6 @@ example/learn-04-require
25
26
  └── users.rb
26
27
  ```
27
28
 
28
- * `README.md` and `config.yaml` are the same as previous example.
29
-
30
29
  ## Execution section
31
30
 
32
31
  Previous `start.rb` file is now splited in: start.rb, users.rb and network.rb.
@@ -14,8 +14,9 @@ Learn how to:
14
14
 
15
15
  ## Tree directory
16
16
 
17
- ```bash
18
- $ tree learn/learn-06-debug
17
+ ```
18
+ > tree learn/learn-06-debug
19
+
19
20
  example/learn-06-debug
20
21
  ├── config.yaml
21
22
  ├── external.rb
@@ -48,12 +49,7 @@ When this happend, sometimes we need to verify or check rb file consistency and
48
49
 
49
50
  Let's see example `teuton check examples/learn-01-target`:
50
51
 
51
- ```bash
52
- [INFO] ScriptPath => examples/learn-01-target/start.rb
53
- [INFO] ConfigPath => examples/learn-01-target/config.yaml
54
- [INFO] Pwd => /mnt/home/leap/proy/repos/teuton.d/teuton
55
- [INFO] TestName => learn-01-target
56
-
52
+ ```
57
53
  +----------------------------+
58
54
  | GROUP: Learn about targets |
59
55
  +----------------------------+
@@ -78,12 +74,13 @@ Let's see example `teuton check examples/learn-01-target`:
78
74
  +----------------------+
79
75
  | Revising CONFIG file |
80
76
  +----------------------+
81
- [WARN] File ./examples/learn-01-target/config.yaml not found!
77
+ [WARN] File /home/david/proy/repos/teuton.d/teuton/examples/01-target/config.yaml not found!
82
78
  [INFO] Recomended content:
83
79
  ---
84
80
  :global:
85
81
  :cases:
86
82
  - :tt_members: VALUE
83
+
87
84
  ```
88
85
 
89
86
  In this case, Teuton detects that there isn't exist config file, and propose us content for `config.yaml`.
data/docs/learn/07-log.md CHANGED
@@ -27,27 +27,27 @@ end
27
27
 
28
28
  ## Result
29
29
 
30
- **Let's see example**: Content of `var/learn-07-log/case-01.txt` file.
30
+ **Let's see example**: Content of `var/07-log/case-01.txt` file.
31
31
 
32
- ```bash
32
+ ```
33
33
  CONFIGURATION
34
- +-------------+--------------+
35
- | tt_members | anonymous |
36
- | tt_sequence | false |
37
- | tt_skip | false |
38
- | tt_testname | learn-07-log |
39
- +-------------+--------------+
34
+ +-------------+-----------+
35
+ | tt_members | anonymous |
36
+ | tt_sequence | false |
37
+ | tt_skip | false |
38
+ | tt_testname | 07-log |
39
+ +-------------+-----------+
40
40
 
41
41
  LOGS
42
- [19:23:20] : Using log messages...
43
- [19:23:20] ERROR: Problem detected!
42
+ [13:45:02] : Using log messages...
43
+ [13:45:02] ERROR: Problem detected!
44
44
 
45
45
  GROUPS
46
46
  - Learning about log messages
47
47
  01 (1.0/1.0)
48
48
  Description : Create user david
49
49
  Command : id david
50
- Duration : 0.003 (local)
50
+ Duration : 0.002 (local)
51
51
  Alterations : find(david) & count
52
52
  Expected : Greater than 0 (String)
53
53
  Result : 1 (Integer)
@@ -55,9 +55,9 @@ GROUPS
55
55
  RESULTS
56
56
  +--------------+---------------------------+
57
57
  | case_id | 01 |
58
- | start_time | 2020-04-22 19:23:20 +0100 |
59
- | finish_time | 2020-04-22 19:23:20 +0100 |
60
- | duration | 0.003096755 |
58
+ | start_time | 2022-12-24 13:45:02 +0000 |
59
+ | finish_time | 2022-12-24 13:45:02 +0000 |
60
+ | duration | 0.001900685 |
61
61
  | unique_fault | 0 |
62
62
  | max_weight | 1.0 |
63
63
  | good_weight | 1.0 |