teuton 2.1.1 → 2.1.2
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 -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
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
Execute command on localhost and save output into result object.
|
5
|
+
|
6
|
+
**Alias**: In fact it's the same as doing `goto :localhost, :execute => "COMMAND"`.
|
7
|
+
|
8
|
+
> Then, why have another instruction? Because there are people who like doing this way.
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
run "id david"
|
14
|
+
```
|
15
|
+
|
16
|
+
## Example
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
run "id david"
|
20
|
+
```
|
21
|
+
|
22
|
+
* This instruction execute "id david" command on local machine, and save results into `result` object.
|
23
|
+
* Local machine is where the `Teuton` program is running.
|
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
`target` instruction is used to begin new target/goal definition, and sets its description.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
target "Write here your description"
|
10
|
+
```
|
11
|
+
|
12
|
+
* Define target description. Use your own words to describe it, so everybody could understand what is going to be measured.
|
13
|
+
* This text will be shown into reports to help us understand output information easily.
|
14
|
+
|
15
|
+
## Alias
|
16
|
+
|
17
|
+
`goal` keyword is an alias of `target`. So it's the same:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
target "Write here your description"
|
21
|
+
```
|
22
|
+
|
23
|
+
or
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
goal "Write here your description"
|
27
|
+
```
|
28
|
+
|
29
|
+
## Weight
|
30
|
+
|
31
|
+
By default weight is 1.0, but it's posible specified other value:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
target "Write here your description", :weight => 2.5
|
35
|
+
```
|
@@ -0,0 +1,39 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
Create reports and save then into `var/CHALLENGE-NAME` folder.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
play do
|
10
|
+
export
|
11
|
+
end
|
12
|
+
```
|
13
|
+
|
14
|
+
|
15
|
+
## Other
|
16
|
+
|
17
|
+
| Command | Description |
|
18
|
+
| ------------------------ | ----------- |
|
19
|
+
| `export` | Export report files using default ouput format |
|
20
|
+
| `export :format => :txt` | Export file using TXT ouput format |
|
21
|
+
| `export :format => :colored_text` | Export file using colored TXT ouput format |
|
22
|
+
| `export :format => :yaml` | Export file using YAML ouput format |
|
23
|
+
| `export :format => :json` | Export file using JSON ouput format |
|
24
|
+
|
25
|
+
## Examples
|
26
|
+
|
27
|
+
Run challenge and build reports using default output format:
|
28
|
+
```
|
29
|
+
play do
|
30
|
+
export
|
31
|
+
end
|
32
|
+
```
|
33
|
+
|
34
|
+
Run challenge and build reports using `colored_text` output format:
|
35
|
+
```
|
36
|
+
play do
|
37
|
+
export :format => :colored_text
|
38
|
+
end
|
39
|
+
```
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
DSL keyword that starts the execution of all targets/goals (defined into groups). We put this instruction at the end of every script, so it begin running the tests over the machines.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
play do
|
10
|
+
...
|
11
|
+
end
|
12
|
+
```
|
13
|
+
|
14
|
+
* Write this block at the end of the rb script, to indicate that it's the moment to start the evaluation process.
|
15
|
+
* The `group/target` instructions defines the tests we want to do, but `play` instruction is used to begin execution of all the groups/targets into every remote hosts of every case.
|
16
|
+
* If you don't write this instruccion, your tests will never be executed.
|
@@ -0,0 +1,54 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
`send` is used to copy Teuton reports into remote machines.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
start do
|
10
|
+
export
|
11
|
+
send :copy_to => :host1
|
12
|
+
end
|
13
|
+
```
|
14
|
+
|
15
|
+
* `send` instruction must be execute after `export`. Reports must be generated before send them, of course.
|
16
|
+
* `host1`, it' the label that identified remote host. This information must be configured into config file.
|
17
|
+
* `send :copy_to => :host1`, copy every case resport file into temp directory on remote host `host1`.
|
18
|
+
|
19
|
+
## Other uses
|
20
|
+
|
21
|
+
| Action | Description |
|
22
|
+
| ------ | ----------- |
|
23
|
+
| `send :copy_to => :host1, :remote_dir => "/home/david"` | Reports will be saved into "/home/david" directory in remote machine `host1`. |
|
24
|
+
| `send :copy_to => :host1, :prefix => "samba_"` | Case report will be save into temp directory on every host `host1`, named as `samba_case-XX.txt`. |
|
25
|
+
|
26
|
+
> Teuton version 2.0.x
|
27
|
+
> * By default, `send` only works when remote OS type is UNIX base, like GNU/Linux, MACOS, BSD, etc.
|
28
|
+
> * For Windows OS we must specified `:remote_dir`. Example: `send :copy_to => :host1, :remote_dir => "C:\\"`. This example will copy files on directory c:\ of host1 machine.
|
29
|
+
|
30
|
+
## How to send several output files
|
31
|
+
|
32
|
+
If you export several files using differents output formats, you will use several `export` orders. Then when invoke `send` order, this will send the last exported file.
|
33
|
+
|
34
|
+
In this example we export json and txt files, but only send txt to remote hosts:
|
35
|
+
```ruby
|
36
|
+
start do
|
37
|
+
export :format => :json
|
38
|
+
export :format => :txt
|
39
|
+
|
40
|
+
send :copy_to => :host1
|
41
|
+
end
|
42
|
+
```
|
43
|
+
|
44
|
+
If you want to send every exported output file, then do like this:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
start do
|
48
|
+
export :format => :json
|
49
|
+
send :copy_to => :host1
|
50
|
+
|
51
|
+
export :format => :txt
|
52
|
+
send :copy_to => :host1
|
53
|
+
end
|
54
|
+
```
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
When tests ends, `show` instruction shows on screen information about final results.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
start do
|
10
|
+
show
|
11
|
+
end
|
12
|
+
```
|
13
|
+
|
14
|
+
## Other uses
|
15
|
+
|
16
|
+
| Action | Description |
|
17
|
+
| --------------- | --------------------------------------- |
|
18
|
+
| `show` | Same as `show :resume`. Default option. |
|
19
|
+
| `show :resume` | Show resumed information on screen. |
|
20
|
+
| `show :details` | Show details from every cases on screen.|
|
21
|
+
| `show :all` | Same as `show :resume` and `show :details`. |
|
@@ -0,0 +1,53 @@
|
|
1
|
+
|
2
|
+
To define and run our activity test we use the next DSL keywords:
|
3
|
+
|
4
|
+
## Definition instructions
|
5
|
+
|
6
|
+
These are the main DSL key words, usefull to define items to be evaluated.
|
7
|
+
|
8
|
+
| DSL | Description |
|
9
|
+
| :----------------------------- | :---------- |
|
10
|
+
| [group](definition/group.md) | Define a group of items to check. |
|
11
|
+
| [target](definition/target.md) | Define a target. This is the item to be checked. |
|
12
|
+
| [goto](definition/goto.md) | Execute command into remote host. |
|
13
|
+
| [run](definition/run.md) | Execute command into localhost. |
|
14
|
+
| [result](definition/result.md) | Contain the output of previous `goto` order. |
|
15
|
+
| [expect](definition/expect.md) | Check the obtained result with the expected value. |
|
16
|
+
|
17
|
+
---
|
18
|
+
|
19
|
+
## Execution instructions
|
20
|
+
|
21
|
+
DSL key word related with reports and information.
|
22
|
+
|
23
|
+
| DSL | Descripción |
|
24
|
+
| :---------------------------- | :--------------------------------------- |
|
25
|
+
| [play](execution/play.md) | Run the challenge. |
|
26
|
+
| [show](execution/show.md) | Show the results on screen. |
|
27
|
+
| [export](execution/export.md) | Make reports with the results of every evaluation. |
|
28
|
+
| [send](execution/send.md) | Send copy of report file to remote host. |
|
29
|
+
|
30
|
+
---
|
31
|
+
|
32
|
+
## Setting instructions
|
33
|
+
|
34
|
+
| DSL | Descripción |
|
35
|
+
| :-------------------- | :--------------------------------------------- |
|
36
|
+
| [get](setting/get.md) | Read param value from configuration file. |
|
37
|
+
| [set](setting/set.md) | Set new param value for running configuration. |
|
38
|
+
|
39
|
+
---
|
40
|
+
## Ruby language
|
41
|
+
|
42
|
+
It is possible to use ruby language programming structures, in the definition of challenges (iterators, arrays, etc.). Very useful when we have repetitive lines.
|
43
|
+
|
44
|
+
Example, how to create 4 target evaluation using an Array:
|
45
|
+
```ruby
|
46
|
+
users = ['Obiwan', 'Yoda', 'Maul', 'Vader']
|
47
|
+
|
48
|
+
users.each do |user|
|
49
|
+
target "Exist user #{user}"
|
50
|
+
goto :host1, :exec => "id #{user}"
|
51
|
+
expect_one user
|
52
|
+
end
|
53
|
+
```
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
`get` read param value from configuration file.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
get(:param1)
|
10
|
+
```
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
Suppose we have this `config.yaml` content:
|
15
|
+
```yaml
|
16
|
+
---
|
17
|
+
:global:
|
18
|
+
:host1_username: root
|
19
|
+
:host1_password: secret
|
20
|
+
:cases:
|
21
|
+
- :tt_members: Obiwan
|
22
|
+
:host1_ip: 192.168.1.201
|
23
|
+
:host1_hostname: jedis
|
24
|
+
:username: obiwan
|
25
|
+
```
|
26
|
+
|
27
|
+
Then:
|
28
|
+
* `get(:username)` returns `obiwan`.
|
29
|
+
* `get(:host1_username)`, returns `root`.
|
30
|
+
|
31
|
+
We also can create new temporal params:
|
32
|
+
```ruby
|
33
|
+
set(:new_param, "Hello")
|
34
|
+
var = get(:new_param)
|
35
|
+
```
|
36
|
+
So `var` value will be "Hello".
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
## Description
|
3
|
+
|
4
|
+
`set` create new temporaly param value for running configuration.
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
set(:param1, 'value')
|
10
|
+
```
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
set(:new_param, "Hello")
|
16
|
+
var = get(:new_param)
|
17
|
+
```
|
18
|
+
So `var` value will be "Hello".
|
@@ -0,0 +1,32 @@
|
|
1
|
+
|
2
|
+
> We recommend you, start reading about [Modes of use](modes_of_use.md), and learn the differences between T-node and S-node before installation.
|
3
|
+
|
4
|
+
---
|
5
|
+
# Installation
|
6
|
+
|
7
|
+
**T-NODE installation**: Install Teuton on machine with T-NODE role.
|
8
|
+
Installation process:
|
9
|
+
|
10
|
+
1. Install Ruby on your system.
|
11
|
+
2. `gem install teuton`
|
12
|
+
|
13
|
+
Run `teuton version` to check that your installation is ok.
|
14
|
+
|
15
|
+
**S-NODE installation**: Install SSH server on every machine with S-NODE role.
|
16
|
+
|
17
|
+
---
|
18
|
+
# Other installation ways
|
19
|
+
|
20
|
+
[Installation using scripts](scripts_install.md)
|
21
|
+
* Use our scripts to run automatical installation for your OS.
|
22
|
+
* Use this way if you don't know how to install Ruby on your system.
|
23
|
+
|
24
|
+
[Installation using Vagrant](vagrant_install.md)
|
25
|
+
* If you plan to install Teuton into virtual machines, and have Vagrant installed into your real machine, this is the easier way for you.
|
26
|
+
|
27
|
+
[Manual installation](manual_install.md)
|
28
|
+
* If you don't need help, and want to install Teuton by your own, or there are not installation scripts for your favorite OS, and you don't want to use Vagrant then... here you have information how to install all the required packages for Teuton.
|
29
|
+
|
30
|
+
Let's us known your installation difficulties.
|
31
|
+
|
32
|
+
Thanks!
|
@@ -0,0 +1,25 @@
|
|
1
|
+
There are diferents Teuton [Modes of use](Modes of use). For every mode there are 2 node typesm and every node has their own installation script:
|
2
|
+
|
3
|
+
* **T-node**: This host has installed Teuton software.
|
4
|
+
* **S-node**: This host has installed SSH server.
|
5
|
+
|
6
|
+
---
|
7
|
+
|
8
|
+
# T-NODE: Manual installation
|
9
|
+
|
10
|
+
| ID | Action | Details |
|
11
|
+
| -- | ----------------- | ----------- |
|
12
|
+
| 1 | Git installation | Run `git --version` to show current version |
|
13
|
+
| 2 | Ruby installation | Run `ruby -v` to show current version (2.1.3p242+) |
|
14
|
+
| 3 | Rake installation | Run `gem install rake`, then `rake --version` to show current version (10.4.2+). |
|
15
|
+
| 4 | Download this project | (a) `git clone https://github.com/dvarrui/teuton.git` (b) Download and unzip [file](https://github.com/dvarrui/teuton-panel/archive/master.zip). |
|
16
|
+
| 5 | Gems installation | Run `cd teuton` and `rake gems` |
|
17
|
+
| 6 | Final check | `rake` |
|
18
|
+
|
19
|
+
---
|
20
|
+
|
21
|
+
# S-NODE: Manual installation
|
22
|
+
|
23
|
+
* Install SSH server on your host.
|
24
|
+
|
25
|
+
> How to [install SSH on Windows](windows-ssh)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
There are several **Teuton** ways of use: Classroom, Conquest and Standalone.
|
2
|
+
|
3
|
+
For every mode exists 2 types of nodes: T-Node and S-Node.
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
## Classroom mode
|
8
|
+
|
9
|
+
In this mode, a teacher use **Teuton** tool to evaluate the work done by their students into their real or virtual machines. The teacher need to access remotely to these machines.
|
10
|
+
|
11
|
+
| Node | Description |
|
12
|
+
| ---- | ----------- |
|
13
|
+
| T | Teacher install Teuton software into his machine, and he will connect remotely (using SSH) to every student machine. |
|
14
|
+
| S | Every student machine. |
|
15
|
+
|
16
|
+
---
|
17
|
+
|
18
|
+
## Contest mode
|
19
|
+
|
20
|
+
We will hace a group of contestants who decide to do challenges and execute Teuton software into their own machines just to verify if satisfied the targets/goals of the challenge.
|
21
|
+
|
22
|
+
On every run, Teuton software send results to remote server configured with SSH (used by the contest judges).
|
23
|
+
|
24
|
+
| Node | Description |
|
25
|
+
| ---- | ------------------------------------------------------------ |
|
26
|
+
| T | Every contest install Teuton software into their machine. Teuton wll connect via SSH to the server. |
|
27
|
+
| S | The server used by judges to save all the reports. |
|
28
|
+
|
29
|
+
---
|
30
|
+
|
31
|
+
## Standalone mode
|
32
|
+
|
33
|
+
Install Teuton software into our own machine, and execute the challenges as you want. It is a good way for standalone learning .
|
34
|
+
|
35
|
+
| Node | Descripción |
|
36
|
+
| ---- | ----------- |
|
37
|
+
| T | Install Teuton software into our machine. |
|
38
|
+
| S | No necessary. |
|
@@ -0,0 +1,76 @@
|
|
1
|
+
|
2
|
+
There are different Teuton [Modes of use](modes_of_use.md). For every mode there are 2 node types and every node has their own installation script:
|
3
|
+
|
4
|
+
* **T-node**: This host has installed Teuton software.
|
5
|
+
* **S-node**: This host has installed SSH server.
|
6
|
+
|
7
|
+
> Consult [tested OS](tested_os.md) to ensure if your favorite OS script installation has been tested.
|
8
|
+
|
9
|
+
---
|
10
|
+
# T-NODE installation
|
11
|
+
|
12
|
+
## T-NODE: GNU/Linux installation
|
13
|
+
|
14
|
+
Run this command as `root` user:
|
15
|
+
|
16
|
+
```bash
|
17
|
+
wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/bin/linux_t-node_install.sh | bash
|
18
|
+
```
|
19
|
+
|
20
|
+
## T-NODE: Mac OS X installation
|
21
|
+
|
22
|
+
Run this command as admin user (member of `admin` group):
|
23
|
+
|
24
|
+
```bash
|
25
|
+
curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/bin/macosx_t-node_install.sh | bash
|
26
|
+
```
|
27
|
+
|
28
|
+
> No `root` user.
|
29
|
+
|
30
|
+
## T-NODE: Windows installation
|
31
|
+
|
32
|
+
Requirements:
|
33
|
+
* Windows 7+ / Windows Server 2003+
|
34
|
+
* PowerShell v2+
|
35
|
+
|
36
|
+
Run this command on **PowerShell (PS)** as `Administrator` user:
|
37
|
+
|
38
|
+
```powershell
|
39
|
+
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/bin/windows_t-node_install.ps1'))
|
40
|
+
```
|
41
|
+
|
42
|
+
---
|
43
|
+
|
44
|
+
# S-NODE installation
|
45
|
+
|
46
|
+
This is, SSH server installation.
|
47
|
+
|
48
|
+
> The user from T-NODE have to know admin password/user to establish SSH connections to S-NODE.
|
49
|
+
|
50
|
+
## S-NODE: GNU/Linux installation
|
51
|
+
|
52
|
+
Run this command as `root` user:
|
53
|
+
|
54
|
+
```bash
|
55
|
+
wget -qO- https://raw.githubusercontent.com/teuton-software/teuton/master/bin/linux_s-node_install.sh | bash
|
56
|
+
```
|
57
|
+
|
58
|
+
## S-NODE: Mac OS X installation
|
59
|
+
|
60
|
+
Run this command as `root` user:
|
61
|
+
|
62
|
+
```bash
|
63
|
+
curl -sL https://raw.githubusercontent.com/teuton-software/teuton/master/bin/macosx_s-node_install.sh | bash
|
64
|
+
```
|
65
|
+
|
66
|
+
## S-NODE: Windows installation
|
67
|
+
|
68
|
+
Requirements:
|
69
|
+
* Windows 7+ / Windows Server 2003+
|
70
|
+
* PowerShell v2+
|
71
|
+
|
72
|
+
Run this command on **PowerShell (PS)** as `Administrator` user:
|
73
|
+
|
74
|
+
```powershell
|
75
|
+
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/teuton-software/teuton/master/bin/windows_s-node_install.ps1'))
|
76
|
+
```
|
@@ -0,0 +1,25 @@
|
|
1
|
+
## GNU/Linux
|
2
|
+
|
3
|
+
| O.S. | Version | Arch | T-node | S-node |
|
4
|
+
| --------- | -------------- | ------ | ------ | ------ |
|
5
|
+
| CentOS | 7 | x86-64 | [?] | [?] |
|
6
|
+
| Debian | 9.7.0 | x86-64 | [X] | [?] |
|
7
|
+
| Fedora | Workstation 29 | x84-64 | [?] | [?] |
|
8
|
+
| LinuxMint | 18.3 | x86-64 | [X] | [?] |
|
9
|
+
| openSUSE | Leap 15 | x86-64 | [X] | [X] |
|
10
|
+
| Ubuntu | 18.04 | x86-64 | [X] | [X] |
|
11
|
+
|
12
|
+
## Windows
|
13
|
+
|
14
|
+
| O.S. | Version | Arch | Nodo-T | Nodo-S |
|
15
|
+
| ------- | -------------- | ------ | ------ | ------ |
|
16
|
+
| Windows | 7 Enterprise | x86 | [X] | [?] |
|
17
|
+
| Windows | 10 Pro | x86-64 | [X] | [X] |
|
18
|
+
| Windows | Server 2012 R2 | x86-64 | [?] | [?] |
|
19
|
+
|
20
|
+
## Mac OS X
|
21
|
+
|
22
|
+
| O.S | Version | Arch | T-Node | S-Node |
|
23
|
+
| -------- | -------------------- | ------ | ------ | ------ |
|
24
|
+
| Mac OS X | El Capitán (10.11.6) | x86-64 | [X] | [X] |
|
25
|
+
| Mac OS X | Sierra (10.12) | x86-64 | [X] | [?] |
|
@@ -0,0 +1,15 @@
|
|
1
|
+
* First, you must have `Vagrant` installed.
|
2
|
+
* Create directory for your vagrant project. For example, `mkdir teuton-vagrant`.
|
3
|
+
* Move into that directory: `cd teuton-vagrant`.
|
4
|
+
* Download required Vagrantfile:
|
5
|
+
|
6
|
+
| Vagrantfile | URL |
|
7
|
+
| ------------------ | ----|
|
8
|
+
| T-Node OpenSUSE VM | https://raw.githubusercontent.com/teuton-software/vagrant/master/t-node/opensuse/Vagrantfile |
|
9
|
+
| S-Node OpenSUSE VM | https://raw.githubusercontent.com/teuton-software/vagrant/master/s-node/opensuse/Vagrantfile |
|
10
|
+
|
11
|
+
* Run `vagrant up` to run the Virtual Machine.
|
12
|
+
|
13
|
+
**Notice:** If you plan to build T-node and S-node VMs, then you need to use separated directories for every Vagranfile.
|
14
|
+
|
15
|
+
> There are more Vagrantfile files for others OS at https://github.com/teuton-software/vagrant/ repository.
|
@@ -0,0 +1,117 @@
|
|
1
|
+
|
2
|
+
Let's learn how to create our first target.
|
3
|
+
A target is a feature you want to measure or check.
|
4
|
+
|
5
|
+
> This example is on GitHub repository `teuton-challenge` at `learn/learn-01-target/`.
|
6
|
+
|
7
|
+
## Definitions (Group section)
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
group "learn-01-target" do
|
11
|
+
|
12
|
+
target "Exist <david> user"
|
13
|
+
run "id david"
|
14
|
+
expect "david"
|
15
|
+
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
It's where we define targets using these words:
|
20
|
+
* **target**: Description of the goal to be tested.
|
21
|
+
* **run**: Execute a command `id david` on localhost machine.
|
22
|
+
* **expect**: Evaluate if the result contains expected value.
|
23
|
+
|
24
|
+
> Localhost's OS must be GNU/Linux (any other compatible OS) because the command used is `id david`.
|
25
|
+
|
26
|
+
## Main execution block (Play section)
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
play do
|
30
|
+
show
|
31
|
+
export
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
Runing this example:
|
36
|
+
|
37
|
+
```bash
|
38
|
+
$ teuton learn/learn-01-target
|
39
|
+
[INFO] ScriptPath => /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/start.rb
|
40
|
+
[INFO] ConfigPath => /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/config.yaml
|
41
|
+
[INFO] TestName => learn-01-target
|
42
|
+
==================================
|
43
|
+
Executing [teuton] (version 2.0.0)
|
44
|
+
[INFO] Running in parallel (2019-06-20 01:37:57 +0100)
|
45
|
+
.
|
46
|
+
[INFO] Duration = 0.013580866 (2019-06-20 01:37:58 +0100)
|
47
|
+
|
48
|
+
|
49
|
+
==================================
|
50
|
+
INITIAL CONFIGURATIONS
|
51
|
+
+---------------+------------------------------------------------------------------------------+
|
52
|
+
| tt_title | Executing [teuton] (version 2.0.0) |
|
53
|
+
| tt_scriptname | /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/start.rb |
|
54
|
+
| tt_configfile | /home/david/proy/repos/teuton.d/challenges/learn/learn-01-target/config.yaml |
|
55
|
+
| tt_testname | learn-01-target |
|
56
|
+
| tt_sequence | false |
|
57
|
+
+---------------+------------------------------------------------------------------------------+
|
58
|
+
CASE RESULTS
|
59
|
+
+---------+-------------+-----------+
|
60
|
+
| Case ID | % Completed | Members |
|
61
|
+
| Case_01 | 100% | anonymous |
|
62
|
+
+---------+-------------+-----------+
|
63
|
+
FINAL VALUES
|
64
|
+
+-------------+---------------------------+
|
65
|
+
| start_time | 2019-06-20 01:37:57 +0100 |
|
66
|
+
| finish_time | 2019-06-20 01:37:58 +0100 |
|
67
|
+
| duration | 0.013580866 |
|
68
|
+
+-------------+---------------------------+
|
69
|
+
```
|
70
|
+
|
71
|
+
## Results
|
72
|
+
|
73
|
+
Output reports are saved into `var/learn-01-target/` directory.
|
74
|
+
|
75
|
+
```bash
|
76
|
+
var/learn-01-targets
|
77
|
+
├── case-01.txt
|
78
|
+
└── resume.txt
|
79
|
+
```
|
80
|
+
|
81
|
+
Let's see `export` keyword output.
|
82
|
+
|
83
|
+
```bash
|
84
|
+
$ more var/learn-01-target/case-01.txt
|
85
|
+
|
86
|
+
CONFIGURATIONS
|
87
|
+
+------------+-----------+
|
88
|
+
| tt_members | anonymous |
|
89
|
+
| tt_skip | false |
|
90
|
+
+------------+-----------+
|
91
|
+
|
92
|
+
TEST
|
93
|
+
======================
|
94
|
+
|
95
|
+
GROUP: learn-01-target
|
96
|
+
|
97
|
+
01 (1.0/1.0)
|
98
|
+
Description : Exist <david> user
|
99
|
+
Command : id david
|
100
|
+
Duration : 0.004 (local)
|
101
|
+
Alterations : find(david) & count
|
102
|
+
Expected : Greater than 0 (String)
|
103
|
+
Result : 1 (Integer)
|
104
|
+
RESULTS
|
105
|
+
+--------------+---------------------------+
|
106
|
+
| case_id | 1 |
|
107
|
+
| start_time_ | 2019-06-20 12:27:50 +0100 |
|
108
|
+
| finish_time | 2019-06-20 12:27:50 +0100 |
|
109
|
+
| duration | 0.004641837 |
|
110
|
+
| unique_fault | 0 |
|
111
|
+
| max_weight | 1.0 |
|
112
|
+
| good_weight | 1.0 |
|
113
|
+
| fail_weight | 0.0 |
|
114
|
+
| fail_counter | 0 |
|
115
|
+
| grade | 100 |
|
116
|
+
+--------------+---------------------------+
|
117
|
+
```
|