teuton 2.9.4 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -8
- data/docs/changelog/changelog.2.md +9 -1
- data/docs/commands/README.md +33 -65
- data/docs/commands/{example_check.md → check-example.md} +2 -6
- data/docs/commands/{example_run.md → howto-run-tests.md} +16 -10
- data/docs/es/README.md +72 -0
- data/docs/es/aprender/01-cmd_new.md +27 -0
- data/docs/es/aprender/02-target.md +131 -0
- data/docs/es/aprender/README.md +36 -0
- data/docs/install/README.md +10 -6
- data/docs/install/s-node.md +3 -3
- data/docs/install/t-node.md +75 -6
- data/docs/learn/02-target.md +3 -2
- data/lib/teuton/case/config.rb +1 -1
- data/lib/teuton/case/dsl/expect.rb +1 -1
- data/lib/teuton/case/dsl/expect_sequence.rb +2 -2
- data/lib/teuton/case/dsl/run_script.rb +1 -1
- data/lib/teuton/case/dsl/unique.rb +1 -1
- data/lib/teuton/case/execute/execute_base.rb +2 -2
- data/lib/teuton/case/execute/execute_manager.rb +2 -2
- data/lib/teuton/case/execute/execute_ssh.rb +10 -10
- data/lib/teuton/case/execute/execute_telnet.rb +1 -1
- data/lib/teuton/case/host.rb +6 -6
- data/lib/teuton/case_manager/case_manager.rb +1 -0
- data/lib/teuton/case_manager/export_manager.rb +12 -4
- data/lib/teuton/case_manager/report.rb +1 -1
- data/lib/teuton/case_manager/show_report.rb +0 -1
- data/lib/teuton/check/dsl/all.rb +1 -1
- data/lib/teuton/check/show.rb +4 -4
- data/lib/teuton/deprecated/runner.rb +12 -12
- data/lib/teuton/readme/dsl/getset.rb +3 -3
- data/lib/teuton/readme/dsl/run.rb +3 -3
- data/lib/teuton/readme/readme.rb +1 -0
- data/lib/teuton/report/formatter/default/array.rb +1 -1
- data/lib/teuton/report/formatter/default/html.rb +1 -1
- data/lib/teuton/report/formatter/default/json.rb +3 -2
- data/lib/teuton/report/formatter/default/xml.rb +1 -1
- data/lib/teuton/report/formatter/default/yaml.rb +1 -1
- data/lib/teuton/report/formatter/moodle_csv_formatter.rb +1 -1
- data/lib/teuton/report/formatter/resume/array.rb +1 -1
- data/lib/teuton/report/formatter/resume/html.rb +1 -1
- data/lib/teuton/report/formatter/resume/json.rb +3 -2
- data/lib/teuton/report/formatter/resume/yaml.rb +1 -1
- data/lib/teuton/report/report.rb +2 -2
- data/lib/teuton/utils/configfile_reader.rb +2 -1
- data/lib/teuton/version.rb +1 -1
- metadata +20 -16
- data/docs/install/manual.md +0 -41
- data/docs/install/vagrant_docker.md +0 -56
- /data/docs/{diagram.md → devel/diagram.md} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b77d496bd14e955446cbb709c63c7df74059c708949159326e3d2e0edc09b81a
|
|
4
|
+
data.tar.gz: f721aa3a9fd30021bdf15ca26c19b308d7f38e00ea016a43d6b847f7b673f7b8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cdc0745e4b04b7c81893a3aaef4fa1478f55d2c8390edaf1153ad82005238cce3d6a4ff668566528e2eca1a127c941adc1683f2164e4afd75c4125380c2bb77
|
|
7
|
+
data.tar.gz: 88b54291a14bb76f074dd9ec27657ede78142e2388b7e40af5ed058b8cad0e43d1257a6c48b9e60106268aa4b932a532b8953a96a0b600bdfe9787ff4d623cc4
|
data/README.md
CHANGED
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
[](https://badge.fury.io/rb/teuton)
|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
_Test your infrastructure as code._
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The infrastructure test is useful for:
|
|
12
12
|
* Sysadmin teachers who want to evaluate students remote machines.
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* Students who want to evaluate their learning process.
|
|
14
|
+
* Professionals who want to monitor their remote machines.
|
|
15
15
|
|
|
16
16
|
# Installation
|
|
17
17
|
|
|
@@ -25,10 +25,10 @@ gem install teuton
|
|
|
25
25
|
|
|
26
26
|
# Usage
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Use `teuton run TESTPATH` command to run test:
|
|
29
29
|
|
|
30
30
|
```console
|
|
31
|
-
|
|
31
|
+
> teuton run examples/01-target
|
|
32
32
|
|
|
33
33
|
CASE RESULTS
|
|
34
34
|
+------+-----------+-------+-------+
|
|
@@ -37,9 +37,11 @@ CASE RESULTS
|
|
|
37
37
|
+------+-----------+-------+-------+
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
> More information about [commands](docs/commands/README.md)
|
|
41
|
+
|
|
40
42
|
# Features
|
|
41
43
|
|
|
42
|
-
*
|
|
44
|
+
* Use simple DSL to define your tests: `target`, `run`,`expect` and more.
|
|
43
45
|
* Remote devices only require SSH or Telnet service installed.
|
|
44
46
|
* Output format: txt, html, json, yaml, etc.
|
|
45
47
|
* Multiplatform.
|
|
@@ -67,4 +69,6 @@ CASE RESULTS
|
|
|
67
69
|
1. Push to the branch (`git push origin my-new-feature`)
|
|
68
70
|
1. Create new Pull Request.
|
|
69
71
|
|
|
70
|
-
You can also [create issues](https://github.com/teuton-software/teuton/issues) with your requests
|
|
72
|
+
You can also [create issues](https://github.com/teuton-software/teuton/issues) with your requests, incidences or suggestions.
|
|
73
|
+
|
|
74
|
+
> Read [Spanish documentation](docs/es/README.md)
|
|
@@ -125,4 +125,12 @@ DSL send:
|
|
|
125
125
|
## [2.9.4] 20250410
|
|
126
126
|
|
|
127
127
|
- [FIX] Improve the markdown output of the readme.
|
|
128
|
-
- [FIX] Telnet exitcode
|
|
128
|
+
- [FIX] Telnet exitcode
|
|
129
|
+
|
|
130
|
+
## [2.9.5] 20250514
|
|
131
|
+
|
|
132
|
+
- [FIX] `require "json_pure"`is deprecated. Use `json` gem instead of `json_pure`.
|
|
133
|
+
|
|
134
|
+
## [2.9.6] 20251106
|
|
135
|
+
|
|
136
|
+
- [FIX] Problem with `export preserve: true`. It was using old class Application. Now use Project class.
|
data/docs/commands/README.md
CHANGED
|
@@ -6,66 +6,56 @@ Available command functions:
|
|
|
6
6
|
1. [Show help](#1-show-help)
|
|
7
7
|
2. [Show version](#2-show-version)
|
|
8
8
|
3. [Create new test](#3-create-new-test)
|
|
9
|
-
4. [Check
|
|
10
|
-
5. [Run
|
|
9
|
+
4. [Check test](#4-check-test)
|
|
10
|
+
5. [Run test](#5-run-test)
|
|
11
|
+
6. [Show test info as README file](#6-show-test-info-as-readme-file)
|
|
11
12
|
|
|
12
13
|
# 1. Show help
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
teuton
|
|
16
|
-
```
|
|
15
|
+
Show help about command functions.
|
|
17
16
|
|
|
18
17
|
Example:
|
|
19
|
-
|
|
20
18
|
```bash
|
|
21
|
-
|
|
19
|
+
$ teuton help
|
|
22
20
|
Commands:
|
|
23
|
-
teuton [run] [OPTIONS] DIRECTORY # Run
|
|
24
|
-
teuton check [OPTIONS] DIRECTORY #
|
|
21
|
+
teuton [run] [OPTIONS] DIRECTORY # Run test from directory
|
|
22
|
+
teuton check [OPTIONS] DIRECTORY # Check test and config file content
|
|
23
|
+
teuton config DIRECTORY # Suggest configuration
|
|
25
24
|
teuton help [COMMAND] # Describe available commands or one specific command
|
|
26
25
|
teuton new DIRECTORY # Create skeleton for a new project
|
|
27
|
-
teuton readme DIRECTORY #
|
|
26
|
+
teuton readme DIRECTORY # Show README extracted from test contents
|
|
28
27
|
teuton version # Show the program version
|
|
29
|
-
|
|
30
28
|
```
|
|
31
29
|
|
|
32
|
-
|
|
30
|
+
Execute `teuton help FUNCTION_NAME` for more information.
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
* `teuton -h`
|
|
36
|
-
* `teuton --help`
|
|
32
|
+
Alias: `teuton h`,`teuton -h`, `teuton --help`
|
|
37
33
|
|
|
38
34
|
# 2. Show version
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
Show current version.
|
|
37
|
+
|
|
38
|
+
Usage: `teuton version`
|
|
43
39
|
|
|
44
40
|
Example:
|
|
45
41
|
|
|
46
42
|
```bash
|
|
47
43
|
$ teuton version
|
|
48
|
-
teuton (version 2.
|
|
44
|
+
teuton (version 2.9.5)
|
|
49
45
|
```
|
|
50
46
|
|
|
51
|
-
Alias:
|
|
52
|
-
|
|
53
|
-
* `teuton v`
|
|
54
|
-
* `teuton -v`
|
|
55
|
-
* `teuton --version`
|
|
47
|
+
Alias: `teuton v`, `teuton -v`, `teuton --version`
|
|
56
48
|
|
|
57
49
|
# 3. Create new test
|
|
58
50
|
|
|
59
|
-
Create
|
|
51
|
+
Create test skeleton.
|
|
60
52
|
|
|
61
|
-
|
|
62
|
-
teuton new foo
|
|
63
|
-
```
|
|
53
|
+
Usage: `teuton new foo`
|
|
64
54
|
|
|
65
55
|
Example:
|
|
66
56
|
|
|
67
57
|
```console
|
|
68
|
-
|
|
58
|
+
$ teuton new foo
|
|
69
59
|
|
|
70
60
|
[INFO] Creating foo project skeleton
|
|
71
61
|
* Create dir => foo
|
|
@@ -78,24 +68,18 @@ This command will create the next structure:
|
|
|
78
68
|
| File/Directory | Description |
|
|
79
69
|
| --------------- | -------------- |
|
|
80
70
|
| foo | Base directory |
|
|
81
|
-
| foo/start.rb | Main
|
|
71
|
+
| foo/start.rb | Main file with test definitions |
|
|
82
72
|
| foo/config.yaml | YAML configuration file |
|
|
83
73
|
|
|
84
|
-
Alias:
|
|
85
|
-
|
|
86
|
-
* `teuton n foo`
|
|
87
|
-
* `teuton -n foo`
|
|
88
|
-
* `teuton --new foo`
|
|
74
|
+
Alias: `teuton n foo`, `teuton -n foo`, `teuton --new foo`
|
|
89
75
|
|
|
90
|
-
# 4. Check
|
|
76
|
+
# 4. Check test
|
|
91
77
|
|
|
92
|
-
|
|
93
|
-
teuton check DIRPATH
|
|
94
|
-
```
|
|
78
|
+
Check test and config files located into DIRPATH folder.
|
|
95
79
|
|
|
96
|
-
|
|
80
|
+
Usage: `teuton check DIRPATH`
|
|
97
81
|
|
|
98
|
-
[Example](
|
|
82
|
+
[Example](check-example.md)
|
|
99
83
|
|
|
100
84
|
| Command | Description |
|
|
101
85
|
| ---------------------------- | ----------- |
|
|
@@ -104,37 +88,21 @@ Description: this command check teuton test and config files located into DIRPAT
|
|
|
104
88
|
| teuton check path/to/file/foo.rb | Test content of foo.rb and foo.yaml files. |
|
|
105
89
|
| teuton check path/to/file/foo.rb --cname=demo | Test content of foo.rb and demo.yaml files.|
|
|
106
90
|
|
|
107
|
-
Alias:
|
|
91
|
+
Alias: `teuton c foo`, `teuton -c foo`, `teuton --check foo`
|
|
108
92
|
|
|
109
|
-
|
|
110
|
-
* `teuton -c foo`
|
|
111
|
-
* `teuton --check foo`
|
|
93
|
+
# 5. Run test
|
|
112
94
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
teuton run DIRPATH
|
|
117
|
-
```
|
|
95
|
+
Read about [how to run tests](howto-run-tests.md)
|
|
118
96
|
|
|
119
|
-
|
|
97
|
+
# 6. Show test info as README file
|
|
120
98
|
|
|
121
|
-
|
|
99
|
+
Create a readme file for the exercise.
|
|
122
100
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
* `teuton foo`
|
|
126
|
-
|
|
127
|
-
# 6. Show README
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
teuton readme DIRPATH
|
|
131
|
-
```
|
|
101
|
+
Usage: `teuton readme DIRPATH > README.md`
|
|
132
102
|
|
|
133
|
-
|
|
134
|
-
what kind of problem/exercise it is going to be evaluated. The students need this
|
|
135
|
-
information to resolv the problem/exercise into their machines.
|
|
103
|
+
This function reads test and config files, and generate Markdown output with guidelines and target descriptions.
|
|
136
104
|
|
|
137
|
-
|
|
105
|
+
Students will need this information to resolv the proposed problem/exercise into their machines.
|
|
138
106
|
|
|
139
107
|
Alias:
|
|
140
108
|
* `teuton r DIRPATH`
|
|
@@ -9,16 +9,12 @@
|
|
|
9
9
|
| --cpath | Specify path to config file | TEST-FOLDER/config.yaml |
|
|
10
10
|
| --cname | Specify name to config file | config.yaml |
|
|
11
11
|
|
|
12
|
-
Usage:
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
teuton check PATH-TO-TEST-FOLDER
|
|
16
|
-
```
|
|
12
|
+
Usage: `teuton check PATH-TO-TEST-FOLDER`
|
|
17
13
|
|
|
18
14
|
Example:
|
|
19
15
|
|
|
20
16
|
```bash
|
|
21
|
-
|
|
17
|
+
$ teuton check examples/02-target
|
|
22
18
|
|
|
23
19
|
+----------------------------+
|
|
24
20
|
| GROUP: Learn about targets |
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
|
|
2
2
|
[<< back](README.md)
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
# Run test
|
|
5
|
+
|
|
6
|
+
Run test located into DIRPATH folder.
|
|
7
|
+
|
|
8
|
+
Usage: `teuton run DIRPATH`
|
|
9
|
+
|
|
10
|
+
Alias: `teuton foo`
|
|
11
|
+
|
|
12
|
+
1. [Example](#1-example)
|
|
13
|
+
2. [Options](#2-options)
|
|
6
14
|
3. [Choosing config file](#3-choosing-config-file)
|
|
7
15
|
|
|
8
|
-
# 1.
|
|
16
|
+
# 1. Example
|
|
9
17
|
|
|
10
18
|
Running Teuton test located into `example/01-target` folder.
|
|
11
19
|
|
|
12
20
|
```bash
|
|
13
|
-
teuton run example/01-target
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Example:
|
|
21
|
+
$ teuton run example/01-target
|
|
17
22
|
|
|
18
|
-
```bash
|
|
19
23
|
------------------------------------
|
|
20
24
|
Started at 2023-01-21 13:32:24 +0000
|
|
21
25
|
F
|
|
@@ -29,10 +33,12 @@ CASE RESULTS
|
|
|
29
33
|
+------+-----------+-------+-------+
|
|
30
34
|
```
|
|
31
35
|
|
|
32
|
-
|
|
36
|
+
> Output files are saved into `var/01-target` folder.
|
|
37
|
+
|
|
38
|
+
# 2. Options
|
|
33
39
|
|
|
34
40
|
```
|
|
35
|
-
|
|
41
|
+
$ teuton help run
|
|
36
42
|
|
|
37
43
|
Usage:
|
|
38
44
|
teuton [run] [OPTIONS] DIRECTORY
|
data/docs/es/README.md
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
|
|
2
|
+
# TEUTON (ES) - (Documentación en progreso)
|
|
3
|
+
|
|
4
|
+
[](https://badge.fury.io/rb/teuton)
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
_Crear test unitarios para tus máquinas y probar tu infraestructura como si fuera código._
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
El test de infraestructura es útil para:
|
|
12
|
+
* Profesores de administración de sistemas que quieren evaluar a las máquinas remotas de los alumnos.
|
|
13
|
+
* Alumnos que quieren evaluar su proceso de aprendizaje.
|
|
14
|
+
* Profesionales que desean monitorizar sus máquinas remotas.
|
|
15
|
+
|
|
16
|
+
# Instalación
|
|
17
|
+
|
|
18
|
+
Primero es necesario tener instalado `Ruby`y a continuación instalamos Teuton con el siguiente comando:
|
|
19
|
+
|
|
20
|
+
```console
|
|
21
|
+
gem install teuton
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
> Para instalar Teuton sin privilegios de root: `gem install --user-install teuton`
|
|
25
|
+
|
|
26
|
+
# Modo de uso
|
|
27
|
+
|
|
28
|
+
Usaremos el comando `teuton` para ejecutar los tests:
|
|
29
|
+
|
|
30
|
+
```console
|
|
31
|
+
> teuton run examples/01-target
|
|
32
|
+
|
|
33
|
+
CASE RESULTS
|
|
34
|
+
+------+-----------+-------+-------+
|
|
35
|
+
| CASE | MEMBERS | GRADE | STATE |
|
|
36
|
+
| 01 | anonymous | 100.0 | ✔ |
|
|
37
|
+
+------+-----------+-------+-------+
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
> Más información sobre los [comandos](../commands/README.md)
|
|
41
|
+
|
|
42
|
+
# Características
|
|
43
|
+
|
|
44
|
+
* DSL sencillo para definir los tests: `target`, `run`,`expect`, etc.
|
|
45
|
+
* Se usa conexiones SSH o Telnet para acceder a los dispositivos remotos.
|
|
46
|
+
* Formatos de salida: `txt`, `html`, `json`, `yaml`, etc.
|
|
47
|
+
* Multiplatforma.
|
|
48
|
+
* [Licencia de Software Libre](LICENSE).
|
|
49
|
+
|
|
50
|
+
# Documentación
|
|
51
|
+
|
|
52
|
+
* [Instalación](../install/README.md)
|
|
53
|
+
* [Aprender](../learn/README.md)
|
|
54
|
+
* [Ejemplos](../../examples)
|
|
55
|
+
* [Comandos](../commands/README.md)
|
|
56
|
+
* [DSL](../dsl/README.md)
|
|
57
|
+
* [Blogs y videos](../videos.md)
|
|
58
|
+
|
|
59
|
+
# Contacto
|
|
60
|
+
|
|
61
|
+
* **Email**: `teuton.software@protonmail.com`
|
|
62
|
+
|
|
63
|
+
# Contribuciones
|
|
64
|
+
|
|
65
|
+
1. Asegúrate de tener `Ruby`instalado.
|
|
66
|
+
1. Haz un "fork" del proyecto.
|
|
67
|
+
1. Crear tu rama "feature" (`git checkout -b my-new-feature`)
|
|
68
|
+
1. Haz "commit" de tus cambios (`git commit -am 'Add some feature'`)
|
|
69
|
+
1. Haz "push" a la rama (`git push origin my-new-feature`)
|
|
70
|
+
1. Crear un "pull request" nuevo.
|
|
71
|
+
|
|
72
|
+
También se pueden [crear issues](https://github.com/teuton-software/teuton/issues) con peticiones, incidencias o sugerencias.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
|
|
2
|
+
[<< back](README.md)
|
|
3
|
+
|
|
4
|
+
# Nuevo test
|
|
5
|
+
|
|
6
|
+
Crear el esquelero para un nuevo proyecto: `teuton create foo`
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
> teuton new foo
|
|
10
|
+
|
|
11
|
+
[INFO] Creating foo project skeleton
|
|
12
|
+
* Create dir => foo
|
|
13
|
+
* Create file => foo/config.yaml
|
|
14
|
+
* Create file => foo/start.rb
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> NOTA: Lo ficheros se pueden crear manualmente.
|
|
18
|
+
|
|
19
|
+
Este comando crea los siguientes ficheros:
|
|
20
|
+
|
|
21
|
+
| Fichero/Directorio | Descripción |
|
|
22
|
+
| ------------------ | ---------------- |
|
|
23
|
+
| foo | Direcotrio base |
|
|
24
|
+
| foo/start.rb | Script principal |
|
|
25
|
+
| foo/config.yaml | Fichero de configuración |
|
|
26
|
+
|
|
27
|
+
Ahora es el momento de personalizar nuestros objetivos (targets).
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
[<< back](README.md)
|
|
2
|
+
|
|
3
|
+
# target
|
|
4
|
+
|
|
5
|
+
Un [target](../../dsl/target.md) es el objetivo que queremos evaluar. Los objetivos se definen dentro de una sección `group`.
|
|
6
|
+
|
|
7
|
+
## Target definition
|
|
8
|
+
|
|
9
|
+
Cada proceso de evaluación consta de 3 partes:
|
|
10
|
+
|
|
11
|
+
* [target](../../dsl/target.md): Descripción del elemento que va a ser evaluado.
|
|
12
|
+
* [run](../../dsl/run.md): Ejecutar el comando `id obiwan` en la máquina local.
|
|
13
|
+
* [expect](../../dsl/expect.md): Verificar que el resultado del comando devuelve el valor esperado.
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
group "Aprender sobre los targets" do
|
|
17
|
+
|
|
18
|
+
target "Existe el usuario <obiwan>"
|
|
19
|
+
run "id obiwan"
|
|
20
|
+
expect ["uid=", "(obiwan)", "gid="]
|
|
21
|
+
|
|
22
|
+
target "No existe el usuario <vader>"
|
|
23
|
+
run "id vader"
|
|
24
|
+
expect_fail
|
|
25
|
+
end
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> En este ejemplo estamo usando un SO GNU/Linux en la máquina local porque queremos ejecutar el comando `id obiwan`.
|
|
29
|
+
|
|
30
|
+
Cuando el usuario existe, esperamos encontrar estas palabras en la salida del comando: `uid=, (obiwan), gid=`.
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
> id obiwan
|
|
34
|
+
uid=1000(obiwan) gid=1000(obiwan) grupos=1000(obiwan)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Pero cuando el usuario no existe, se esperan una salida de error.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
> id vader
|
|
41
|
+
id: «vader»: no such user
|
|
42
|
+
|
|
43
|
+
> echo $?
|
|
44
|
+
1
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Section de ejecución
|
|
49
|
+
|
|
50
|
+
Cuando se ejecuta el test, se procesa la sección `play`, la cual contiene las siguientes instrucciones:
|
|
51
|
+
|
|
52
|
+
* [show](../../dsl/show.md): mostrar por pantalla información del proceso.
|
|
53
|
+
* [export](../../dsl/export.md): generar informes de salida.
|
|
54
|
+
|
|
55
|
+
```ruby
|
|
56
|
+
play do
|
|
57
|
+
show
|
|
58
|
+
export
|
|
59
|
+
end
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Ejemplo
|
|
63
|
+
|
|
64
|
+
Usa este comando para ejecutar el test:
|
|
65
|
+
|
|
66
|
+
```console
|
|
67
|
+
> teuton run examples/02-target
|
|
68
|
+
|
|
69
|
+
CASE RESULTS
|
|
70
|
+
+------+-----------+-------+-------+
|
|
71
|
+
| CASE | MEMBERS | GRADE | STATE |
|
|
72
|
+
| 01 | anonymous | 100.0 | ✔ |
|
|
73
|
+
+------+-----------+-------+-------+
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Los informes de salida se crean en la carpeta `var/02-target/`:
|
|
77
|
+
|
|
78
|
+
```console
|
|
79
|
+
var
|
|
80
|
+
└── 02-target
|
|
81
|
+
├── case-01.txt
|
|
82
|
+
├── moodle.csv
|
|
83
|
+
└── resume.txt
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Veamos el contenido:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
> cat var/02-target/case-01.txt
|
|
90
|
+
|
|
91
|
+
CONFIGURATION
|
|
92
|
+
+-------------+-----------+
|
|
93
|
+
| tt_members | anonymous |
|
|
94
|
+
| tt_sequence | false |
|
|
95
|
+
| tt_skip | false |
|
|
96
|
+
| tt_testname | 02-target |
|
|
97
|
+
+-------------+-----------+
|
|
98
|
+
|
|
99
|
+
GROUPS
|
|
100
|
+
- Learn about targets
|
|
101
|
+
01 (0.0/1.0)
|
|
102
|
+
Description : Create user obiwan
|
|
103
|
+
Command : id obiwan
|
|
104
|
+
Output : id: «obiwan»: no existe ese usuario
|
|
105
|
+
Duration : 0.002 (local)
|
|
106
|
+
Alterations : find(uid=) & find((obiwan)) & find(gid=) & count
|
|
107
|
+
Expected : Greater than 0
|
|
108
|
+
Result : 0
|
|
109
|
+
02 (1.0/1.0)
|
|
110
|
+
Description : Delete user vader
|
|
111
|
+
Command : id vader
|
|
112
|
+
Output : id: «vader»: no existe ese usuario
|
|
113
|
+
Duration : 0.002 (local)
|
|
114
|
+
Alterations : Read exit code
|
|
115
|
+
Expected : Greater than 0
|
|
116
|
+
Result : 1
|
|
117
|
+
|
|
118
|
+
RESULTS
|
|
119
|
+
+--------------+---------------------------+
|
|
120
|
+
| case_id | 01 |
|
|
121
|
+
| start_time | 2023-06-16 08:42:13 +0100 |
|
|
122
|
+
| finish_time | 2023-06-16 08:42:13 +0100 |
|
|
123
|
+
| duration | 0.004527443 |
|
|
124
|
+
| unique_fault | 0 |
|
|
125
|
+
| max_weight | 2.0 |
|
|
126
|
+
| good_weight | 1.0 |
|
|
127
|
+
| fail_weight | 1.0 |
|
|
128
|
+
| fail_counter | 1 |
|
|
129
|
+
| grade | 50 |
|
|
130
|
+
+--------------+---------------------------+
|
|
131
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
[<< back](../README.md)
|
|
2
|
+
|
|
3
|
+
# Aprender
|
|
4
|
+
|
|
5
|
+
Aprender a escribir tus propios test:
|
|
6
|
+
|
|
7
|
+
1. [Crear un NUEVO test](01-cmd_new.md)
|
|
8
|
+
1. [Evaluating TARGET](02-target.md)
|
|
9
|
+
1. [Checking REMOTE HOSTS](03-remote_hosts.md)
|
|
10
|
+
1. [Reading CONFIG file](04-config.md)
|
|
11
|
+
1. [Using several files](05-use.md)
|
|
12
|
+
1. [CHECK test syntax](06-cmd_check.md)
|
|
13
|
+
1. [Target WEIGHT](07-target_weight.md)
|
|
14
|
+
1. [UNIQUE values](08-unique_values.md)
|
|
15
|
+
1. [SEND report copies to remote hosts](09-send.md)
|
|
16
|
+
1. [DEBUG results](10-debug.md)
|
|
17
|
+
1. [Export other FORMATS](11-export.md)
|
|
18
|
+
1. [PRESERVE old reports](12-preserve.md)
|
|
19
|
+
1. [Hide FEEDBACK from reports](13-feedback.md)
|
|
20
|
+
1. [MOODLE](14-moodle_id.md)
|
|
21
|
+
1. [Build README from test](15-readme.md)
|
|
22
|
+
1. [INCLUDE more configuration files](16-include.md)
|
|
23
|
+
1. [ALIAS](17-alias.md)
|
|
24
|
+
1. [LOG messages](18-log.md)
|
|
25
|
+
1. [Don't get params, just read vars](19-read_vars.md)
|
|
26
|
+
1. [MACROS](20-macros.md)
|
|
27
|
+
1. [Checking exit codes](21-exit_codes.md)
|
|
28
|
+
1. [RESULT object](22-result.md)
|
|
29
|
+
1. [Test code](23-test-code.md)
|
|
30
|
+
1. [Test SQL and database](24-test-sql.md)
|
|
31
|
+
1. [expect vs result](25-expect-result.md) TODO
|
|
32
|
+
1. [EXPECT_SEQUENCE](26-expect_sequence.md)
|
|
33
|
+
1. [RUN_SCRIPT](27-run_script.md)
|
|
34
|
+
1. [UPLOAD](28-upload.md)
|
|
35
|
+
|
|
36
|
+
Mores examples at [teuton-tests](https://github.com/dvarrui/teuton-tests) GitHub repository.
|
data/docs/install/README.md
CHANGED
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Installation
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Teuton installation**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
| **S-node** | [SSH server installation](s-node.md) | S-NODE hosts are monitorized by T-NODE host |
|
|
7
|
+
We call a device with Teuton installed as t-node. [T-NODE](t-node.md) host monitors one or severals S-NODE hosts.
|
|
8
|
+
1. Install Ruby on your system.
|
|
9
|
+
2. `gem install teuton`
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
**SSH server installation**
|
|
12
|
+
|
|
13
|
+
We call e device with SSH/Telnet service as s-node. [S-NODE](s-node.md) hosts are monitorized by T-NODE host.
|
|
14
|
+
1. Install SSH service.
|
|
15
|
+
|
|
16
|
+
Read [modes of use](modes_of_use.md) to know more about differents T-NODE/S-NODE schemes.
|
|
13
17
|
|
|
14
18
|
## Tested OS list
|
|
15
19
|
|
data/docs/install/s-node.md
CHANGED
|
@@ -6,7 +6,7 @@ Install SSH server on every machine with S-NODE role.
|
|
|
6
6
|
|
|
7
7
|
**S-node**: Host where SSH server is installed. This hosts are monitorized by T-NODE host.
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**GNU/Linux installation**
|
|
10
10
|
|
|
11
11
|
Run this command as `root` user:
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Run this command as `root` user:
|
|
|
14
14
|
wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/install/linux/s-node_install.sh | bash
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
**Windows installation**
|
|
18
18
|
|
|
19
19
|
Requirements:
|
|
20
20
|
* Windows 7+ / Windows Server 2003+
|
|
@@ -26,7 +26,7 @@ Run this command on **PowerShell (PS)** as `Administrator` user:
|
|
|
26
26
|
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
27
|
```
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**Mac OS X installation**
|
|
30
30
|
|
|
31
31
|
Run this command as `root` user:
|
|
32
32
|
|