Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (33 sloc) 1.21 KB
tollerance: 100
requisitions:
- parallel: true
requisitions:
- delay: 200
onInit:
script: requisition.startTime = new Date();
- delay: 300
onInit:
script: requisition.startTime = new Date();
onFinish:
assertions:
- name: started at the same time
expect: Math.abs(requisition.requisitions[1].startTime.getTime() - requisition.requisitions[0].startTime.getTime())
toBeLessThanOrEqualTo: requisition.parent.tollerance
- expect: elapsedTime
toBeLessThanOrEqualTo: 300 + requisition.parent.tollerance
- parallel: false
requisitions:
- delay: 200
onInit:
script: requisition.startTime = new Date();
- delay: 300
onInit:
script: |-
script: requisition.startTime = new Date();
onFinish:
assertions:
- name: started after the other
expect: requisition.requisitions[1].startTime.getTime() - requisition.requisitions[0].startTime.getTime()
toBeGreaterThanOrEqualTo: requisition.requisitions[0].delay
- expect: elapsedTime
toBeLessThanOrEqualTo: 200 + 300 + requisition.parent.tollerance
You can’t perform that action at this time.