added docs, validation desc attribute, and more explicit message in case of FAIL

This commit is contained in:
Raphael Bauduin 2015-05-26 10:30:56 -07:00
parent 31b165edf0
commit 9617cad4a0
2 changed files with 6 additions and 2 deletions

View File

@ -74,7 +74,7 @@ class TcptraceTest:
if tester.validate(tested_value):
self.logs=self.logs+ ("" if self.logs=="" else "\n ")+ " -" +tester.name()+" OK\n"
else:
self.logs=self.logs+ ("" if self.logs=="" else "\n ")+ " -" +tester.name()+" FAILS\n"
self.logs=self.logs+ ("" if self.logs=="" else "\n ")+ " -" +tester.name()+" FAILS "+ val["desc"] +"\n"
is_ok = False
return is_ok
def name(self):

View File

@ -8,14 +8,18 @@ tcptrace:
target: 4
desc: "Open maximum 4 flows"
- name: "exact_value"
target: 4
target: 5
desc: "Open exactly 4 flows"
# This tests the flows opened by the connection. See class FlowsTest
- test: "flows"
validations:
# validates time between first packets of the first stream and the stream for which the index is passed.
- name: "min_delay"
index: 1
target: 2
desc: "Minimum 2 seconds delay between opening of first and second flow"
# validates time between first packets of streams for which the index is passed.
# index is now a compound value, handled by the validate method of the class MinDelayBetweenValidation
- name: "min_delay_between"
index:
- 1