teuton 2.1.1 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -21
- data/docs/Challenge-Server-Project.md +50 -0
- data/docs/changelog/servidor-de-retos.md +53 -0
- data/docs/changelog/todo.md +46 -0
- data/docs/changelog/v2.0.md +17 -0
- data/docs/changelog/v2.1.md +139 -0
- data/docs/commands/commands.md +10 -0
- data/docs/commands/create_skeleton.md +31 -0
- data/docs/commands/help.md +13 -0
- data/docs/commands/revise_test.md +46 -0
- data/docs/commands/run_test_unit.md +78 -0
- data/docs/commands/show_version.md +9 -0
- data/docs/developers/01-telnet.md +121 -0
- data/docs/developers/02-ssh.md +93 -0
- data/docs/developers/03-encoding.md +153 -0
- data/docs/developers/comparative.md +17 -0
- data/docs/dsl/_Sidebar.md +30 -0
- data/docs/dsl/definition/expect.md +56 -0
- data/docs/dsl/definition/goto.md +112 -0
- data/docs/dsl/definition/group.md +16 -0
- data/docs/dsl/definition/result.md +76 -0
- data/docs/dsl/definition/run.md +23 -0
- data/docs/dsl/definition/target.md +35 -0
- data/docs/dsl/execution/export.md +39 -0
- data/docs/dsl/execution/play.md +16 -0
- data/docs/dsl/execution/send.md +54 -0
- data/docs/dsl/execution/show.md +21 -0
- data/docs/dsl/keywords.md +53 -0
- data/docs/dsl/setting/get.md +36 -0
- data/docs/dsl/setting/set.md +18 -0
- data/docs/install/install.md +32 -0
- data/docs/install/manual_install.md +25 -0
- data/docs/install/modes_of_use.md +38 -0
- data/docs/install/scripts_install.md +76 -0
- data/docs/install/tested_od.md +25 -0
- data/docs/install/vagrant_install.md +15 -0
- data/docs/learn/example-01-target.md +117 -0
- data/docs/learn/example-02-configfile.md +168 -0
- data/docs/learn/example-03-remote-hosts.md +90 -0
- data/docs/learn/example-04-use.md +74 -0
- data/docs/learn/example-05-debug.md +104 -0
- data/docs/learn/example-11-first-test.md +96 -0
- data/docs/learn/learning.md +34 -0
- data/docs/learn/quick-demo.md +168 -0
- data/docs/learn/videos.md +13 -0
- data/lib/teuton/application.rb +1 -1
- data/lib/teuton/command/readme.rb +3 -0
- data/lib/teuton/command/test.rb +3 -0
- data/lib/teuton/command.rb +2 -2
- metadata +91 -5
- data/docs/logo.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6be2bd8d7d03e7b38cb06020f6ade96798f5879c24cd5289976074e5ac3e1538
|
4
|
+
data.tar.gz: a96bd68b4b70daddf6d4ba979613ba1e5e546e610e90c0d5817b568dbf3b7844
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65789b7321e8799298357c421a741dc9ca67ff41c2abd7e64e87528902e285673e819d7355c8a31c4e984df07f2789c43c0268715d5702f416651544a21a0276
|
7
|
+
data.tar.gz: cb219ecb9b826e4c5e7f5216b58a497cb9761fb03d37fa20f1d78fb7b79f7003048523f5492f63087a9e22d4476061fe3857c4219eb52903fba7b90f693fd4a6
|
data/README.md
CHANGED
@@ -1,37 +1,28 @@
|
|
1
1
|
|
2
|
-
# TEUTON Software
|
2
|
+
# TEUTON Software (version 2.1)
|
3
3
|
|
4
|
-
_Create Unit Test for your machines
|
5
|
-
|
4
|
+
_Create Unit Test for your machines, and
|
5
|
+
test your infraestructure as code._
|
6
6
|
|
7
|
-
![logo](./docs/logo.png)
|
7
|
+
![logo](./docs/images/logo.png)
|
8
8
|
|
9
|
-
|
9
|
+
Teuton is an intrastructure test tool, useful for:
|
10
10
|
* Sysadmin teachers to evaluate students remote machines.
|
11
11
|
* Sysadmin apprentices to evaluate their learning process as a game.
|
12
12
|
* Professional sysadmin to monitor remote machines.
|
13
13
|
|
14
|
-
|
14
|
+
Teuton allow us:
|
15
15
|
* Write test units for real or virtual machines using simple DSL.
|
16
16
|
* Check compliance with requirements on remote machines.
|
17
17
|
|
18
18
|
# Documentation
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
* [Installation](
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
* [Manual](https://github.com/teuton-software/teuton/wiki/Manual-installation)
|
27
|
-
* [Learning](https://github.com/teuton-software/teuton/wiki/Learning)
|
28
|
-
* [Quick demo](https://github.com/teuton-software/teuton/wiki/Quick-demo)
|
29
|
-
* [Example 01 - Target](https://github.com/teuton-software/teuton/wiki/Example-01---Target)
|
30
|
-
* [Example 02 - Configfile](https://github.com/teuton-software/teuton/wiki/Example-02---Config-file)
|
31
|
-
* [Example 03 - Remote hosts](https://github.com/teuton-software/teuton/wiki/Example-03---Remote-hosts)
|
32
|
-
* [Example 04 - Use](https://github.com/teuton-software/teuton/wiki/Example-04---Use)
|
33
|
-
* [Commands](https://github.com/teuton-software/teuton/wiki/Commands)
|
34
|
-
* [DSL keywords](https://github.com/teuton-software/teuton/wiki/DSL-keywords)
|
20
|
+
Teuton [documentation](./docs).
|
21
|
+
|
22
|
+
* [Installation](docs/install/install.md)
|
23
|
+
* [Learning](docs/learn/README.md)
|
24
|
+
* [Commands](docs/commands/commands.md)
|
25
|
+
* [DSL keywords](docs/dsl/keywords.md)
|
35
26
|
|
36
27
|
# Features
|
37
28
|
|
@@ -0,0 +1,50 @@
|
|
1
|
+
**Introducción**
|
2
|
+
|
3
|
+
Esta idea surgió a partir de varias conversaciones con _"Sergi"_.
|
4
|
+
|
5
|
+
Hablábamos mucho sobre _"ProgramaMe"_. Esto es un concurso donde los alumnos resuelven los retos de programación(Java, Python) en sus propias máquinas; y al terminar, el fichero con el programa, lo suben a la web central de _"ProgramaME"_. Aquí ProgramaMe se los corrige y puntúa.
|
6
|
+
A a los dos nos gusta mucho el proyecto de concurso de retos ProgramaMe... pero... queríamos incorporar otra línea de retos pero NO de programación. Esto es, retos de admnistradores de sistemas.
|
7
|
+
|
8
|
+
Si te interesa el tema, sigue leyendo que te proponemos una solución uniendo productos que ya existen y de licencia libre.
|
9
|
+
|
10
|
+
---
|
11
|
+
|
12
|
+
# Servidor
|
13
|
+
|
14
|
+
Para empezar necesitaremos un servidor o una máquina con IP pública.
|
15
|
+
La llamaremos (`castillo`). Esto normalmente se contrata.
|
16
|
+
|
17
|
+
En `castillo` instalaremos un servidor Web, donde pondremos descargar:
|
18
|
+
* `Aldeas`:
|
19
|
+
* Una aldea es una máquinas virtual con el software `teuton` preinstalado.
|
20
|
+
* Habrán aldeas Debian, OpenSUSE, Ubuntu, etc.
|
21
|
+
* `Retos`.
|
22
|
+
* Habrá un conjunto de retos clasificados por dificultad.
|
23
|
+
* Para cada reto tendremos: Un documento de texto y un fichero rb.
|
24
|
+
* El documento de texto será una explicación/descripción del reto.
|
25
|
+
* El fichero rb serán las instrucciones para verificar el reto.
|
26
|
+
* `Aventuras`
|
27
|
+
* Las aventuras serán un conjunto organizado de retos.
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
# El profesor
|
32
|
+
|
33
|
+
* Tendrá el aula preparada con ordenadores para cada alumno y con el Virtual Box instalado.
|
34
|
+
* Elegirá una aventura donde inscribirá a sus alumnos y dará comienzo el juego.
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
# Los alumnos
|
39
|
+
|
40
|
+
1. Los alumnos empiezan descargando la `aldea` que necesitan.
|
41
|
+
2. Entran en la MV `aldea`.
|
42
|
+
3. Descargan también la `aventura` escogida (conjunto organizado de retos)
|
43
|
+
4. reto = 1
|
44
|
+
5. Resolvemos el reto
|
45
|
+
* Leen la descripción/información del reto.
|
46
|
+
* Realizan el reto dentro de la `aldea`.
|
47
|
+
* Ejecutan `teuton` para el reto actual. Los resultados de envían automáticamente desde la `aldea` hasta el `castillo`
|
48
|
+
6. Los alumnos pueden consultar su puntuación y la clasificación desde la web del `castillo`. Si no les gusta el resultado pueden volver al punto 5 y repetirlo.
|
49
|
+
7. reto = reto + 1
|
50
|
+
8. Ir al paso 5. Así hasta que se acabe el tiempo o que se acaben los retos.
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
# Proyecto: Servidor de retos
|
3
|
+
|
4
|
+
**Introducción**
|
5
|
+
|
6
|
+
Esta idea surgió a partir de varias conversaciones con _"Sergi"_.
|
7
|
+
|
8
|
+
Hablábamos mucho sobre _"ProgramaMe"_. Esto es un concurso donde los alumnos resuelven los retos de programación(Java, Python) en sus propias máquinas; y al terminar, el fichero con el programa, lo suben a la web central de _"ProgramaME"_. Aquí ProgramaMe se los corrige y puntúa.
|
9
|
+
A a los dos nos gusta mucho el proyecto de concurso de retos ProgramaMe... pero... queríamos incorporar otra línea de retos pero NO de programación. Esto es, retos de admnistradores de sistemas.
|
10
|
+
|
11
|
+
Si te interesa el tema, sigue leyendo que te proponemos una solución uniendo productos que ya existen y de licencia libre.
|
12
|
+
|
13
|
+
---
|
14
|
+
|
15
|
+
# Servidor
|
16
|
+
|
17
|
+
Para empezar necesitaremos un servidor o una máquina con IP pública.
|
18
|
+
La llamaremos (`castillo`). Esto normalmente se contrata.
|
19
|
+
|
20
|
+
En `castillo` instalaremos un servidor Web, donde pondremos descargar:
|
21
|
+
* `Aldeas`:
|
22
|
+
* Una aldea es una máquinas virtual con el software `teuton` preinstalado.
|
23
|
+
* Habrán aldeas Debian, OpenSUSE, Ubuntu, etc.
|
24
|
+
* `Retos`.
|
25
|
+
* Habrá un conjunto de retos clasificados por dificultad.
|
26
|
+
* Para cada reto tendremos: Un documento de texto y un fichero rb.
|
27
|
+
* El documento de texto será una explicación/descripción del reto.
|
28
|
+
* El fichero rb serán las instrucciones para verificar el reto.
|
29
|
+
* `Aventuras`
|
30
|
+
* Las aventuras serán un conjunto organizado de retos.
|
31
|
+
|
32
|
+
---
|
33
|
+
|
34
|
+
# El profesor
|
35
|
+
|
36
|
+
* Tendrá el aula preparada con ordenadores para cada alumno y con el Virtual Box instalado.
|
37
|
+
* Elegirá una aventura donde inscribirá a sus alumnos y dará comienzo el juego.
|
38
|
+
|
39
|
+
---
|
40
|
+
|
41
|
+
# Los alumnos
|
42
|
+
|
43
|
+
1. Los alumnos empiezan descargando la `aldea` que necesitan.
|
44
|
+
2. Entran en la MV `aldea`.
|
45
|
+
3. Descargan también la `aventura` escogida (conjunto organizado de retos)
|
46
|
+
4. reto = 1
|
47
|
+
5. Resolvemos el reto
|
48
|
+
* Leen la descripción/información del reto.
|
49
|
+
* Realizan el reto dentro de la `aldea`.
|
50
|
+
* Ejecutan `teuton` para el reto actual. Los resultados de envían automáticamente desde la `aldea` hasta el `castillo`
|
51
|
+
6. Los alumnos pueden consultar su puntuación y la clasificación desde la web del `castillo`. Si no les gusta el resultado pueden volver al punto 5 y repetirlo.
|
52
|
+
7. reto = reto + 1
|
53
|
+
8. Ir al paso 5. Así hasta que se acabe el tiempo o que se acaben los retos.
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
# TO-DO list
|
3
|
+
|
4
|
+
List of things to do, classified into 3 sections:
|
5
|
+
* (A) I know read and write.
|
6
|
+
* (B) I work as IT teacher
|
7
|
+
* (C) I want to program ruby language
|
8
|
+
|
9
|
+
> I write this list without any criteria.
|
10
|
+
> Only an unordered list of interesting/usefull things to be done.
|
11
|
+
|
12
|
+
## Section A
|
13
|
+
|
14
|
+
Documentation
|
15
|
+
|
16
|
+
* Revise Spanish docs (ES - Mejorar la documentación en español)
|
17
|
+
* Revise English documents. Update english version with changes done into spanish version.
|
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) educational test.
|
28
|
+
* Upload your own educational test to this repository.
|
29
|
+
|
30
|
+
## Section C
|
31
|
+
|
32
|
+
* `goto :host1, :puppet => "Puppet instructions"`
|
33
|
+
* `goto :host1, :chef => "Chef instructions"`
|
34
|
+
* `result.test("...")`
|
35
|
+
* `send :email_to => :members_emails`
|
36
|
+
|
37
|
+
Gamification
|
38
|
+
* When students demand help they could recibe some advises.
|
39
|
+
* Define a loop of executions of our activity. For example:
|
40
|
+
every 5 minutes, run the activity, and repeat this 10 times.
|
41
|
+
`start :times=>10, :duration=>5 do`
|
42
|
+
* More ideas: bonus, lives, etc.
|
43
|
+
|
44
|
+
Create 2 evaluation modes:
|
45
|
+
1. Evaluate targets (current mode): `start :score=>:targets do ...`
|
46
|
+
1. Evaluate task: `start :score=>:tasks do ...`
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
# CHANGELOG
|
3
|
+
|
4
|
+
## 2019
|
5
|
+
|
6
|
+
|Date |Version |Changes |
|
7
|
+
|--------- |------- |------- |
|
8
|
+
| August 2019 | 2.0.4 | TEUTON project grew up and was divided into the folowing repositories: teuton, challenges, panel, resources and vagrant. Documentation has been moved into respository teuton wiki. Only maintain English docs. |
|
9
|
+
|January 2019 |1.10.0 | SysadminGame change his name by TEUTON. "project" command replaced by "teuton". Challenges (Teuton scripts) moved to "teuton-challenges" github repository. Execute "rake get_challenges" to get sample teuton challenges |
|
10
|
+
|
11
|
+
## 2017
|
12
|
+
|
13
|
+
|Date |Version |Changes |
|
14
|
+
|--------- |------- |------- |
|
15
|
+
|July 2017 |1.0.0 | New stable version |
|
16
|
+
|June 2017 |0.22.1 | * Now it's posible to use config files with YAML and JSON format |
|
17
|
+
| | | * Preparing migration of CLI command to use Thor gem |
|
@@ -0,0 +1,139 @@
|
|
1
|
+
|
2
|
+
# CHANGELOG teuton v 2.1
|
3
|
+
|
4
|
+
## Done
|
5
|
+
|
6
|
+
### 1. Export grades on csv file using Moodle format
|
7
|
+
|
8
|
+
* Automaticaly exports `moodle.csv` file with all cases grades, using adecuate format so it could be imported directly into Moodle platform.
|
9
|
+
* We need to configure some params like this:
|
10
|
+
|
11
|
+
```
|
12
|
+
---
|
13
|
+
:global:
|
14
|
+
:cases:
|
15
|
+
- :tt_members: ...
|
16
|
+
:tt_moodle_id: User Moodle Identity
|
17
|
+
```
|
18
|
+
|
19
|
+
### 2. readme keyword
|
20
|
+
|
21
|
+
We currently use the "teuton readme pry-folder" command to export README file from the challenge.
|
22
|
+
|
23
|
+
* This example shows how to use readme keyword to add group description or target description:
|
24
|
+
|
25
|
+
```
|
26
|
+
group "GROUPNAME" do
|
27
|
+
readme "Description for this group"
|
28
|
+
|
29
|
+
target "target1"
|
30
|
+
readme "Description for this target"
|
31
|
+
goto :host, :exec => 'id root'
|
32
|
+
expec_one 'root'
|
33
|
+
```
|
34
|
+
|
35
|
+
---
|
36
|
+
|
37
|
+
## Working
|
38
|
+
|
39
|
+
### Remote temp folder
|
40
|
+
|
41
|
+
Modify send keyword so it could works with all OS. Now only work with GNU/Linux. So we need to detect remote OS, then choose remote teuton folder where uploading files.
|
42
|
+
|
43
|
+
* First goto open new session to remote host. And then:
|
44
|
+
1. Detect remote OSTYPE: (a) GNU/Linux and MAC using "uname -a", (b) Windows using "ver" command.
|
45
|
+
2. Create teuton remote uploading folder: (a) /tmp/teuton for GNU/Linux and MAC, (b) %windir%/temp/teuton for Windows.
|
46
|
+
* Every time we send files to remote host we will use this remote folder.
|
47
|
+
|
48
|
+
### Readme
|
49
|
+
|
50
|
+
* Pass usefull information into README.md:
|
51
|
+
```
|
52
|
+
readme do
|
53
|
+
title ...
|
54
|
+
intro ...
|
55
|
+
author ...
|
56
|
+
requirements ...
|
57
|
+
tags ...
|
58
|
+
end
|
59
|
+
```
|
60
|
+
|
61
|
+
---
|
62
|
+
|
63
|
+
## Pending
|
64
|
+
|
65
|
+
### moodle.csv and save partial grades.
|
66
|
+
|
67
|
+
* Before play challenge read previous moodle.cvs. Then play challenge and when creates new moodle.csv... we could preseve old cases(grades) 100% for example.
|
68
|
+
|
69
|
+
### expect keyword
|
70
|
+
|
71
|
+
* `expect_equal "camaleon"`, same as `expect result.equal "camaleon"`.
|
72
|
+
* `expect_not_equal "lagarto"`, same as not expect equal.
|
73
|
+
* `expect regexp("val1|var2")`, regexp function creates regular expresion from String.
|
74
|
+
* `expect result.ok?`, result from previous goto exec.
|
75
|
+
* `result.exit_code`, exit code from previous goto exec.
|
76
|
+
|
77
|
+
### get keyword simplification
|
78
|
+
|
79
|
+
* Simplify getting and setting params process. For example: `_username`, may be alias for `get(:username)`. Then
|
80
|
+
|
81
|
+
```
|
82
|
+
target "Create user _username"
|
83
|
+
goto :host1, :exec => "id _username"
|
84
|
+
expect_one _username
|
85
|
+
```
|
86
|
+
Same as
|
87
|
+
```
|
88
|
+
target "Create user "+get(:username)
|
89
|
+
goto :host1, :exec => "id "+get(:username)
|
90
|
+
expect_one get(:username)
|
91
|
+
```
|
92
|
+
|
93
|
+
* Review docs and replace `"id #{get(:username)}"` by something line `"id "+get(:username)`.
|
94
|
+
|
95
|
+
### Reports and export keyword
|
96
|
+
|
97
|
+
* Work on more output formats: CSV, HTML, XML.
|
98
|
+
* `export :format=>:html, :prefix => IAN`
|
99
|
+
* `export :format=>:xml, :prefix => IAN`
|
100
|
+
* `export :format=>:csv, :prefix => IAN`
|
101
|
+
* Improve RESUME report or create stat-report, with stat information:
|
102
|
+
* the worst target/task/case,
|
103
|
+
* the best target/task/case,
|
104
|
+
* the slowest target/task/case,
|
105
|
+
* the fastest target/task/case, etc.
|
106
|
+
* Related targets: group of targets that always have the same state in every case.
|
107
|
+
|
108
|
+
### File extension
|
109
|
+
|
110
|
+
* Change ".rb" file extension by ".tt" for example. To avoid users think on ruby when using teuton files.
|
111
|
+
* So move "ruby language" documentation to other section like "expert mode"...
|
112
|
+
* Change "start,rb" or "play.rb" name to "run.tt".
|
113
|
+
|
114
|
+
### loop keyword
|
115
|
+
|
116
|
+
* Create keyword to do loops without using ruby style:
|
117
|
+
```
|
118
|
+
loop i: 1..5 do
|
119
|
+
puts i
|
120
|
+
end
|
121
|
+
|
122
|
+
loop :a => [3,5,7] do
|
123
|
+
puts a
|
124
|
+
end
|
125
|
+
```
|
126
|
+
|
127
|
+
### Teuton web server
|
128
|
+
|
129
|
+
* It coud be posible read students credential directly from config.yaml information..
|
130
|
+
|
131
|
+
### Feedback
|
132
|
+
|
133
|
+
Add new features to DSL
|
134
|
+
* `feedback or advise "Some usefull information"` provide this information when studends demand help.
|
135
|
+
|
136
|
+
### Installation process
|
137
|
+
* Use Bundler to install gems instead of rake.
|
138
|
+
* It will be usefull use sysadming-game as gem? And install it with `gem install teuton`.
|
139
|
+
* Vagrant: test how to use vagrant machines as case hosts.
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
# Commands
|
3
|
+
|
4
|
+
| Command | Description |
|
5
|
+
| --------------------- | -------------------------------------- |
|
6
|
+
| teuton | [Show help](help.md) |
|
7
|
+
| teuton version | [Show version](show_version.md) |
|
8
|
+
| teuton create DIRPATH | [Create skeleton project](create_skeleton.md) into DIRPATH |
|
9
|
+
| teuton play DIRPATH | [Run a Test Unit](run_test_unit.md) contained into DIRPATH |
|
10
|
+
| teuton test DIRPATH | [Revise Test without run it](revise_test.md) |
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
# Create skeleton
|
3
|
+
|
4
|
+
Create skeleton for a new "foo" project: `teuton create foo`
|
5
|
+
|
6
|
+
## Execution
|
7
|
+
|
8
|
+
```bash
|
9
|
+
$ teuton create foo
|
10
|
+
|
11
|
+
[INFO] Create project <foo>
|
12
|
+
* Create dir => foo
|
13
|
+
* Create dir => foo/assets
|
14
|
+
* Create file => foo/start.rb
|
15
|
+
* Create file => foo/config.yaml
|
16
|
+
* Create file => foo/.gitignore
|
17
|
+
* Create file => foo/README.md
|
18
|
+
```
|
19
|
+
|
20
|
+
## Skeleton
|
21
|
+
|
22
|
+
This command will create:
|
23
|
+
|
24
|
+
| File/Directory | Description |
|
25
|
+
| --------------- | -------------- |
|
26
|
+
| foo | Base directory |
|
27
|
+
| foo/assets | Base directory for other resources (images and text files) |
|
28
|
+
| foo/start.rb | Main Script |
|
29
|
+
| foo/config.yaml | YAML configuration file |
|
30
|
+
| foo/.gitignore | Prevent uploading YAML files to git repository |
|
31
|
+
| foo/README.md | Statement of our practice |
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Running `teuton` without params will show you usage information:
|
2
|
+
|
3
|
+
```bash
|
4
|
+
$ teuton
|
5
|
+
Commands:
|
6
|
+
teuton [play] [--export=FORMAT] DIRECTORY # Run challenge from directory
|
7
|
+
teuton create DIRECTORY # Create skeleton for a new project
|
8
|
+
teuton download # Download Teuton challenges from git repo
|
9
|
+
teuton help [COMMAND] # Describe available commands or one specific command
|
10
|
+
teuton test DIRECTORY # Check challenge contents
|
11
|
+
teuton update # Update TEUTON from git repo
|
12
|
+
teuton version # Show the program version
|
13
|
+
```
|
@@ -0,0 +1,46 @@
|
|
1
|
+
|
2
|
+
# Revise Test Unit
|
3
|
+
|
4
|
+
## Example 01
|
5
|
+
|
6
|
+
Revising Test Unit called `learn\learn-01-target`:
|
7
|
+
|
8
|
+
```bash
|
9
|
+
$ teuton test learn/learn-01-target
|
10
|
+
[INFO] ScriptPath => /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/start.rb
|
11
|
+
[INFO] ConfigPath => /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/config.yaml
|
12
|
+
[INFO] TestName => learn-01-target
|
13
|
+
|
14
|
+
+------------------------+
|
15
|
+
| GROUP: learn-01-target |
|
16
|
+
+------------------------+
|
17
|
+
(001) target Create user <david>
|
18
|
+
weight 1.0
|
19
|
+
goto localhost and {:exec=>"id david"}
|
20
|
+
expect david (String)
|
21
|
+
|
22
|
+
+--------------+-------+
|
23
|
+
| DSL Stats | Count |
|
24
|
+
+--------------+-------+
|
25
|
+
| Groups | 1 |
|
26
|
+
| Targets | 1 |
|
27
|
+
| Goto | 1 |
|
28
|
+
| * localhost | 1 |
|
29
|
+
| Uniques | 0 |
|
30
|
+
| Logs | 0 |
|
31
|
+
| | |
|
32
|
+
| Gets | 0 |
|
33
|
+
| Sets | 0 |
|
34
|
+
+--------------+-------+
|
35
|
+
+----------------------+
|
36
|
+
| Revising CONFIG file |
|
37
|
+
+----------------------+
|
38
|
+
[WARN] File /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/config.yaml not found!
|
39
|
+
[INFO] Recomended content:
|
40
|
+
---
|
41
|
+
:global:
|
42
|
+
:cases:
|
43
|
+
- :tt_members: VALUE
|
44
|
+
```
|
45
|
+
|
46
|
+
Notice that this Test Unit hasn't config file, and Teuton suggests us content for our config.file. But it isn't necessary for this example.
|
@@ -0,0 +1,78 @@
|
|
1
|
+
|
2
|
+
# Run Test Unit
|
3
|
+
|
4
|
+
We use `teuton play` command to run a Test Unit (or challenge).
|
5
|
+
|
6
|
+
This command executes challenge (Test Unit) from specified directory. By default, show progress on the screen.
|
7
|
+
|
8
|
+
## Help
|
9
|
+
|
10
|
+
Run `teuton help play` to see help.
|
11
|
+
|
12
|
+
Usage:
|
13
|
+
* teuton [play] [OPTIONS] DIRECTORY
|
14
|
+
|
15
|
+
Options:
|
16
|
+
* [--export=EXPORT], select output format.
|
17
|
+
* [--cname=CNAME], select other config file name.
|
18
|
+
* [--cpath=CPATH], select absolute path to config file.
|
19
|
+
* [--case=CASE], select cases to be tested.
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
| ID | Command | Descriptiont |
|
24
|
+
| -- | -------------------- | ------------ |
|
25
|
+
| 01 | teuton foo | Run foo/start.rb, with config file foo/config.yaml |
|
26
|
+
| 02 | teuton play foo | Run foo/start.rb, with config file foo/config.yaml |
|
27
|
+
| 03 | ruby teuton foo | Same as 01 on Windows OS |
|
28
|
+
| 04 | ruby teuton play foo | Same as 02 on WIndows OS |
|
29
|
+
| 05 | teuton . | Run ./start.rb with ./config.yaml file |
|
30
|
+
| 06 | teuton play --export=json foo | Run foo/start.rb and force json format during exporting. Others output formats availables are: txt, colored_text, json, yaml |
|
31
|
+
| 07 | teuton play --cname=class foo | Run foo/start.rb with foo/class.yaml config file |
|
32
|
+
| 08 | teuton foo/demo42.rb | Run foo/demo42.rb with foo/demo42.yaml config file |
|
33
|
+
| 08 | teuton play --cpath=current/class.yaml foo | Run foo/start.rb with current/class.yaml config file |
|
34
|
+
| 10 | teuton play --case=6,16 foo | Run foo/start.rb with foo/config.yaml config file but only for case id 6 and 16 |
|
35
|
+
|
36
|
+
---
|
37
|
+
|
38
|
+
## Example
|
39
|
+
|
40
|
+
Running example 01:
|
41
|
+
|
42
|
+
```bash
|
43
|
+
$ teuton learn/learn-01-target
|
44
|
+
[INFO] ScriptPath => /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/start.rb
|
45
|
+
[INFO] ConfigPath => /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/config.yaml
|
46
|
+
[INFO] TestName => learn-01-target
|
47
|
+
|
48
|
+
==================================
|
49
|
+
Executing [teuton] (version 2.1.0)
|
50
|
+
[INFO] Running in parallel (2019-10-04 23:44:19 +0100)
|
51
|
+
Starting case <anonymous>
|
52
|
+
* Processing <learn-01-target> .
|
53
|
+
|
54
|
+
[INFO] Duration = 0.006568696 (2019-10-04 23:44:19 +0100)
|
55
|
+
==================================
|
56
|
+
|
57
|
+
INITIAL CONFIGURATIONS
|
58
|
+
+---------------+-------------------------------------------------------+
|
59
|
+
| tt_title | Executing [teuton] (version 2.1.0) |
|
60
|
+
| tt_scriptname | ...teuton.d/challenges/learn/learn-01-target/start.rb |
|
61
|
+
| tt_configfile | ...ton.d/challenges/learn/learn-01-target/config.yaml |
|
62
|
+
| tt_testname | learn-01-target |
|
63
|
+
| tt_sequence | false |
|
64
|
+
+---------------+-------------------------------------------------------+
|
65
|
+
|
66
|
+
CASE RESULTS
|
67
|
+
+---------+-------+-------+-----------+
|
68
|
+
| CASE ID | GRADE | STATE | MEMBERS |
|
69
|
+
| case_01 | 100.0 | | anonymous |
|
70
|
+
+---------+-------+-------+-----------+
|
71
|
+
|
72
|
+
FINAL VALUES
|
73
|
+
+-------------+---------------------------+
|
74
|
+
| start_time | 2019-10-04 23:44:19 +0100 |
|
75
|
+
| finish_time | 2019-10-04 23:44:19 +0100 |
|
76
|
+
| duration | 0.006568696 |
|
77
|
+
+-------------+---------------------------+
|
78
|
+
```
|