Skip to content

Commit 33c0086

Browse files
authored
Merge pull request #33: Rerun previously generated trace
Test trace generation is randomised by default. But what if you hit this unique case no one thought of before? Or that special combination that reveals a defect? Then you want to have the option to rerun that specific trace. Version 0.7 introduces a `seed` argument that lets you reproduce a previously generated trace.
2 parents f59a097 + dc6c2ab commit 33c0086

33 files changed

Lines changed: 657 additions & 47 deletions

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,18 @@ In a then-step, modifiers behave slightly different. In then-steps no new option
183183

184184
This first implementation for variable data considers strict equivalence classes only. This means that all variants are considered equal for all purposes. If, for a certain scenario, a single valid example variant has been generated and executed, then this scenario is considered covered. There are no options yet to indicate deeper coverage targets based on data variations. It also implies that whenever any variant is valid, all scenario variants must be valid. And that regardless of which variant is chosen, the exact same scenarios can be chosen as the next one. This does however not mean that once a variant is chosen, that this variant will be used throughout the whole trace. If a scenario is selected multiple times in the same trace, then each occurrence will get new randomly selected data.
185185

186+
## Configuration options
187+
188+
### Random seed
189+
190+
By default, trace generation is random. The random seed used for the trace is logged (debug level) by _Treat this test suite model-based_. This seed can be used to rerun the same trace, if no external random factors influence the test run. To activate the seed, pass it as argument:
191+
192+
```
193+
Treat this test suite model-based seed=eag-etou-cxi-leamv-jsi
194+
```
195+
196+
Using `seed=new` will force generation of a new reusable seed and is identical to omitting the seed argument. To completely bypass seed generation and use the system's random source, use `seed=None`. This has even more variation but does not produce a reusable seed.
197+
186198
## Disclaimer
187199

188200
Please note that this library is in a premature state and hasn't reached its first official (1.0) release yet. Developments are ongoing within the context of the [TiCToC](https://tictoc.cs.ru.nl/) research project. Interface changes are still frequent, and no deprecation warnings are being issued yet.

atest/robotMBT tests/07__processor_options/option_handling/01__pass_option_directly.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Suite Setup Run keywords Set suite variable ${test_count} ${0}
33
... AND Treat this test suite Model-based repeat=2
44
Suite Teardown Should be equal ${test_count} ${2}
5-
Library SuiteRepeater.py
6-
Library robotmbt processor_lib=SuiteRepeater
5+
Library suiterepeater.py
6+
Library robotmbt processor_lib=suiterepeater
77

88
*** Test Cases ***
99
only test case

atest/robotMBT tests/07__processor_options/option_handling/02__set_option_by_keyword.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Suite Setup Run keywords Set suite variable ${test_count} ${0}
33
... AND Set model-based options repeat=2
44
... AND Treat this test suite Model-based
55
Suite Teardown Should be equal ${test_count} ${2}
6-
Library SuiteRepeater.py
7-
Library robotmbt processor_lib=SuiteRepeater
6+
Library suiterepeater.py
7+
Library robotmbt processor_lib=suiterepeater
88

99
*** Test Cases ***
1010
only test case

atest/robotMBT tests/07__processor_options/option_handling/03__update_option_by_keyword.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Suite Setup Run keywords Set suite variable ${test_count} ${0}
44
... AND Update model-based options repeat=3
55
... AND Treat this test suite Model-based
66
Suite Teardown Should be equal ${test_count} ${3}
7-
Library SuiteRepeater.py
8-
Library robotmbt processor_lib=SuiteRepeater
7+
Library suiterepeater.py
8+
Library robotmbt processor_lib=suiterepeater
99

1010
*** Test Cases ***
1111
only test case

atest/robotMBT tests/07__processor_options/option_handling/04__update_option_at_trigger.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Suite Setup Run keywords Set suite variable ${test_count} ${0}
33
... AND Set model-based options repeat=2
44
... AND Treat this test suite Model-based repeat=3
55
Suite Teardown Should be equal ${test_count} ${3}
6-
Library SuiteRepeater.py
7-
Library robotmbt processor_lib=SuiteRepeater
6+
Library suiterepeater.py
7+
Library robotmbt processor_lib=suiterepeater
88

99
*** Test Cases ***
1010
only test case

atest/robotMBT tests/07__processor_options/option_handling/05__use_update_without_setter.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Suite Setup Run keywords Set suite variable ${test_count} ${0}
33
... AND Update model-based options repeat=2
44
... AND Treat this test suite Model-based
55
Suite Teardown Should be equal ${test_count} ${2}
6-
Library SuiteRepeater.py
7-
Library robotmbt processor_lib=SuiteRepeater
6+
Library suiterepeater.py
7+
Library robotmbt processor_lib=suiterepeater
88

99
*** Test Cases ***
1010
only test case

atest/robotMBT tests/07__processor_options/option_handling/06__pass_multiple_options.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Suite Setup Run keywords Set suite variable ${test_count} ${0}
33
... AND Treat this test suite Model-based repeat=2 bonus_scenario=${True}
44
Suite Teardown Should be equal ${test_count} ${3}
5-
Library SuiteRepeater.py
6-
Library robotmbt processor_lib=SuiteRepeater
5+
Library suiterepeater.py
6+
Library robotmbt processor_lib=suiterepeater
77

88
*** Test Cases ***
99
only test case

atest/robotMBT tests/07__processor_options/option_handling/07__set_clears_other_options.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Suite Setup Run keywords Set suite variable ${test_count} ${0}
44
... AND Set model-based options repeat=2
55
... AND Treat this test suite Model-based
66
Suite Teardown Should be equal ${test_count} ${2}
7-
Library SuiteRepeater.py
8-
Library robotmbt processor_lib=SuiteRepeater
7+
Library suiterepeater.py
8+
Library robotmbt processor_lib=suiterepeater
99

1010
*** Test Cases ***
1111
only test case

atest/robotMBT tests/07__processor_options/option_handling/08__empty_setter_clears_all_options.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Suite Setup Run keywords Set suite variable ${test_count} ${0}
44
... AND Set model-based options
55
... AND Treat this test suite Model-based
66
Suite Teardown Should be equal ${test_count} ${1}
7-
Library SuiteRepeater.py
8-
Library robotmbt processor_lib=SuiteRepeater
7+
Library suiterepeater.py
8+
Library robotmbt processor_lib=suiterepeater
99

1010
*** Test Cases ***
1111
only test case

atest/robotMBT tests/07__processor_options/option_handling/09__multiple_options_from_dict.robot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Suite Setup Run keywords Set suite variable ${test_count} ${0}
33
... AND Treat this test suite Model-based &{mbt_options}
44
Suite Teardown Should be equal ${test_count} ${3}
5-
Library SuiteRepeater.py
6-
Library robotmbt processor_lib=SuiteRepeater
5+
Library suiterepeater.py
6+
Library robotmbt processor_lib=suiterepeater
77

88
*** Variables ***
99
&{mbt_options} repeat=2 bonus_scenario=${True}

0 commit comments

Comments
 (0)