teuton 2.10.6 → 2.10.8
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 +18 -10
- data/docs/commands/README.md +2 -2
- data/docs/commands/check-example.md +16 -19
- data/docs/commands/{howto-run-tests.md → run-tests.md} +17 -15
- data/docs/dsl/export.md +6 -10
- data/docs/dsl/get.md +13 -13
- data/docs/dsl/group.md +3 -1
- data/docs/dsl/send.md +6 -7
- data/docs/learn/01-cmd_new.md +8 -7
- data/docs/learn/02-target.md +10 -12
- data/docs/learn/03-remote_hosts.md +7 -5
- data/docs/learn/04-config.md +33 -36
- data/docs/learn/05-use.md +5 -4
- data/docs/learn/06-cmd_check.md +4 -2
- data/docs/learn/07-target_weight.md +8 -9
- data/docs/learn/08-unique_values.md +4 -2
- data/docs/learn/09-send.md +4 -4
- data/docs/learn/10-debug.md +8 -6
- data/docs/learn/11-export.md +7 -4
- data/docs/learn/12-preserve.md +13 -10
- data/lib/teuton/case/dsl/expect_sequence.rb +2 -2
- data/lib/teuton/case_manager/case_manager.rb +5 -5
- data/lib/teuton/case_manager/dsl.rb +3 -3
- data/lib/teuton/case_manager/export_manager.rb +1 -1
- data/lib/teuton/case_manager/report.rb +0 -3
- data/lib/teuton/check/show.rb +5 -4
- data/lib/teuton/files/config.yaml +1 -1
- data/lib/teuton/files/start.rb +4 -4
- data/lib/teuton/readme/dsl/getset.rb +5 -4
- data/lib/teuton/report/formatter/default/markdown.rb +90 -0
- data/lib/teuton/report/formatter/formatter.rb +5 -1
- data/lib/teuton/report/formatter/resume/markdown.rb +84 -0
- data/lib/teuton/report/report.rb +5 -10
- data/lib/teuton/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a5b35750a1b166a54ba8f1c2f8dfdf82b8f1bbeb10dbc26c954aa926ebf47209
|
|
4
|
+
data.tar.gz: 06363a74c993cfe89d182a6f8473d7f713f3351da16e2f397fe9f7dfd327c049
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec53a0570321130474a302b5863d470b8e99f051eaad3070a367374dfbeddda4e3cab5e85af02f8dbf29b9405022a440167920aface1242eed30b49243465ec7
|
|
7
|
+
data.tar.gz: bac07b9e1d452de58acade93b292cd7edf62e37bede4a2ee05d450816c6068577b7463afe986265559f94529aad0ee2a5d84bae606f46a5619afe911320224c1
|
data/README.md
CHANGED
|
@@ -21,21 +21,31 @@ Install Ruby and then:
|
|
|
21
21
|
gem install teuton
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
> **NOTE**
|
|
25
|
+
> * Available versions ([rubygems.org/gems/teuton](https://rubygems.org/gems/teuton/))
|
|
26
|
+
> * Install a specific version: `gem install teuton -v VERSION`.
|
|
27
|
+
> * Update: `gem update teuton`.
|
|
28
|
+
|
|
24
29
|
# Usage
|
|
25
30
|
|
|
26
31
|
Use `teuton run TESTPATH` command to run test:
|
|
27
32
|
|
|
28
33
|
```console
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
$ teuton run examples/02-target
|
|
35
|
+
------------------------------------
|
|
36
|
+
Started at 2025-11-12 20:15:59 +0000
|
|
37
|
+
F.
|
|
38
|
+
Finished in 0.005 seconds
|
|
39
|
+
------------------------------------
|
|
40
|
+
|
|
31
41
|
CASE RESULTS
|
|
32
|
-
|
|
33
|
-
| CASE | MEMBERS
|
|
34
|
-
| 01 |
|
|
35
|
-
|
|
42
|
+
+------+---------+-------+-------+
|
|
43
|
+
| CASE | MEMBERS | GRADE | STATE |
|
|
44
|
+
| 01 | VALUE | 33.0 | ? |
|
|
45
|
+
+------+---------+-------+-------+
|
|
36
46
|
```
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
Consult the generated [output files](examples/02-target/output.d/)
|
|
39
49
|
|
|
40
50
|
# Features
|
|
41
51
|
|
|
@@ -48,7 +58,7 @@ CASE RESULTS
|
|
|
48
58
|
# Documentation
|
|
49
59
|
|
|
50
60
|
* [Installation](docs/install/README.md)
|
|
51
|
-
* [
|
|
61
|
+
* [Learning](docs/learn/README.md)
|
|
52
62
|
* [Examples](examples)
|
|
53
63
|
* [Commands](docs/commands/README.md)
|
|
54
64
|
* [Language reference](docs/dsl/README.md)
|
|
@@ -68,5 +78,3 @@ CASE RESULTS
|
|
|
68
78
|
1. Create new Pull Request.
|
|
69
79
|
|
|
70
80
|
You can also [create issues](https://github.com/teuton-software/teuton/issues) with your requests, incidences or suggestions.
|
|
71
|
-
|
|
72
|
-
> Read [Spanish documentation](docs/es/README.md)
|
data/docs/commands/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Example:
|
|
|
39
39
|
```console
|
|
40
40
|
$ teuton new foo
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Creating foo project
|
|
43
43
|
* Create dir => foo
|
|
44
44
|
* Create file => foo/config.yaml
|
|
45
45
|
* Create file => foo/start.rb
|
|
@@ -74,7 +74,7 @@ Alias: `teuton c foo`, `teuton -c foo`, `teuton --check foo`
|
|
|
74
74
|
|
|
75
75
|
# 5. Run test
|
|
76
76
|
|
|
77
|
-
Read about
|
|
77
|
+
Read about how to [run tests](run-tests.md)
|
|
78
78
|
|
|
79
79
|
# 6. Show test info as README file
|
|
80
80
|
|
|
@@ -13,40 +13,37 @@ Usage: `teuton check PATH-TO-TEST-FOLDER`
|
|
|
13
13
|
|
|
14
14
|
Example:
|
|
15
15
|
|
|
16
|
-
```
|
|
16
|
+
```
|
|
17
17
|
$ teuton check examples/02-target
|
|
18
18
|
|
|
19
19
|
+----------------------------+
|
|
20
20
|
| GROUP: Learn about targets |
|
|
21
21
|
+----------------------------+
|
|
22
|
-
(001) target Create user
|
|
22
|
+
(001) target Create user obiwan
|
|
23
|
+
weight 2.0
|
|
24
|
+
run 'id obiwan' on localhost
|
|
25
|
+
expect ["uid=", "(obiwan)", "gid="] (Array)
|
|
26
|
+
|
|
27
|
+
(002) target Delete user vader
|
|
23
28
|
weight 1.0
|
|
24
|
-
run 'id
|
|
25
|
-
|
|
29
|
+
run 'id vader' on localhost
|
|
30
|
+
expect_fail
|
|
26
31
|
|
|
27
32
|
+--------------+-------+
|
|
28
33
|
| DSL Stats | Count |
|
|
29
34
|
+--------------+-------+
|
|
30
35
|
| Groups | 1 |
|
|
31
|
-
| Targets |
|
|
32
|
-
| Runs |
|
|
33
|
-
| * localhost |
|
|
34
|
-
| Uniques | 0 |
|
|
35
|
-
| Logs | 0 |
|
|
36
|
-
| | |
|
|
37
|
-
| Gets | 0 |
|
|
38
|
-
| Sets | 0 |
|
|
36
|
+
| Targets | 2 |
|
|
37
|
+
| Runs | 2 |
|
|
38
|
+
| * localhost | 2 |
|
|
39
39
|
+--------------+-------+
|
|
40
|
-
+----------------------+
|
|
41
|
-
| Revising CONFIG file |
|
|
42
|
-
+----------------------+
|
|
43
40
|
[WARN] Configfile not found
|
|
44
|
-
/home
|
|
41
|
+
/home/.../examples/02-target/config.yaml
|
|
45
42
|
[INFO] Recomended content:
|
|
46
43
|
---
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
44
|
+
global:
|
|
45
|
+
cases:
|
|
46
|
+
- tt_members: VALUE
|
|
50
47
|
```
|
|
51
48
|
|
|
52
49
|
The check process notifies that
|
|
@@ -17,7 +17,7 @@ Alias: `teuton foo`
|
|
|
17
17
|
|
|
18
18
|
Running Teuton test located into `example/01-target` folder.
|
|
19
19
|
|
|
20
|
-
```
|
|
20
|
+
```
|
|
21
21
|
$ teuton run example/01-target
|
|
22
22
|
|
|
23
23
|
------------------------------------
|
|
@@ -56,37 +56,39 @@ Options:
|
|
|
56
56
|
| -- | -------------------- | ------------ |
|
|
57
57
|
| 01 | teuton foo | Run foo/start.rb, with config file foo/config.yaml |
|
|
58
58
|
| 02 | teuton run foo | Run foo/start.rb, with config file foo/config.yaml |
|
|
59
|
-
| 03 |
|
|
60
|
-
| 04 |
|
|
61
|
-
| 05 | teuton
|
|
62
|
-
| 06 | teuton
|
|
63
|
-
| 07 | teuton run --
|
|
64
|
-
| 08 | teuton foo
|
|
65
|
-
| 08 | teuton run --cpath=starwars/jedi.yaml foo | Run foo/start.rb with starwars/jedi.yaml config file |
|
|
66
|
-
| 09 | teuton run --case=6,16 foo | Run foo/start.rb with foo/config.yaml config file but only for case id '06' and '16' |
|
|
59
|
+
| 03 | teuton . | Run ./start.rb with ./config.yaml file |
|
|
60
|
+
| 04 | teuton run --export=json foo | Run foo/start.rb and force json format during exporting |
|
|
61
|
+
| 05 | teuton run --cname=rock foo | Run foo/start.rb with foo/rock.yaml config file |
|
|
62
|
+
| 06 | teuton foo/demo42.rb | Run foo/demo42.rb with foo/demo42.yaml config file |
|
|
63
|
+
| 07 | teuton run --cpath=starwars/jedi.yaml foo | Run foo/start.rb with starwars/jedi.yaml config file |
|
|
64
|
+
| 08 | teuton run --case=6,16 foo | Run foo/start.rb with foo/config.yaml config file but only for case id '06' and '16' |
|
|
67
65
|
|
|
68
66
|
# 3. Choosing config file
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
## 3.1 Default file names
|
|
69
|
+
|
|
71
70
|
By default, when you run `teuton run foo`, this will search for:
|
|
72
71
|
* `foo/start.rb` test file and
|
|
73
72
|
* `foo/config.yaml` config file.
|
|
74
73
|
|
|
75
|
-
|
|
74
|
+
## 3.2 Using `cname` option
|
|
75
|
+
|
|
76
76
|
It's posible execute `teuton run --cname=rock foo`, and choose diferent config file into projet folder:
|
|
77
77
|
* `foo/start.rb` test file and
|
|
78
78
|
* `foo/rock.yaml` config file.
|
|
79
79
|
|
|
80
80
|
> `cname` param searchs YAML config file into the same project folder.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
## 3.3 Using `cpath` option
|
|
83
|
+
|
|
84
|
+
An also, it's posible execute `teuton run --cpath=/home/obiwan/startwars.yaml foo`, and choose config file using its absolute path:
|
|
84
85
|
* `foo/start.rb` test file and
|
|
85
|
-
* `/home/
|
|
86
|
+
* `/home/obiwan/starwars.yaml` config file.
|
|
86
87
|
|
|
87
88
|
> `cpath` param selects YAML config file, from the specified path.
|
|
88
89
|
|
|
89
|
-
|
|
90
|
+
## 3.4 Using diferent main rb name
|
|
91
|
+
|
|
90
92
|
When you execute `teuton run foo/mazingerz.rb`, this will search for:
|
|
91
93
|
* `foo/mazingerz.rb` test file and
|
|
92
94
|
* `foo/mazingerz.yaml` config file.
|
data/docs/dsl/export.md
CHANGED
|
@@ -2,20 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
# export
|
|
4
4
|
|
|
5
|
-
Create reports
|
|
6
|
-
|
|
7
|
-
## Example
|
|
8
|
-
|
|
9
|
-
Run export and build reports using txt output format by default:
|
|
5
|
+
Create output reports into `var/TESTNAME` folder.
|
|
10
6
|
|
|
7
|
+
**Example 1**: Run export and build reports using default format (`txt`).
|
|
11
8
|
```ruby
|
|
12
9
|
play do
|
|
13
10
|
export
|
|
14
11
|
end
|
|
15
12
|
```
|
|
16
13
|
|
|
17
|
-
Run test and build reports using `html`
|
|
18
|
-
|
|
14
|
+
**Example 2**: Run test and build reports using `html` format.
|
|
19
15
|
```ruby
|
|
20
16
|
play do
|
|
21
17
|
export format: 'html'
|
|
@@ -26,9 +22,9 @@ end
|
|
|
26
22
|
|
|
27
23
|
| Option | Values | Description |
|
|
28
24
|
| ------ | ------ | ----------- |
|
|
29
|
-
| format | **txt** (default), html, yaml, json, colored_text (txt with colors) |Output file format |
|
|
30
|
-
| preserve | **false** (default), true | Keep report
|
|
31
|
-
| feedback | **true** (default), false | Hide
|
|
25
|
+
| format | **txt** (default), html, yaml, json, markdown, colored_text (txt with colors) |Output file format |
|
|
26
|
+
| preserve | **false** (default), true | Keep old report copies |
|
|
27
|
+
| feedback | **true** (default), false | Hide feedback information from reports |
|
|
32
28
|
|
|
33
29
|
## Usage
|
|
34
30
|
|
data/docs/dsl/get.md
CHANGED
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# get
|
|
4
4
|
|
|
5
|
-
`get` reads param value from configuration file.
|
|
5
|
+
`get(PARAM)` keyword reads param value from configuration file.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
get(PARAM)
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Example
|
|
7
|
+
## Example 1: reading params
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
Suppose we have this `config.yaml` content:
|
|
14
10
|
|
|
15
11
|
```yaml
|
|
16
12
|
---
|
|
@@ -28,19 +24,23 @@ Supossing we are **case 01**, then:
|
|
|
28
24
|
* `get(:username)` returns `obiwan`.
|
|
29
25
|
* `get(:host1_username)`, returns `root`.
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
## Example 2: writting and reading params
|
|
28
|
+
|
|
29
|
+
We also can create new temporal params:
|
|
32
30
|
|
|
33
31
|
```ruby
|
|
34
32
|
set(:name, "Obiwan")
|
|
35
|
-
|
|
33
|
+
jediname = get(:name)
|
|
36
34
|
```
|
|
37
35
|
|
|
38
|
-
So `
|
|
36
|
+
So `jediname` value is "Obiwan".
|
|
37
|
+
|
|
38
|
+
## Example 3: reading alias
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Other ways or reading param values:
|
|
41
41
|
|
|
42
42
|
```ruby
|
|
43
|
-
|
|
43
|
+
jediname = _name
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
So `
|
|
46
|
+
So `jediname` value is "Obiwan" too. `_name` is an alias of `get(:name)`.
|
data/docs/dsl/group.md
CHANGED
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Groups targets.
|
|
6
6
|
|
|
7
|
+
## Example
|
|
8
|
+
|
|
7
9
|
```ruby
|
|
8
10
|
group "Group name" do
|
|
9
11
|
...
|
|
10
12
|
end
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
* Define a group of targets
|
|
15
|
+
* Define a group of targets. These are groups of objectives to be evaluated.
|
|
14
16
|
* At least you must define one `group`, where you can define all your targets.
|
|
15
17
|
* We can use `group`, as many times as we need. Usefull to group related objectives.
|
data/docs/dsl/send.md
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
`send` is used to copy Teuton reports into remote machines.
|
|
6
6
|
|
|
7
|
+
Usage:
|
|
7
8
|
```ruby
|
|
8
9
|
start do
|
|
9
10
|
export
|
|
@@ -11,9 +12,9 @@ start do
|
|
|
11
12
|
end
|
|
12
13
|
```
|
|
13
14
|
|
|
14
|
-
* `send` instruction must be execute after `export
|
|
15
|
+
* `send` instruction must be execute after `export`, because report files must be generated before send them.
|
|
15
16
|
* `host1`, label that identify remote host. This information must be configured into config file.
|
|
16
|
-
* `send copy_to: :host1`,
|
|
17
|
+
* `send copy_to: :host1`, by default, the home folder of the user `host1_username` is used to copy report on the remote host (`host1_ip`).
|
|
17
18
|
|
|
18
19
|
## Options
|
|
19
20
|
|
|
@@ -50,9 +51,9 @@ start do
|
|
|
50
51
|
end
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
## Example:
|
|
54
|
+
## Example: Change remote dir using "dir" options
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
This example sends `case-01-txt` file to default folder of remote host.
|
|
56
57
|
|
|
57
58
|
```ruby
|
|
58
59
|
play do
|
|
@@ -62,11 +63,9 @@ play do
|
|
|
62
63
|
end
|
|
63
64
|
```
|
|
64
65
|
|
|
65
|
-
Result:
|
|
66
|
-
|
|
67
66
|

|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
Using `dir: "./Desktop"`, report files will be sent to remote host "./Desktop" folder.
|
|
70
69
|
|
|
71
70
|
```ruby
|
|
72
71
|
play do
|
data/docs/learn/01-cmd_new.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
[<< back](README.md)
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
# New test
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`teuton create foo` is a command function that creates skeleton for a new project.
|
|
7
|
+
|
|
8
|
+
## Example
|
|
7
9
|
|
|
8
10
|
```
|
|
9
|
-
|
|
11
|
+
$ teuton new foo
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Creating foo project
|
|
12
14
|
* Create dir => foo
|
|
13
15
|
* Create file => foo/config.yaml
|
|
14
16
|
* Create file => foo/start.rb
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Read about [teuton create](../commands/README.md)
|
|
18
20
|
|
|
19
21
|
This command will create:
|
|
20
22
|
|
|
@@ -24,5 +26,4 @@ This command will create:
|
|
|
24
26
|
| foo/start.rb | Main Script |
|
|
25
27
|
| foo/config.yaml | YAML configuration file |
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
Now it is time to customize your targets.
|
|
29
|
+
The next step is to personalize your targets.
|
data/docs/learn/02-target.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[<< back](README.md)
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Target
|
|
4
4
|
|
|
5
5
|
A [target](../dsl/target.md) is a feature you want to check. Targets are defined into `group` sections.
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ A [target](../dsl/target.md) is a feature you want to check. Targets are defined
|
|
|
8
8
|
|
|
9
9
|
Every evaluation has 3 parts:
|
|
10
10
|
* [target](dsl/target.md): Description of the element to be tested.
|
|
11
|
-
* [run](../dsl/run.md): Execute a command
|
|
11
|
+
* [run](../dsl/run.md): Execute a command on local or remote host.
|
|
12
12
|
* [expect](../dsl/expect.md): Verify that the result contains expected value.
|
|
13
13
|
|
|
14
14
|
```ruby
|
|
@@ -24,24 +24,23 @@ group "Learn about targets" do
|
|
|
24
24
|
end
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
> In this example, our localhost's OS is GNU/Linux (or any other compatible OS)
|
|
27
|
+
> In this example, our localhost's OS is GNU/Linux (or any other compatible OS), so the command executed is `id obiwan`.
|
|
28
28
|
|
|
29
29
|
When the user exists, we expect this words: `uid=, (obiwan), gid=`.
|
|
30
30
|
|
|
31
31
|
```
|
|
32
|
-
|
|
32
|
+
$ id obiwan
|
|
33
33
|
uid=1000(obiwan) gid=1000(obiwan) grupos=1000(obiwan)
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
But when user does not exist, we expect command fail.
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
|
|
39
|
+
$ id vader
|
|
40
40
|
id: «vader»: no such user
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
>$ echo $?
|
|
43
43
|
1
|
|
44
|
-
|
|
45
44
|
```
|
|
46
45
|
|
|
47
46
|
## Execution section
|
|
@@ -62,8 +61,8 @@ end
|
|
|
62
61
|
|
|
63
62
|
Execute this command to run the test:
|
|
64
63
|
|
|
65
|
-
```
|
|
66
|
-
|
|
64
|
+
```
|
|
65
|
+
$ teuton run examples/02-target
|
|
67
66
|
|
|
68
67
|
CASE RESULTS
|
|
69
68
|
+------+-----------+-------+-------+
|
|
@@ -74,7 +73,7 @@ CASE RESULTS
|
|
|
74
73
|
|
|
75
74
|
Report files are created into `var/02-target/` folder:
|
|
76
75
|
|
|
77
|
-
```
|
|
76
|
+
```
|
|
78
77
|
var
|
|
79
78
|
└── 02-target
|
|
80
79
|
├── case-01.txt
|
|
@@ -85,7 +84,7 @@ var
|
|
|
85
84
|
Let's see one report:
|
|
86
85
|
|
|
87
86
|
```
|
|
88
|
-
|
|
87
|
+
$ cat var/02-target/case-01.txt
|
|
89
88
|
CONFIGURATION
|
|
90
89
|
+-------------+-----------+
|
|
91
90
|
| tt_members | anonymous |
|
|
@@ -94,7 +93,6 @@ CONFIGURATION
|
|
|
94
93
|
| tt_testname | 02-target |
|
|
95
94
|
+-------------+-----------+
|
|
96
95
|
|
|
97
|
-
|
|
98
96
|
GROUPS
|
|
99
97
|
- Learn about targets
|
|
100
98
|
01 (0.0/1.0)
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
To run test on remote host we have to define them into config file.
|
|
6
6
|
|
|
7
|
+
## Example
|
|
8
|
+
|
|
7
9
|
Let's see an example with:
|
|
8
10
|
* 1 global param.
|
|
9
11
|
* 3 cases with 3 params.
|
|
@@ -52,7 +54,7 @@ end
|
|
|
52
54
|
Execution:
|
|
53
55
|
|
|
54
56
|
```
|
|
55
|
-
|
|
57
|
+
$ teuton run examples/03-remote_hosts
|
|
56
58
|
|
|
57
59
|
CASE RESULTS
|
|
58
60
|
+------+-----------+-------+-------+
|
|
@@ -70,12 +72,12 @@ CONN ERRORS
|
|
|
70
72
|
+------+-----------+-------+------------------+
|
|
71
73
|
```
|
|
72
74
|
|
|
73
|
-
Notice that case-03 is 100% and conection works. It is running on localhost because has localhost IP (127.0.0.1)
|
|
75
|
+
Notice that case-03 is 100% and conection works. It is running on localhost because has localhost IP (127.0.0.1).
|
|
74
76
|
|
|
75
77
|
Results:
|
|
76
78
|
|
|
77
79
|
```
|
|
78
|
-
|
|
80
|
+
$ tree var/03-remote_hosts
|
|
79
81
|
|
|
80
82
|
var/03-remote_hosts
|
|
81
83
|
├── case-01.txt
|
|
@@ -87,7 +89,7 @@ var/03-remote_hosts
|
|
|
87
89
|
|
|
88
90
|
## tt_skip param
|
|
89
91
|
|
|
90
|
-
To disable a case, add skip param `tt_skip: true`.
|
|
91
|
-
* `tt_skip` it is
|
|
92
|
+
To disable a case, add skip param to config file. Example: `tt_skip: true`.
|
|
93
|
+
* `tt_skip` it is false by default.
|
|
92
94
|
* `tt_skip: false` ignore this case.
|
|
93
95
|
* `tt_skip: true`, evaluate this case.
|
data/docs/learn/04-config.md
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
# config
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Our tests use config file to write dinamic data into separated file.
|
|
6
6
|
|
|
7
7
|
By default, `config.yaml` is our config file. Example:
|
|
8
8
|
|
|
9
9
|
```yaml
|
|
10
10
|
global:
|
|
11
11
|
cases:
|
|
12
|
-
- tt_members:
|
|
12
|
+
- tt_members: student_1
|
|
13
13
|
username: david
|
|
14
|
-
- tt_members:
|
|
14
|
+
- tt_members: student_2
|
|
15
15
|
username: fran
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
> **How to choose another config file?** Read this [document](../commands/
|
|
18
|
+
> **How to choose another config file?** Read this [document](../commands/run-test.md#3-choosing-config-file).
|
|
19
19
|
|
|
20
20
|
By default, `start.rb` it's our main execution file. Example:
|
|
21
21
|
|
|
@@ -29,19 +29,19 @@ group "Reading params from config file" do
|
|
|
29
29
|
end
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
* [get](../dsl/get.md) keyword read params from configuration file. It's posible personalize tests with diferent values for every case.
|
|
32
|
+
* [get](../dsl/get.md) keyword read params values from configuration file. It's posible personalize tests with diferent values for every case.
|
|
33
33
|
|
|
34
34
|
## Example
|
|
35
35
|
|
|
36
|
-
```
|
|
37
|
-
|
|
36
|
+
```
|
|
37
|
+
$ teuton run examples/04-config
|
|
38
38
|
|
|
39
39
|
CASE RESULTS
|
|
40
|
-
|
|
41
|
-
| CASE | MEMBERS
|
|
42
|
-
| 01 |
|
|
43
|
-
| 02 |
|
|
44
|
-
|
|
40
|
+
+------+-----------+-------+-------+
|
|
41
|
+
| CASE | MEMBERS | GRADE | STATE |
|
|
42
|
+
| 01 | student_1 | 100.0 | ✔ |
|
|
43
|
+
| 02 | student_2 | 0.0 | ? |
|
|
44
|
+
+------+-----------+-------+-------+
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
Reports:
|
|
@@ -57,16 +57,16 @@ var/04-config
|
|
|
57
57
|
Let's see case 01 report.
|
|
58
58
|
|
|
59
59
|
```
|
|
60
|
-
|
|
60
|
+
$ more var/04-config/case-01.txt
|
|
61
61
|
|
|
62
62
|
CONFIGURATION
|
|
63
|
-
|
|
64
|
-
| tt_members |
|
|
65
|
-
| tt_sequence | false
|
|
66
|
-
| tt_skip | false
|
|
67
|
-
| tt_testname | 04-config
|
|
68
|
-
| username | david
|
|
69
|
-
|
|
63
|
+
+-------------+------------+
|
|
64
|
+
| tt_members | student_1 |
|
|
65
|
+
| tt_sequence | false |
|
|
66
|
+
| tt_skip | false |
|
|
67
|
+
| tt_testname | 04-config |
|
|
68
|
+
| username | david |
|
|
69
|
+
+-------------+------------+
|
|
70
70
|
|
|
71
71
|
GROUPS
|
|
72
72
|
- Reading params from config file
|
|
@@ -95,10 +95,10 @@ RESULTS
|
|
|
95
95
|
|
|
96
96
|
## Using differents configuration files
|
|
97
97
|
|
|
98
|
-
Example with 3 config files (yaml files):
|
|
98
|
+
Example with 3 differents config files (yaml files):
|
|
99
99
|
|
|
100
100
|
```
|
|
101
|
-
|
|
101
|
+
$ tree examples/04-config
|
|
102
102
|
|
|
103
103
|
examples/04-config
|
|
104
104
|
├── config.yaml
|
|
@@ -107,23 +107,21 @@ examples/04-config
|
|
|
107
107
|
└── starwars.yaml
|
|
108
108
|
```
|
|
109
109
|
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
**Example 1**: Run test usign default config file (`config.yaml`).
|
|
112
111
|
```
|
|
113
|
-
|
|
112
|
+
$ teuton run examples/04-config
|
|
114
113
|
|
|
115
114
|
CASE RESULTS
|
|
116
|
-
|
|
117
|
-
| CASE | MEMBERS
|
|
118
|
-
| 01 |
|
|
119
|
-
| 02 |
|
|
120
|
-
|
|
115
|
+
+------+-----------+-------+-------+
|
|
116
|
+
| CASE | MEMBERS | GRADE | STATE |
|
|
117
|
+
| 01 | student_1 | 100.0 | ✔ |
|
|
118
|
+
| 02 | student_2 | 0.0 | ? |
|
|
119
|
+
+------+-----------+-------+-------+
|
|
121
120
|
```
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
**Example 2**: Run test using `example/04-config/starwars.yaml` config file.
|
|
125
123
|
```
|
|
126
|
-
|
|
124
|
+
$ teuton run --cname=starwars examples/04-config
|
|
127
125
|
|
|
128
126
|
CASE RESULTS
|
|
129
127
|
+------+------------+-------+-------+
|
|
@@ -133,10 +131,9 @@ CASE RESULTS
|
|
|
133
131
|
+------+------------+-------+-------+
|
|
134
132
|
```
|
|
135
133
|
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
**Example 3**: Run test using `example/04-config/rock.yaml` config file.
|
|
138
135
|
```
|
|
139
|
-
|
|
136
|
+
$ teuton run --cpath=examples/04-config/rock.yaml examples/04-config
|
|
140
137
|
|
|
141
138
|
CASE RESULTS
|
|
142
139
|
+------+------------+-------+-------+
|
data/docs/learn/05-use.md
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
# use
|
|
4
4
|
|
|
5
|
-
`use` keyword allow us organize huge amount of groups/targets into
|
|
5
|
+
`use` keyword allow us organize huge amount of groups/targets into differents files.
|
|
6
6
|
|
|
7
7
|
## Example
|
|
8
8
|
|
|
9
9
|
> This example requires Windows OS on remote machine.
|
|
10
10
|
|
|
11
|
-
```
|
|
12
|
-
|
|
11
|
+
```
|
|
12
|
+
$ tree examples/05-use
|
|
13
|
+
|
|
13
14
|
examples/05-use
|
|
14
15
|
├── lib
|
|
15
16
|
│ ├── network.rb
|
|
@@ -18,7 +19,7 @@ examples/05-use
|
|
|
18
19
|
└── start.rb
|
|
19
20
|
```
|
|
20
21
|
|
|
21
|
-
*
|
|
22
|
+
* The content is now splited into: `start.rb`, `users.rb` and `network.rb`.
|
|
22
23
|
|
|
23
24
|
```ruby
|
|
24
25
|
# File: start.rb
|