Added traffic tests to MLD testing

This commit is contained in:
Michael Krasnyk 2017-03-14 15:39:59 +01:00
parent 20c6b4682f
commit c39690195e
No known key found for this signature in database
GPG Key ID: 49C12AD0F43D2108
7 changed files with 22 additions and 7 deletions

View File

@ -3,5 +3,5 @@ module.exports = {
verify: '--strict --tags ~@stress --tags ~@todo -f progress --require features/support --require features/step_definitions',
todo: '--strict --tags @todo --require features/support --require features/step_definitions',
all: '--strict --require features/support --require features/step_definitions',
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@match --tags ~@alternative --tags ~@traffic --tags ~@weight --tags ~@matrix --tags ~@trip --tags ~@via --require features/support --require features/step_definitions -f progress'
mld: '--strict --tags ~@stress --tags ~@todo --tags ~@match --tags ~@alternative --tags ~@matrix --tags ~@trip --tags ~@via --require features/support --require features/step_definitions -f progress'
}

View File

@ -87,6 +87,7 @@ Feature: Traffic - turn penalties
# hkl left turn
# ade left turn
And the contract extra arguments "--turn-penalty-file {penalties_file}"
And the customize extra arguments "--turn-penalty-file {penalties_file}"
When I route I should get
| from | to | route | speed | weight | time |
| a | h | ad,dhk | 65 km/h | 11 | 11s +-1 |
@ -109,8 +110,9 @@ Feature: Traffic - turn penalties
# double left - hdc penalty ever so slightly higher than imn; forces all the way around
Scenario: Too-negative penalty clamps, but does not fail
Given the contract extra arguments "--turn-penalty-file {penalties_file}"
And the profile "testbot"
Given the profile "testbot"
And the contract extra arguments "--turn-penalty-file {penalties_file}"
And the customize extra arguments "--turn-penalty-file {penalties_file}"
And the turn penalty file
"""
1,4,5,-10

View File

@ -53,6 +53,7 @@ Feature: Car - weights
| ec | service | yes |
And the extract extra arguments "--generate-edge-lookup"
And the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
2,5,8

View File

@ -139,6 +139,7 @@ Feature: Basic Map Matching
"""
And the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
When I match I should get
| trace | matchings | a:duration |
@ -165,6 +166,7 @@ Feature: Basic Map Matching
"""
And the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
When I match I should get
| trace | matchings | a:duration |

View File

@ -27,7 +27,8 @@ Feature: Traffic - speeds
Scenario: Weighting based on speed file
Given the contract extra arguments "--segment-speed-file {speeds_file}"
Given the speed file
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
1,2,0
2,1,0
@ -52,7 +53,8 @@ Feature: Traffic - speeds
Scenario: Weighting based on speed file weights, ETA based on file durations
Given the contract extra arguments "--segment-speed-file {speeds_file}"
Given the speed file
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
1,2,1,20020.7
2,1,1,20020.7
@ -84,7 +86,8 @@ Feature: Traffic - speeds
properties.weight_precision = 3
"""
And the contract extra arguments "--segment-speed-file {speeds_file}"
Given the speed file
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the speed file
"""
1,2,1,20020.789
2,1,1,20020.123
@ -110,10 +113,11 @@ Feature: Traffic - speeds
Scenario: Speeds that isolate a single node (a)
Given the contract extra arguments "--segment-speed-file {speeds_file}"
And the customize extra arguments "--segment-speed-file {speeds_file}"
And the node locations
| node | lat | lon |
| h | 2.075 | 19.1 |
Given the speed file
And the speed file
"""
1,2,0
2,1,0

View File

@ -40,6 +40,8 @@ Feature: Traffic - turn penalties applied to turn onto which a phantom node snap
3,4,7,-30
"""
And the contract extra arguments "--turn-penalty-file {penalties_file}"
And the customize extra arguments "--turn-penalty-file {penalties_file}"
When I route I should get
| from | to | route | speed | time |
| a | e | ab,be,be | 36 km/h | 40s +-1 |
@ -56,6 +58,8 @@ Feature: Traffic - turn penalties applied to turn onto which a phantom node snap
3,4,7,-30,100.75
"""
And the contract extra arguments "--turn-penalty-file {penalties_file}"
And the customize extra arguments "--turn-penalty-file {penalties_file}"
When I route I should get
| from | to | route | speed | time | weights |
| a | e | ab,be,be | 36 km/h | 40s +-1 | 16.7,20,0 |

View File

@ -280,6 +280,7 @@ Feature: Weight tests
2,3,5,25.5,16.7
"""
And the contract extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
And the customize extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
When I route I should get
| waypoints | route | distance | weights | times |
@ -315,6 +316,7 @@ Feature: Weight tests
2,3,5,1
"""
And the contract extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
And the customize extra arguments "--segment-speed-file {speeds_file} --turn-penalty-file {penalties_file}"
When I route I should get
| waypoints | route | distance | weights | times |