teuton 2.3.11 → 2.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -13
  3. data/docs/CHANGELOG.md +0 -13
  4. data/docs/changelog/todo.md +26 -0
  5. data/docs/changelog/v2.4.md +6 -2
  6. data/docs/dsl/execution/export.md +11 -16
  7. data/docs/dsl/execution/show.md +22 -7
  8. data/docs/ideas/{ideas.md → todo.md} +8 -16
  9. data/docs/install/README.md +26 -42
  10. data/docs/install/s-node.md +35 -0
  11. data/docs/install/t-node.md +76 -0
  12. data/docs/learn/01-target.md +34 -66
  13. data/docs/learn/02-config.md +35 -56
  14. data/docs/learn/03-remote_hosts.md +20 -1
  15. data/docs/learn/04-new_test.md +4 -4
  16. data/docs/learn/05-use.md +3 -4
  17. data/docs/learn/06-debug.md +6 -9
  18. data/docs/learn/07-log.md +14 -14
  19. data/docs/learn/08-readme.md +4 -4
  20. data/docs/learn/09-preserve.md +1 -1
  21. data/docs/learn/13-include.md +13 -6
  22. data/docs/learn/14-alias.md +14 -8
  23. data/docs/learn/17-hide-feedback.md +52 -0
  24. data/docs/learn/README.md +8 -15
  25. data/lib/teuton/case_manager/case/case.rb +2 -5
  26. data/lib/teuton/case_manager/case/dsl/expect.rb +2 -4
  27. data/lib/teuton/case_manager/case/dsl/log.rb +1 -2
  28. data/lib/teuton/case_manager/case/dsl/send.rb +4 -2
  29. data/lib/teuton/case_manager/case/play.rb +1 -2
  30. data/lib/teuton/case_manager/case/runner.rb +6 -7
  31. data/lib/teuton/case_manager/case_manager.rb +18 -12
  32. data/lib/teuton/case_manager/check_cases.rb +5 -7
  33. data/lib/teuton/case_manager/dsl.rb +1 -1
  34. data/lib/teuton/case_manager/export_manager.rb +13 -15
  35. data/lib/teuton/case_manager/hall_of_fame.rb +20 -16
  36. data/lib/teuton/case_manager/main.rb +1 -2
  37. data/lib/teuton/case_manager/report.rb +3 -3
  38. data/lib/teuton/report/formatter/base_formatter.rb +8 -7
  39. data/lib/teuton/report/formatter/{array_formatter.rb → default/array.rb} +44 -9
  40. data/lib/teuton/report/formatter/default/colored_text.rb +7 -0
  41. data/lib/teuton/report/formatter/default/html.rb +24 -0
  42. data/lib/teuton/report/formatter/default/json.rb +15 -0
  43. data/lib/teuton/report/formatter/{txt_formatter.rb → default/txt.rb} +4 -3
  44. data/lib/teuton/report/formatter/{xml_formatter.rb → default/xml.rb} +10 -4
  45. data/lib/teuton/report/formatter/default/yaml.rb +15 -0
  46. data/lib/teuton/report/formatter/formatter.rb +55 -0
  47. data/lib/teuton/report/formatter/moodle_csv_formatter.rb +4 -10
  48. data/lib/teuton/report/formatter/{resume_array_formatter.rb → resume/array.rb} +4 -7
  49. data/lib/teuton/report/formatter/resume/colored_text.rb +7 -0
  50. data/lib/teuton/report/formatter/{resume_html_formatter.rb → resume/html.rb} +7 -9
  51. data/lib/teuton/report/formatter/{resume_json_formatter.rb → resume/json.rb} +4 -4
  52. data/lib/teuton/report/formatter/{resume_txt_formatter.rb → resume/txt.rb} +4 -6
  53. data/lib/teuton/report/formatter/{resume_yaml_formatter.rb → resume/yaml.rb} +4 -3
  54. data/lib/teuton/report/report.rb +60 -43
  55. data/lib/teuton/report/show.rb +38 -24
  56. data/lib/teuton/version.rb +1 -1
  57. data/lib/teuton.rb +2 -1
  58. metadata +38 -35
  59. data/docs/install/scripts.md +0 -96
  60. data/lib/teuton/case_manager/show.rb +0 -24
  61. data/lib/teuton/report/close.rb +0 -38
  62. data/lib/teuton/report/formatter/csv_formatter.rb +0 -25
  63. data/lib/teuton/report/formatter/formatter_factory.rb +0 -79
  64. data/lib/teuton/report/formatter/html_formatter.rb +0 -57
  65. data/lib/teuton/report/formatter/json_formatter.rb +0 -12
  66. data/lib/teuton/report/formatter/list_formatter.rb +0 -65
  67. data/lib/teuton/report/formatter/resume_list_formatter.rb +0 -62
  68. 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: 4abcfe5aee651ce09c17012de250c39c6286b3d11ba00462f6ab285224d65d49
4
+ data.tar.gz: 1158d3a447ad5c0a9c8b2cc7e524fa8c235d00492243f6959be890c379c9ea12
5
5
  SHA512:
6
- metadata.gz: d887d03658989103a24556e46622146fb8e13f4b45a382bd3b99d33c6183990b6a6487dbb5bfd2dbe416babd9e18878e88764c548c054d9fcc02261401694467
7
- data.tar.gz: f0968a7a1923dfd70d3d9408f6f3fda267cc71bd51a3ed85629afd2e59cf2b4d272a898fd3c5b3bd7a118eac0cc260b6e3927304899163793a9a0d5a9cfefa41
6
+ metadata.gz: 3006a5ecbb9b8ee634b62704d80911175c9a02e3e0e2d7388e191071bd27a8accbd89871139252f0e587ead1be3feac6bee7f0e04ba40cb734660173215aa4d9
7
+ data.tar.gz: 4c47dbe5964231ca099dd530beac2ba4266b085fe8f0c8a93473f4f8089bdede91cbdcf94b6bb463b9f6686b38930de250cba7f478530dd4d47ceee9c5d32c9a
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.4.0)
7
7
 
8
8
  _Create Unit Test for your machines. Test your infraestructure as code._
9
9
 
@@ -18,23 +18,55 @@ 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
+ ```console
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
+ ```console
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
+ * [Learn](docs/learn/README.md)
55
+ * [Commands](docs/commands/README.md)
56
+ * [Language reference](docs/dsl/README.md)
57
+ * [Installation](docs/install/README.md)
58
+
59
+ > [Blogs and videos](docs/videos.md)
37
60
 
38
61
  # Contact
39
62
 
40
63
  * **Email**: `teuton.software@protonmail.com`
64
+
65
+ # Contributing
66
+
67
+ 1. Make sure you have Ruby installed
68
+ 1. Fork it
69
+ 1. Create your feature branch (`git checkout -b my-new-feature`)
70
+ 1. Commit your changes (`git commit -am 'Add some feature'`)
71
+ 1. Push to the branch (`git push origin my-new-feature`)
72
+ 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,26 @@
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
19
+
20
+ Internal changes:
21
+ * Application to Settings
22
+ * Laboratory to Checker
23
+ * Colorize to Rainbow
24
+ * Unify messages ERROR, INFO, WARN. etc
25
+ * Create SendManager as ExportManager?
26
+ * Add tt_label as alias of tt_members
@@ -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 "verbose: NUMBER" to adjust 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,30 +23,25 @@ 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).
33
- 2. **preserve**: true, false.
32
+ 1. **format**: txt (default), html, yaml, json, colored_text (txt with colors).
33
+ 2. **preserve**: false (default), true.
34
+ 3. **feedback**: true (default), false
34
35
 
35
36
  ## Usage
36
37
 
37
38
  | | Command | Description |
38
39
  | -- | ------------------------ | ----------- |
39
40
  | 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 |
41
+ | 02 | `export format: 'txt'` or `export format: :txt` | Export file using TXT ouput format |
42
+ | 03 | `export format: 'html'` or `export format: :html` | Export file using HTML ouput format |
43
+ | 04 | `export format: 'yaml'` or `export format: :yaml`| Export file using YAML ouput format |
44
+ | 05 | `export format: 'json'` or `export format: :json`| Export file using JSON ouput format |
45
+ | 06 | `export format: 'colored_text'` or `export format: :colored_text` | Export file using colored TXT ouput format |
46
+ | 07 | `export preserve: true` | Export default format and preserve report copies |
47
+ | 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
@@ -1,44 +1,28 @@
1
1
  [<< back](../../README.md)
2
2
 
3
- # Installation
4
-
5
- > Definitions:
6
- > * **T-node**: Host where Teuton software is installed. A T-NODE monitors several S-NODE hosts.
7
- > * **S-node**: Host where SSH server is installed. This hosts are monitotized by T-NODE host.
8
- >
9
- > Read [Modes of use](modes_of_use.md) to know about different Teuton ways of using it.
10
-
11
- ## T-NODE installation
12
-
13
- * **Install** Teuton (T-NODE role host):
14
- 1. Install Ruby on your system.
15
- 2. `gem install teuton`
16
- * Run `teuton version` to check the installed version.
17
-
18
- > **PROBLEMS**: If you don't find `teuton` command (OpenSUSE distro, for example), try this:
19
- > * Option A:
20
- > * `ruby -v`, display your current ruby version. Suppose it is "2.5".
21
- > * Run `teuton.ruby2.5`, instead of `teuton`.
22
- > * Option B:
23
- > * `find /usr/lib64/ruby -name teuton`, to find absolute path to teuton command.
24
- > * `sudo ln -s /PATH/TO/bin/teuton /usr/local/bin/teuton`, to create symbolic link to teuton command.
25
-
26
- * **Update** Teuton with `gem teuton update`.
27
- * **Uninstall** Teuton with `gem uninstall teuton`.
28
-
29
- ## S-NODE installation
30
-
31
- * **Install** SSH server on every machine with S-NODE role.
32
-
33
- ---
34
- # Other installation ways
35
-
36
- **Scripts**: [Installation using scripts](scripts.md)
37
- * These scripts run automatical installation for your OS.
38
- * Choose this way if you don't know how to install Ruby on your system.
39
-
40
- **Vagrant or Docker**: [Installation using Vagrant or Docker](vagrant_docker.md)
41
- * Choose this way if you plan to install Teuton into virtual machines or containers, and you are familiar with Vagrant and Docker technologies.
42
-
43
- **Manual**: [Manual installation](manual.md)
44
- * 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.
3
+ # Installation process
4
+
5
+ There are 2 types of nodes/hosts:
6
+
7
+ | ID | Software | Description |
8
+ | -- | -------- | ----------- |
9
+ | **T-node** | [Teuton installation](t-node.md) | T-NODE host monitors one or severals S-NODE hosts |
10
+ | **S-node** | [SSH server installation](s-node.md) | S-NODE hosts are monitorized by T-NODE host |
11
+
12
+ Read [modes of use](modes_of_use.md) to know more about differents T-NODE/S-NODE schemes.
13
+
14
+ ## Tested OS list
15
+
16
+ | Type | O.S. | Version | Arch | T-node | S-node |
17
+ | --------- | --------- | -------------- | ------ | ------ | ------ |
18
+ | GNU/Linux | CentOS | 7 | x86-64 | | |
19
+ | | Debian | 9.7.0 | x86-64 | Ok | |
20
+ | | Fedora | Workstation 29 | x84-64 | Ok | |
21
+ | | LinuxMint | 18.3 | x86-64 | Ok | |
22
+ | | openSUSE | Leap 15 | x86-64 | Ok | Ok |
23
+ | | Ubuntu | 18.04 | x86-64 | Ok | Ok |
24
+ | Microsoft | Windows | 7 Enterprise | x86 | Ok | |
25
+ | | Windows | 10 Pro | x86-64 | Ok | Ok |
26
+ | | Windows | Server 2012 R2 | x86-64 | | |
27
+ | Apple | Mac OS X | Capitán (10.11.6) | x86-64 | Ok | Ok |
28
+ | | Mac OS X | Sierra (10.12) | x86-64 | Ok | |
@@ -0,0 +1,35 @@
1
+ [<< back](README.md)
2
+
3
+ # S-NODE installation
4
+
5
+ Install SSH server on every machine with S-NODE role.
6
+
7
+ **S-node**: Host where SSH server is installed. This hosts are monitorized by T-NODE host.
8
+
9
+ **S-node GNU/Linux installation**
10
+
11
+ Run this command as `root` user:
12
+
13
+ ```bash
14
+ wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/linux_s-node_install.sh | bash
15
+ ```
16
+
17
+ **S-node Windows installation**
18
+
19
+ Requirements:
20
+ * Windows 7+ / Windows Server 2003+
21
+ * PowerShell v2+
22
+
23
+ Run this command on **PowerShell (PS)** as `Administrator` user:
24
+
25
+ ```powershell
26
+ Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/windows_s-node_install.ps1'))
27
+ ```
28
+
29
+ **S-node Mac OS X installation**
30
+
31
+ Run this command as `root` user:
32
+
33
+ ```bash
34
+ curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/install/mac/macosx_s-node_install.sh | bash
35
+ ```
@@ -0,0 +1,76 @@
1
+ [<< back](README.md)
2
+
3
+ # T-NODE installation
4
+
5
+ # 1. Recommended
6
+
7
+ **Installation**
8
+
9
+ 1. Install Ruby on your system.
10
+ 2. `gem install teuton`
11
+
12
+ Run `teuton version` to check the installed version.
13
+
14
+ **Update**
15
+
16
+ `gem teuton update`.
17
+
18
+ **Uninstall**
19
+
20
+ `gem uninstall teuton`.
21
+
22
+ # 2. Problems
23
+
24
+ Don't find `teuton` command (OpenSUSE distro, for example), try this:
25
+
26
+ Option A:
27
+ * `ruby -v`, display your current ruby version. Suppose it is "2.5".
28
+ * Run `teuton.ruby2.5`, instead of `teuton`.
29
+
30
+ Option B:
31
+ * `find /usr/lib64/ruby -name teuton`, to find absolute path to teuton command.
32
+ * `sudo ln -s /PATH/TO/bin/teuton /usr/local/bin/teuton`, to create symbolic link to teuton command.
33
+
34
+ # 3. Installation scripts
35
+
36
+ If you don't know how to install Ruby on your system, execute this script to run automatical installation for your OS.
37
+
38
+ **T-node GNU/Linux installation**
39
+
40
+ Run this command as `root` user:
41
+
42
+ ```bash
43
+ wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/linux_t-node_install.sh | bash
44
+ ```
45
+
46
+ **T-node Windows installation**
47
+
48
+ Requirements:
49
+ * Windows 7+ / Windows Server 2003+
50
+ * PowerShell v2+
51
+
52
+ Run this command on **PowerShell (PS)** as `Administrator` user:
53
+
54
+ ```powershell
55
+ Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/install/windows/windows_t-node_install.ps1'))
56
+ ```
57
+
58
+ **T-node Mac OS X installation**
59
+
60
+ Run this command as admin user (member of `admin` group):
61
+
62
+ ```bash
63
+ curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/install/mac/macosx_t-node_install.sh | bash
64
+ ```
65
+
66
+ # 4. Vagrant/Docker
67
+
68
+ Choose this way if you plan to install Teuton into virtual machines or containers, and you are familiar with Vagrant and Docker technologies.
69
+
70
+ [Installation using Vagrant or Docker](vagrant_docker.md)
71
+
72
+ # 5. Source code
73
+
74
+ 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.
75
+
76
+ [Manual installation](manual.md)
@@ -1,18 +1,17 @@
1
1
  [<< back](README.md)
2
2
 
3
- # Example: 01-target
3
+ # Example: target
4
4
 
5
- Let's learn how to create our first target.
6
- A target is a feature you want to measure or check.
7
-
8
- 1. [Definition section](#definition-section)
9
- 2. [Execution section](#execution-section)
10
- 3. [Run test](#run-test)
11
- 4. [Output reports](#output-reports)
5
+ A target is a feature you want to check.
12
6
 
13
7
  ## Definition section
14
8
 
15
- Test definition section (Group):
9
+ Test definition section (`group`):
10
+
11
+ * **target**: Description of the element to be tested.
12
+ * **run**: Execute a command `id david` on localhost.
13
+ * **expect**: Ensure the result contains expected value.
14
+
16
15
  ```ruby
17
16
  group "Learn about targets" do
18
17
 
@@ -23,16 +22,14 @@ group "Learn about targets" do
23
22
  end
24
23
  ```
25
24
 
26
- Define targets using these lines:
27
- * **target**: Description of the element to be tested.
28
- * **run**: Execute a command `id david` on localhost.
29
- * **expect**: Ensure the result contains expected value.
30
-
31
25
  > In this example, localhost's OS must be GNU/Linux (any other compatible OS) because the command used is `id david`.
32
26
 
33
27
  ## Execution section
34
28
 
35
- Test execution section (Play):
29
+ Test execution section (`play`):
30
+
31
+ * **show**: display process information on screen.
32
+ * **export**: build output reports.
36
33
 
37
34
  ```ruby
38
35
  play do
@@ -41,73 +38,44 @@ play do
41
38
  end
42
39
  ```
43
40
 
44
- DSL keywords:
45
- * **show**: display process information on screen.
46
- * **export**: build output reports.
41
+ ## Running the test
47
42
 
48
- ## Run test
49
-
50
- **Let's see example**: Executing ` teuton run examples/learn-01-target` command.
51
-
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
- +---------------+----------------------------------------+
43
+ Execute this command to run the test:
44
+
45
+ ```console
46
+ > teuton run examples/01-target
74
47
 
75
48
  CASE RESULTS
76
49
  +------+-----------+-------+-------+
77
50
  | CASE | MEMBERS | GRADE | STATE |
78
- | 01 | anonymous | 100.0 | |
51
+ | 01 | anonymous | 100.0 ||
79
52
  +------+-----------+-------+-------+
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
53
  ```
88
54
 
89
55
  ## Output reports
90
56
 
91
- **Output directory**: reports created into `var/learn-01-target/` output directory.
57
+ Report files created into `var/01-target/`:
92
58
 
93
- ```bash
59
+ ```console
94
60
  var
95
- └── learn-01-target
61
+ └── 01-target
96
62
  ├── case-01.txt
97
63
  ├── moodle.csv
98
64
  └── resume.txt
99
65
  ```
100
66
 
101
- **Let's see example**: Executing `more var/learn-01-target/case-01.txt` command.
67
+ Let's see one report:
68
+
69
+ ```
70
+ > more var/01-target/case-01.txt
102
71
 
103
- ```bash
104
72
  CONFIGURATION
105
- +-------------+-----------------+
106
- | tt_members | anonymous |
107
- | tt_sequence | false |
108
- | tt_skip | false |
109
- | tt_testname | learn-01-target |
110
- +-------------+-----------------+
73
+ +-------------+-----------+
74
+ | tt_members | anonymous |
75
+ | tt_sequence | false |
76
+ | tt_skip | false |
77
+ | tt_testname | 01-target |
78
+ +-------------+-----------+
111
79
 
112
80
  GROUPS
113
81
  - Learn about targets
@@ -122,9 +90,9 @@ GROUPS
122
90
  RESULTS
123
91
  +--------------+---------------------------+
124
92
  | 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 |
93
+ | start_time | 2022-12-24 13:31:28 +0000 |
94
+ | finish_time | 2022-12-24 13:31:28 +0000 |
95
+ | duration | 0.001880141 |
128
96
  | unique_fault | 0 |
129
97
  | max_weight | 1.0 |
130
98
  | good_weight | 1.0 |