@@ -36,8 +36,64 @@ UpdateInt('VinniPuhh', 2)
36
36
Logout('VinniPuhh',)
37
37
2. Finished at step 11, reached accepting state
38
38
Test finished, completed 3 runs
39
- sh: line 0: type: WebModelTest_n10_c3_s3_r3.py: not found
40
- Generate a test suite with three runs
39
+
40
+ # pmt -n 10 -c 3 -s 3 -r 3 WebModel -o WebModelTest_n10_c3_s3_r3
41
+
42
+ # actions here are just labels, but must be symbols with __name__ attribute
43
+
44
+ def Initialize(): pass
45
+ def ReadInt(): pass
46
+ def Login(): pass
47
+ def Logout(): pass
48
+ def UpdateInt(): pass
49
+
50
+ # action symbols
51
+ actions = (Initialize, ReadInt, Login, Logout, UpdateInt)
52
+
53
+ testSuite = [
54
+ [
55
+ (Initialize, ()),
56
+ (Login, ('OleBrumm', 'Correct'), 'Success'),
57
+ (Login, ('VinniPuhh', 'Incorrect'), 'Failure'),
58
+ (Logout, ('OleBrumm',)),
59
+ (Login, ('OleBrumm', 'Correct'), 'Success'),
60
+ (UpdateInt, ('OleBrumm', 1)),
61
+ (UpdateInt, ('OleBrumm', 1)),
62
+ (UpdateInt, ('OleBrumm', 2)),
63
+ (Login, ('VinniPuhh', 'Correct'), 'Success'),
64
+ (UpdateInt, ('OleBrumm', 1)),
65
+ (Logout, ('OleBrumm',)),
66
+ (Logout, ('VinniPuhh',)),
67
+ ],
68
+ #
69
+ [
70
+ (Initialize, ()),
71
+ (Login, ('VinniPuhh', 'Incorrect'), 'Failure'),
72
+ (Login, ('OleBrumm', 'Correct'), 'Success'),
73
+ (UpdateInt, ('OleBrumm', 1)),
74
+ (ReadInt, ('OleBrumm',), 1),
75
+ (UpdateInt, ('OleBrumm', 2)),
76
+ (Login, ('VinniPuhh', 'Incorrect'), 'Failure'),
77
+ (Logout, ('OleBrumm',)),
78
+ (Login, ('OleBrumm', 'Correct'), 'Success'),
79
+ (UpdateInt, ('OleBrumm', 1)),
80
+ (Logout, ('OleBrumm',)),
81
+ ],
82
+ #
83
+ [
84
+ (Initialize, ()),
85
+ (Login, ('VinniPuhh', 'Incorrect'), 'Failure'),
86
+ (Login, ('OleBrumm', 'Incorrect'), 'Failure'),
87
+ (Login, ('VinniPuhh', 'Correct'), 'Success'),
88
+ (ReadInt, ('VinniPuhh',), 0),
89
+ (Login, ('OleBrumm', 'Incorrect'), 'Failure'),
90
+ (UpdateInt, ('VinniPuhh', 1)),
91
+ (Login, ('OleBrumm', 'Incorrect'), 'Failure'),
92
+ (UpdateInt, ('VinniPuhh', 1)),
93
+ (UpdateInt, ('VinniPuhh', 2)),
94
+ (Logout, ('VinniPuhh',)),
95
+ ],
96
+ ]Generate a test suite with three runs
41
97
42
98
Show the generated test suite
43
99
0 commit comments