cucumber cleanup, removed unused code
This commit is contained in:
parent
7e9614b9ec
commit
ec56478a3c
@ -3,7 +3,7 @@ Feature: Bike - Restricted access
|
|||||||
Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Access tag hierachy on ways
|
Scenario: Bike - Access tag hierachy on ways
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Bike - Squares and other areas
|
Feature: Bike - Squares and other areas
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
@square
|
@square
|
||||||
Scenario: Bike - Route along edge of a squares
|
Scenario: Bike - Route along edge of a squares
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Barriers
|
Feature: Barriers
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Barriers
|
Scenario: Bike - Barriers
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -3,7 +3,7 @@ Feature: Bike - Cycle tracks/lanes
|
|||||||
Reference: http://wiki.openstreetmap.org/wiki/Key:cycleway
|
Reference: http://wiki.openstreetmap.org/wiki/Key:cycleway
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Cycle tracks/lanes should enable biking
|
Scenario: Bike - Cycle tracks/lanes should enable biking
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Bike - Destination only, no passing through
|
Feature: Bike - Destination only, no passing through
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Destination only street
|
Scenario: Bike - Destination only street
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Bike - Handle ferry routes
|
Feature: Bike - Handle ferry routes
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Ferry route
|
Scenario: Bike - Ferry route
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Bike - Max speed restrictions
|
Feature: Bike - Max speed restrictions
|
||||||
|
|
||||||
Background: Use specific speeds
|
Background: Use specific speeds
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Respect maxspeeds when lower that way type speed
|
Scenario: Bike - Respect maxspeeds when lower that way type speed
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Bike - Street names in instructions
|
Feature: Bike - Street names in instructions
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - A named street
|
Scenario: Bike - A named street
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -3,7 +3,7 @@ Feature: Bike - Oneway streets
|
|||||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Simple oneway
|
Scenario: Bike - Simple oneway
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -4,7 +4,7 @@ Feature: Bike - Turn restrictions
|
|||||||
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
||||||
|
|
||||||
Background: Use car routing
|
Background: Use car routing
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
@no_turning
|
@no_turning
|
||||||
Scenario: Bike - No left turn
|
Scenario: Bike - No left turn
|
||||||
|
@ -4,7 +4,7 @@ Platforms and railway/bus lines are connected using a relation rather that a way
|
|||||||
http://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area
|
http://wiki.openstreetmap.org/wiki/Tag:public_transport%3Dstop_area
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Platforms tagged using public_transport
|
Scenario: Bike - Platforms tagged using public_transport
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -3,7 +3,7 @@ Feature: Bike - Handle ferry routes
|
|||||||
Bringing bikes on trains and subways
|
Bringing bikes on trains and subways
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Bringing bikes on trains
|
Scenario: Bike - Bringing bikes on trains
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
Feature: Bike - Accessability of different way types
|
Feature: Bike - Accessability of different way types
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
|
|
||||||
Scenario: Bike - Basic access
|
Scenario: Bike - Basic access
|
||||||
Bikes are allowed on footways etc because you can pull your bike at a lower speed.
|
Bikes are allowed on footways etc because you can pull your bike at a lower speed.
|
||||||
Given the speedprofile "bicycle"
|
Given the profile "bicycle"
|
||||||
Then routability should be
|
Then routability should be
|
||||||
| highway | forw |
|
| highway | forw |
|
||||||
| (nil) | |
|
| (nil) | |
|
||||||
|
@ -3,7 +3,7 @@ Feature: Car - Restricted access
|
|||||||
Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
Reference: http://wiki.openstreetmap.org/wiki/Key:access
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - Access tag hierachy on ways
|
Scenario: Car - Access tag hierachy on ways
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Car - Barriers
|
Feature: Car - Barriers
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - Barriers
|
Scenario: Car - Barriers
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Car - Destination only, no passing through
|
Feature: Car - Destination only, no passing through
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - Destination only street
|
Scenario: Car - Destination only street
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Car - Handle ferry routes
|
Feature: Car - Handle ferry routes
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - Use a ferry route
|
Scenario: Car - Use a ferry route
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Car - Max speed restrictions
|
Feature: Car - Max speed restrictions
|
||||||
|
|
||||||
Background: Use specific speeds
|
Background: Use specific speeds
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
Given a grid size of 1000 meters
|
Given a grid size of 1000 meters
|
||||||
|
|
||||||
Scenario: Car - Respect maxspeeds when lower that way type speed
|
Scenario: Car - Respect maxspeeds when lower that way type speed
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Car - Street names in instructions
|
Feature: Car - Street names in instructions
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - A named street
|
Scenario: Car - A named street
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -3,7 +3,7 @@ Feature: Car - Oneway streets
|
|||||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - Simple oneway
|
Scenario: Car - Simple oneway
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -4,7 +4,7 @@ Feature: Car - Turn restrictions
|
|||||||
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
||||||
|
|
||||||
Background: Use car routing
|
Background: Use car routing
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
@no_turning
|
@no_turning
|
||||||
Scenario: Car - No left turn
|
Scenario: Car - No left turn
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Car - Accessability of different way types
|
Feature: Car - Accessability of different way types
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "car"
|
Given the profile "car"
|
||||||
|
|
||||||
Scenario: Car - Basic access
|
Scenario: Car - Basic access
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -3,7 +3,7 @@ Feature: Foot - Oneway streets
|
|||||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "foot"
|
Given the profile "foot"
|
||||||
|
|
||||||
Scenario: Foot - Walking should not be affected by oneways
|
Scenario: Foot - Walking should not be affected by oneways
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Foot - Accessability of different way types
|
Feature: Foot - Accessability of different way types
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "foot"
|
Given the profile "foot"
|
||||||
|
|
||||||
Scenario: Foot - Basic access
|
Scenario: Foot - Basic access
|
||||||
Then routability should be
|
Then routability should be
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Weird routings discovered
|
Feature: Weird routings discovered
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Routing on a oneway roundabout
|
Scenario: Routing on a oneway roundabout
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Given /^the speedprofile "([^"]*)"$/ do |profile|
|
Given /^the profile "([^"]*)"$/ do |profile|
|
||||||
read_speedprofile profile
|
set_profile profile
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^a grid size of (\d+) meters$/ do |meters|
|
Given /^a grid size of (\d+) meters$/ do |meters|
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
When /^I preprocess data$/ do
|
|
||||||
begin
|
|
||||||
reprocess
|
|
||||||
rescue OSRMError => e
|
|
||||||
@process_error = e
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^preparing should return code (\d+)$/ do |code|
|
|
||||||
@process_error.class.should == OSRMError
|
|
||||||
@process_error.process.should == 'osrm-prepare'
|
|
||||||
@process_error.code.to_i.should == code.to_i
|
|
||||||
end
|
|
@ -1,74 +0,0 @@
|
|||||||
require 'OSM/StreamParser'
|
|
||||||
|
|
||||||
class OSMTestParserCallbacks < OSM::Callbacks
|
|
||||||
@@locations = nil
|
|
||||||
|
|
||||||
def self.locations
|
|
||||||
if @@locations
|
|
||||||
@@locations
|
|
||||||
else
|
|
||||||
#parse the test file, so we can later reference nodes and ways by name in tests
|
|
||||||
@@locations = {}
|
|
||||||
file = 'test/data/test.osm'
|
|
||||||
callbacks = OSMTestParserCallbacks.new
|
|
||||||
parser = OSM::StreamParser.new(:filename => file, :callbacks => callbacks)
|
|
||||||
parser.parse
|
|
||||||
puts @@locations
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def node(node)
|
|
||||||
@@locations[node.name] = [node.lat,node.lon]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
Given /^the OSM file contains$/ do |string|
|
|
||||||
file = 'data/test.osm'
|
|
||||||
File.open( file, 'w') {|f| f.write(string) }
|
|
||||||
|
|
||||||
#convert from .osm to .osm.pbf, which is the format osrm reads
|
|
||||||
system "osmosis --read-xml data/test.osm --write-pbf data/test.osm.pbf omitmetadata=true"
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^the speedprofile contains$/ do |string|
|
|
||||||
File.open( 'speedprofile.ini', 'w') {|f| f.write(string) }
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Given /^the data file "([^"]*)" is present$/ do |file|
|
|
||||||
File.exists?(file).should == true
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I run the extractor with "([^"]*)"$/ do |cmd|
|
|
||||||
@response = `#{cmd}`
|
|
||||||
#Dir.chdir @test_folder do
|
|
||||||
# @response = IO.popen([cmd, :err=>[:child, :out]]) { |ls_io| ls_result_with_error = ls_io.read }
|
|
||||||
#end
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I run the preprocessor with "([^"]*)"$/ do |cmd|
|
|
||||||
@response = `#{cmd}`
|
|
||||||
end
|
|
||||||
|
|
||||||
Given /^the preprocessed files for "([^"]*)" are present and up to date$/ do |area|
|
|
||||||
File.exists?("#{area}.osrm").should == true
|
|
||||||
File.exists?("#{area}.osrm.names").should == true
|
|
||||||
File.exists?("#{area}.osrm.restrictions").should == true
|
|
||||||
File.exists?("#{area}.osrm.hsgr").should == true
|
|
||||||
File.exists?("#{area}.osrm.nodes").should == true
|
|
||||||
File.exists?("#{area}.osrm.edges").should == true
|
|
||||||
File.exists?("#{area}.osrm.ramIndex").should == true
|
|
||||||
File.exists?("#{area}.osrm.fileIndex").should == true
|
|
||||||
File.exists?("#{area}.osrm.tiemstamp").should == true
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should see the file "([^"]*)"$/ do |file|
|
|
||||||
File.exists?(file).should == true
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^preprocessed files for "([^"]*)" has been removed$/ do |file|
|
|
||||||
FileUtils.rm_r Dir["#{file}.*"], :secure => true
|
|
||||||
end
|
|
||||||
|
|
@ -21,3 +21,25 @@ Then /^response should be well-formed$/ do
|
|||||||
@json['transactionId'].class.should == String
|
@json['transactionId'].class.should == String
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^response should be a well-formed route$/ do
|
||||||
|
step "response should be well-formed"
|
||||||
|
@json['status_message'].class.should == String
|
||||||
|
@json['route_summary'].class.should == Hash
|
||||||
|
@json['route_geometry'].class.should == String
|
||||||
|
@json['route_instructions'].class.should == Array
|
||||||
|
@json['via_points'].class.should == Array
|
||||||
|
end
|
||||||
|
|
||||||
|
When /^I preprocess data$/ do
|
||||||
|
begin
|
||||||
|
reprocess
|
||||||
|
rescue OSRMError => e
|
||||||
|
@process_error = e
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^preparing should return code (\d+)$/ do |code|
|
||||||
|
@process_error.class.should == OSRMError
|
||||||
|
@process_error.process.should == 'osrm-prepare'
|
||||||
|
@process_error.code.to_i.should == code.to_i
|
||||||
|
end
|
||||||
|
40
features/step_definitions/routability.rb
Normal file
40
features/step_definitions/routability.rb
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
Then /^routability should be$/ do |table|
|
||||||
|
build_ways_from_table table
|
||||||
|
reprocess
|
||||||
|
actual = []
|
||||||
|
if table.headers&["forw","backw","bothw"] == []
|
||||||
|
raise "*** routability tabel must contain either 'forw', 'backw' or 'bothw' column"
|
||||||
|
end
|
||||||
|
OSRMLauncher.new do
|
||||||
|
table.hashes.each_with_index do |row,i|
|
||||||
|
got = row.dup
|
||||||
|
attempts = []
|
||||||
|
['forw','backw','bothw'].each do |direction|
|
||||||
|
if table.headers.include? direction
|
||||||
|
if direction == 'forw' || direction == 'bothw'
|
||||||
|
response = request_route("#{ORIGIN[1]},#{ORIGIN[0]+(1+WAY_SPACING*i)*@zoom}","#{ORIGIN[1]},#{ORIGIN[0]+(3+WAY_SPACING*i)*@zoom}")
|
||||||
|
elsif direction == 'backw' || direction == 'bothw'
|
||||||
|
response = request_route("#{ORIGIN[1]},#{ORIGIN[0]+(3+WAY_SPACING*i)*@zoom}","#{ORIGIN[1]},#{ORIGIN[0]+(1+WAY_SPACING*i)*@zoom}")
|
||||||
|
end
|
||||||
|
got[direction] = route_status response
|
||||||
|
json = JSON.parse(response.body)
|
||||||
|
if got[direction].empty? == false
|
||||||
|
route = way_list json['route_instructions']
|
||||||
|
if route != "w#{i}"
|
||||||
|
got[direction] = "testing w#{i}, but got #{route}!?"
|
||||||
|
elsif row[direction] =~ /\d+s/
|
||||||
|
time = json['route_summary']['total_time']
|
||||||
|
got[direction] = "#{time}s"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if got[direction] != row[direction]
|
||||||
|
attempts << { :attempt => direction, :query => @query, :response => response }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
log_fail row,got,attempts if got != row
|
||||||
|
actual << got
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.routing_diff! actual
|
||||||
|
end
|
@ -1,179 +1,3 @@
|
|||||||
When /^I request a route from ([^"]+) to ([^"]+)$/ do |a,b|
|
|
||||||
@response = request_route a,b
|
|
||||||
#puts @response.body
|
|
||||||
#@response
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I request a route from "([^"]*)" to "([^"]*)"$/ do |a,b|
|
|
||||||
locations = OSMTestParserCallbacks.locations
|
|
||||||
raise "Locations hash is empty. To reference nodes by name, please preprocess the test file earlier in the test." unless locations
|
|
||||||
raise "Unknown node: #{a}" unless locations[a]
|
|
||||||
raise "Unknown node: #{b}" unless locations[b]
|
|
||||||
@response = request_route "#{locations[a][0]},#{locations[a][1]}", "#{locations[b][0]},#{locations[b][1]}"
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^response should be a well-formed route$/ do
|
|
||||||
step "response should be well-formed"
|
|
||||||
@json['status_message'].class.should == String
|
|
||||||
@json['route_summary'].class.should == Hash
|
|
||||||
@json['route_geometry'].class.should == String
|
|
||||||
@json['route_instructions'].class.should == Array
|
|
||||||
@json['via_points'].class.should == Array
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^a route should be found$/ do
|
|
||||||
@json['status'].should == 0
|
|
||||||
@json['status_message'].should == "Found route between points"
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^no route should be found$/ do
|
|
||||||
@json['status'].should == 207
|
|
||||||
@json['status_message'].should == "Cannot find route between points"
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should get a valid response$/ do
|
|
||||||
step "I should get a response"
|
|
||||||
step "response should be valid JSON"
|
|
||||||
step "response should be a well-formed route"
|
|
||||||
#step "no error should be reported in terminal"
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should get a route$/ do
|
|
||||||
step "I should get a valid response"
|
|
||||||
step "a route should be found"
|
|
||||||
#puts @response.body
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should not get a route$/ do
|
|
||||||
step "I should get a valid response"
|
|
||||||
step "no route should be found"
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should start at "([^']*)"$/ do |name|
|
|
||||||
@json['route_summary']['start_point'].should == name
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should end at "([^']*)"$/ do |name|
|
|
||||||
@json['route_summary']['end_point'].should == name
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^distance should be between (\d+) and (\d+)$/ do |min,max|
|
|
||||||
@json['route_summary']['total_distance'].to_i.should >= min.to_i
|
|
||||||
@json['route_summary']['total_distance'].to_i.should <= max.to_i
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the distance should be close to (\d+)m$/ do |d|
|
|
||||||
@json['route_summary']['total_distance'].to_i.should >= d.to_i*0.95
|
|
||||||
@json['route_summary']['total_distance'].to_i.should <= d.to_i/0.95
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^number of instructions should be (\d+)$/ do |n|
|
|
||||||
@json['route_instructions'].size.should == n
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^there should be 1 turn$/ do
|
|
||||||
step 'there should be 1 turns'
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^there should be (\d+) turns$/ do |n|
|
|
||||||
@json['route_instructions'].map {|t| t.first}.select {|t| t =~ /^Turn/ }.size.should == n.to_i
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^there should be more than (\d+) turn$/ do |n|
|
|
||||||
@json['route_instructions'].map {|t| t.first}.select {|t| t =~ /^Turn/ }.size.should > n.to_i
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^there should not be any turns$/ do
|
|
||||||
(@json['route_instructions'].size-1).should == 0
|
|
||||||
end
|
|
||||||
|
|
||||||
def sanitize_route route
|
|
||||||
route.split(',').map{|w| w.strip}.reject(&:empty?).join(', ')
|
|
||||||
end
|
|
||||||
|
|
||||||
def computed_route
|
|
||||||
@json['route_instructions'].map { |r| r[1] }.reject(&:empty?).join(', ')
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should follow "([^"]*)"$/ do |route|
|
|
||||||
sanitize_route(route).should == computed_route
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should not follow "([^"]*)"$/ do |route|
|
|
||||||
sanitize_route(route).should_not == computed_route
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should include "([^"]*)"$/ do |route|
|
|
||||||
sanitize_route(route).should =~ /#{computed_route}/
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should not include "([^"]*)"$/ do |route|
|
|
||||||
sanitize_route(route).should_not =~ /#{computed_route}/
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^the route should stay on "([^"]*)"$/ do |way|
|
|
||||||
step "the route should start at \"#{way}\""
|
|
||||||
step "the route should end at \"#{way}\""
|
|
||||||
step "the route should follow \"#{way}\""
|
|
||||||
step "there should not be any turns"
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I route between "([^"]*)" and "([^"]*)"$/ do |from,to|
|
|
||||||
reprocess
|
|
||||||
Dir.chdir 'test' do
|
|
||||||
from_node = name_node_hash[from]
|
|
||||||
to_node = name_node_hash[to]
|
|
||||||
a = "#{from_node.lon},#{from_node.lat}"
|
|
||||||
b = "#{to_node.lon},#{to_node.lat}"
|
|
||||||
@route = parse_response( request_route(a,b) )
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^"([^"]*)" should be returned$/ do |route|
|
|
||||||
@route.should == route.split(',').join(',')
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^routability should be$/ do |table|
|
|
||||||
build_ways_from_table table
|
|
||||||
reprocess
|
|
||||||
actual = []
|
|
||||||
if table.headers&["forw","backw","bothw"] == []
|
|
||||||
raise "*** routability tabel must contain either 'forw', 'backw' or 'bothw' column"
|
|
||||||
end
|
|
||||||
OSRMLauncher.new do
|
|
||||||
table.hashes.each_with_index do |row,i|
|
|
||||||
got = row.dup
|
|
||||||
attempts = []
|
|
||||||
['forw','backw','bothw'].each do |direction|
|
|
||||||
if table.headers.include? direction
|
|
||||||
if direction == 'forw' || direction == 'bothw'
|
|
||||||
response = request_route("#{ORIGIN[1]},#{ORIGIN[0]+(1+WAY_SPACING*i)*@zoom}","#{ORIGIN[1]},#{ORIGIN[0]+(3+WAY_SPACING*i)*@zoom}")
|
|
||||||
elsif direction == 'backw' || direction == 'bothw'
|
|
||||||
response = request_route("#{ORIGIN[1]},#{ORIGIN[0]+(3+WAY_SPACING*i)*@zoom}","#{ORIGIN[1]},#{ORIGIN[0]+(1+WAY_SPACING*i)*@zoom}")
|
|
||||||
end
|
|
||||||
got[direction] = route_status response
|
|
||||||
json = JSON.parse(response.body)
|
|
||||||
if got[direction].empty? == false
|
|
||||||
route = way_list json['route_instructions']
|
|
||||||
if route != "w#{i}"
|
|
||||||
got[direction] = "testing w#{i}, but got #{route}!?"
|
|
||||||
elsif row[direction] =~ /\d+s/
|
|
||||||
time = json['route_summary']['total_time']
|
|
||||||
got[direction] = "#{time}s"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if got[direction] != row[direction]
|
|
||||||
attempts << { :attempt => direction, :query => @query, :response => response }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
log_fail row,got,attempts if got != row
|
|
||||||
actual << got
|
|
||||||
end
|
|
||||||
end
|
|
||||||
table.routing_diff! actual
|
|
||||||
end
|
|
||||||
|
|
||||||
When /^I route I should get$/ do |table|
|
When /^I route I should get$/ do |table|
|
||||||
reprocess
|
reprocess
|
||||||
actual = []
|
actual = []
|
||||||
|
@ -1,10 +1,34 @@
|
|||||||
@stress @launch
|
@stress
|
||||||
Feature: Launching and shutting down
|
Feature: Launching and shutting down
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Repeated launch and shutdown
|
Scenario: Stress - 10km routing
|
||||||
|
#osrm-routed hangs very often
|
||||||
|
Given a grid size of 10000 meters
|
||||||
|
Given the node map
|
||||||
|
| h | a | b |
|
||||||
|
| g | x | c |
|
||||||
|
| f | e | d |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway |
|
||||||
|
| xa | primary |
|
||||||
|
| xb | primary |
|
||||||
|
| xc | primary |
|
||||||
|
| xd | primary |
|
||||||
|
| xe | primary |
|
||||||
|
| xf | primary |
|
||||||
|
| xg | primary |
|
||||||
|
| xh | primary |
|
||||||
|
|
||||||
|
When I route 100 times I should get
|
||||||
|
| from | to | route |
|
||||||
|
| x | h | xh |
|
||||||
|
|
||||||
|
Scenario: Stress - 10km routing
|
||||||
|
#osrm-routed hangs sometimes
|
||||||
Given a grid size of 10000 meters
|
Given a grid size of 10000 meters
|
||||||
Given the node map
|
Given the node map
|
||||||
| h | a | b |
|
| h | a | b |
|
||||||
@ -31,4 +55,4 @@ Feature: Launching and shutting down
|
|||||||
| x | e | xe |
|
| x | e | xe |
|
||||||
| x | f | xf |
|
| x | f | xf |
|
||||||
| x | g | xg |
|
| x | g | xg |
|
||||||
| x | h | xh |
|
| x | h | xh |
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
def speedprofile
|
def profile
|
||||||
@speedprofile ||= reset_speedprofile
|
@profile ||= reset_profile
|
||||||
end
|
end
|
||||||
|
|
||||||
def reset_speedprofile
|
def reset_profile
|
||||||
@speedprofile = nil
|
@profile = nil
|
||||||
read_speedprofile DEFAULT_SPEEDPROFILE
|
set_profile DEFAULT_SPEEDPROFILE
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_speedprofile profile
|
def set_profile profile
|
||||||
@speedprofile = profile
|
@profile = profile
|
||||||
end
|
end
|
||||||
|
|
||||||
def write_server_ini
|
def write_server_ini
|
||||||
|
@ -116,7 +116,7 @@ def reset_data
|
|||||||
#clear_log
|
#clear_log
|
||||||
#clear_data_files
|
#clear_data_files
|
||||||
end
|
end
|
||||||
reset_speedprofile
|
reset_profile
|
||||||
reset_osm
|
reset_osm
|
||||||
@fingerprint = nil
|
@fingerprint = nil
|
||||||
end
|
end
|
||||||
@ -131,10 +131,6 @@ def reset_osm
|
|||||||
name_way_hash.clear
|
name_way_hash.clear
|
||||||
@osm_str = nil
|
@osm_str = nil
|
||||||
@osm_hash = nil
|
@osm_hash = nil
|
||||||
|
|
||||||
##ID -1 causes trouble, so add a few nodes to avoid it
|
|
||||||
#node = OSM::Node.new nil, OSM_USER, OSM_TIMESTAMP, 0,0
|
|
||||||
#node = OSM::Node.new nil, OSM_USER, OSM_TIMESTAMP, 0,0
|
|
||||||
@osm_id = 0
|
@osm_id = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -180,7 +176,6 @@ def convert_osm_to_pbf
|
|||||||
unless File.exist?("#{@osm_file}.osm.pbf")
|
unless File.exist?("#{@osm_file}.osm.pbf")
|
||||||
log_preprocess_info
|
log_preprocess_info
|
||||||
log "== Converting #{@osm_file}.osm to protobuffer format...", :preprocess
|
log "== Converting #{@osm_file}.osm to protobuffer format...", :preprocess
|
||||||
#redirect stdout and stderr to a log file avoid output in the cucumber console
|
|
||||||
unless system "osmosis --read-xml #{@osm_file}.osm --write-pbf #{@osm_file}.osm.pbf omitmetadata=true 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE}"
|
unless system "osmosis --read-xml #{@osm_file}.osm --write-pbf #{@osm_file}.osm.pbf omitmetadata=true 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE}"
|
||||||
raise "Failed to convert to proto buffer format. Please see #{hash}.log for more info."
|
raise "Failed to convert to proto buffer format. Please see #{hash}.log for more info."
|
||||||
end
|
end
|
||||||
@ -210,7 +205,7 @@ def reprocess
|
|||||||
unless extracted?
|
unless extracted?
|
||||||
log_preprocess_info
|
log_preprocess_info
|
||||||
log "== Extracting #{@osm_file}.osm...", :preprocess
|
log "== Extracting #{@osm_file}.osm...", :preprocess
|
||||||
unless system "../osrm-extract #{@osm_file}.osm.pbf 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} ../profiles/#{@speedprofile}.lua"
|
unless system "../osrm-extract #{@osm_file}.osm.pbf 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} ../profiles/#{@profile}.lua"
|
||||||
log "*** Exited with code #{$?.exitstatus}.", :preprocess
|
log "*** Exited with code #{$?.exitstatus}.", :preprocess
|
||||||
raise OSRMError.new 'osrm-extract', $?.exitstatus, "*** osrm-extract exited with code #{$?.exitstatus}. The file preprocess.log might contain more info."
|
raise OSRMError.new 'osrm-extract', $?.exitstatus, "*** osrm-extract exited with code #{$?.exitstatus}. The file preprocess.log might contain more info."
|
||||||
end
|
end
|
||||||
@ -219,7 +214,7 @@ def reprocess
|
|||||||
unless prepared?
|
unless prepared?
|
||||||
log_preprocess_info
|
log_preprocess_info
|
||||||
log "== Preparing #{@osm_file}.osm...", :preprocess
|
log "== Preparing #{@osm_file}.osm...", :preprocess
|
||||||
unless system "../osrm-prepare #{@osm_file}.osrm #{@osm_file}.osrm.restrictions 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} ../profiles/#{@speedprofile}.lua"
|
unless system "../osrm-prepare #{@osm_file}.osrm #{@osm_file}.osrm.restrictions 1>>#{PREPROCESS_LOG_FILE} 2>>#{PREPROCESS_LOG_FILE} ../profiles/#{@profile}.lua"
|
||||||
log "*** Exited with code #{$?.exitstatus}.", :preprocess
|
log "*** Exited with code #{$?.exitstatus}.", :preprocess
|
||||||
raise OSRMError.new 'osrm-prepare', $?.exitstatus, "*** osrm-prepare exited with code #{$?.exitstatus}. The file preprocess.log might contain more info."
|
raise OSRMError.new 'osrm-prepare', $?.exitstatus, "*** osrm-prepare exited with code #{$?.exitstatus}. The file preprocess.log might contain more info."
|
||||||
end
|
end
|
||||||
|
@ -11,8 +11,8 @@ def hash_of_file path
|
|||||||
return hash.hexdigest
|
return hash.hexdigest
|
||||||
end
|
end
|
||||||
|
|
||||||
def speedprofile_hash
|
def profile_hash
|
||||||
@speedprofile_hash ||= hash_of_file "../profiles/#{@speedprofile}.lua"
|
@profile_hash ||= hash_of_file "../profiles/#{@profile}.lua"
|
||||||
end
|
end
|
||||||
|
|
||||||
def osm_hash
|
def osm_hash
|
||||||
@ -31,8 +31,8 @@ def bin_routed_hash
|
|||||||
@bin_routed_hash ||= hash_of_file '../osrm-routed'
|
@bin_routed_hash ||= hash_of_file '../osrm-routed'
|
||||||
end
|
end
|
||||||
|
|
||||||
#combine state of data, speedprofile and binaries into a hash that identifies the exact test scenario
|
#combine state of data, profile and binaries into a hash that identifies the exact test scenario
|
||||||
def fingerprint
|
def fingerprint
|
||||||
@fingerprint ||= Digest::SHA1.hexdigest "#{bin_extract_hash}-#{bin_prepare_hash}-#{bin_routed_hash}-#{speedprofile_hash}-#{osm_hash}"
|
@fingerprint ||= Digest::SHA1.hexdigest "#{bin_extract_hash}-#{bin_prepare_hash}-#{bin_routed_hash}-#{profile_hash}-#{osm_hash}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ def log_scenario_fail_info
|
|||||||
log "Failed scenario: #{@scenario_title}"
|
log "Failed scenario: #{@scenario_title}"
|
||||||
log "Time: #{@scenario_time}"
|
log "Time: #{@scenario_time}"
|
||||||
log "Fingerprint: #{@fingerprint}"
|
log "Fingerprint: #{@fingerprint}"
|
||||||
log "Profile: #{@speedprofile}"
|
log "Profile: #{@profile}"
|
||||||
log
|
log
|
||||||
log '```xml' #so output can be posted directly to github comment fields
|
log '```xml' #so output can be posted directly to github comment fields
|
||||||
log osm_str.strip
|
log osm_str.strip
|
||||||
@ -51,7 +51,7 @@ def log_preprocess_info
|
|||||||
log '```', :preprocess
|
log '```', :preprocess
|
||||||
log '', :preprocess
|
log '', :preprocess
|
||||||
log "== Profile:", :preprocess
|
log "== Profile:", :preprocess
|
||||||
log @speedprofile, :preprocess
|
log @profile, :preprocess
|
||||||
log '', :preprocess
|
log '', :preprocess
|
||||||
@has_logged_preprocess_info = true
|
@has_logged_preprocess_info = true
|
||||||
end
|
end
|
||||||
|
23
features/support/osm_parser.rb
Normal file
23
features/support/osm_parser.rb
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
require 'OSM/StreamParser'
|
||||||
|
|
||||||
|
class OSMTestParserCallbacks < OSM::Callbacks
|
||||||
|
@@locations = nil
|
||||||
|
|
||||||
|
def self.locations
|
||||||
|
if @@locations
|
||||||
|
@@locations
|
||||||
|
else
|
||||||
|
#parse the test file, so we can later reference nodes and ways by name in tests
|
||||||
|
@@locations = {}
|
||||||
|
file = 'test/data/test.osm'
|
||||||
|
callbacks = OSMTestParserCallbacks.new
|
||||||
|
parser = OSM::StreamParser.new(:filename => file, :callbacks => callbacks)
|
||||||
|
parser.parse
|
||||||
|
puts @@locations
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def node(node)
|
||||||
|
@@locations[node.name] = [node.lat,node.lon]
|
||||||
|
end
|
||||||
|
end
|
@ -1,17 +0,0 @@
|
|||||||
require 'net/http'
|
|
||||||
|
|
||||||
HOST = "http://localhost:#{OSRM_PORT}"
|
|
||||||
REQUEST_TIMEOUT = 1
|
|
||||||
|
|
||||||
def request_path path
|
|
||||||
@query = path
|
|
||||||
log path
|
|
||||||
uri = URI.parse "#{HOST}/#{path}"
|
|
||||||
Timeout.timeout(REQUEST_TIMEOUT) do
|
|
||||||
Net::HTTP.get_response uri
|
|
||||||
end
|
|
||||||
rescue Errno::ECONNREFUSED => e
|
|
||||||
raise "*** osrm-routed is not running."
|
|
||||||
rescue Timeout::Error
|
|
||||||
raise "*** osrm-routed did not respond."
|
|
||||||
end
|
|
@ -1,6 +1,23 @@
|
|||||||
|
require 'net/http'
|
||||||
|
|
||||||
|
HOST = "http://localhost:#{OSRM_PORT}"
|
||||||
|
REQUEST_TIMEOUT = 1
|
||||||
DESTINATION_REACHED = 15 #OSRM instruction code
|
DESTINATION_REACHED = 15 #OSRM instruction code
|
||||||
|
|
||||||
|
|
||||||
|
def request_path path
|
||||||
|
@query = path
|
||||||
|
log path
|
||||||
|
uri = URI.parse "#{HOST}/#{path}"
|
||||||
|
Timeout.timeout(REQUEST_TIMEOUT) do
|
||||||
|
Net::HTTP.get_response uri
|
||||||
|
end
|
||||||
|
rescue Errno::ECONNREFUSED => e
|
||||||
|
raise "*** osrm-routed is not running."
|
||||||
|
rescue Timeout::Error
|
||||||
|
raise "*** osrm-routed did not respond."
|
||||||
|
end
|
||||||
|
|
||||||
def request_route a,b
|
def request_route a,b
|
||||||
request_path "viaroute?loc=#{a}&loc=#{b}&output=json&instructions=true&alt=true"
|
request_path "viaroute?loc=#{a}&loc=#{b}&output=json&instructions=true&alt=true"
|
||||||
end
|
end
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Handle bad data in a graceful manner
|
Feature: Handle bad data in a graceful manner
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Empty dataset
|
Scenario: Empty dataset
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Basic Routing
|
Feature: Basic Routing
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
@smallest
|
@smallest
|
||||||
Scenario: A single way with two nodes
|
Scenario: A single way with two nodes
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Compass bearing
|
Feature: Compass bearing
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Bearing when going northwest
|
Scenario: Bearing when going northwest
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Distance calculation
|
Feature: Distance calculation
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: 100m distance
|
Scenario: 100m distance
|
||||||
Given a grid size of 100 meters
|
Given a grid size of 100 meters
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Testbot - Handle ferry routes
|
Feature: Testbot - Handle ferry routes
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Testbot - Ferry duration, single node
|
Scenario: Testbot - Ferry duration, single node
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Routing close to the [0,0] origin
|
Feature: Routing close to the [0,0] origin
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: East-west oneways close to the origin
|
Scenario: East-west oneways close to the origin
|
||||||
Given the node locations
|
Given the node locations
|
||||||
|
@ -3,7 +3,7 @@ Feature: Penalties
|
|||||||
Testbot uses a signal penalty of 7s.
|
Testbot uses a signal penalty of 7s.
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Traffic signals should incur a delay, without changing distance
|
Scenario: Traffic signals should incur a delay, without changing distance
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Snap start/end point to the nearest way
|
Feature: Snap start/end point to the nearest way
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Snap to nearest protruding oneway
|
Scenario: Snap to nearest protruding oneway
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -98,7 +98,6 @@ Feature: Snap start/end point to the nearest way
|
|||||||
| b | x | xb |
|
| b | x | xb |
|
||||||
| c | x | xc |
|
| c | x | xc |
|
||||||
|
|
||||||
@xx
|
|
||||||
Scenario: Find edges within 1km, but not 10km
|
Scenario: Find edges within 1km, but not 10km
|
||||||
Given a grid size of 1000 meters
|
Given a grid size of 1000 meters
|
||||||
Given the node map
|
Given the node map
|
||||||
@ -152,5 +151,4 @@ Feature: Snap start/end point to the nearest way
|
|||||||
| x | m | |
|
| x | m | |
|
||||||
| x | n | |
|
| x | n | |
|
||||||
| x | o | |
|
| x | o | |
|
||||||
| x | p | |
|
| x | p | |
|
||||||
|
|
@ -6,7 +6,7 @@ Secondary road: 18km/h = 18000m/3600s = 100m/20s
|
|||||||
Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
Tertiary road: 12km/h = 12000m/3600s = 100m/30s
|
||||||
|
|
||||||
Background: Use specific speeds
|
Background: Use specific speeds
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Basic travel time, 10m scale
|
Scenario: Basic travel time, 10m scale
|
||||||
Given a grid size of 10 meters
|
Given a grid size of 10 meters
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Turn directions/codes
|
Feature: Turn directions/codes
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Turn directions
|
Scenario: Turn directions
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Handling of UTF characters
|
Feature: Handling of UTF characters
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Streetnames with UTF characters
|
Scenario: Streetnames with UTF characters
|
||||||
Given the node map
|
Given the node map
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Feature: Choosing route based on length, speed, etc
|
Feature: Choosing route based on length, speed, etc
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
Given the speedprofile "testbot"
|
Given the profile "testbot"
|
||||||
|
|
||||||
Scenario: Pick the geometrically shortest route, way types being equal
|
Scenario: Pick the geometrically shortest route, way types being equal
|
||||||
Given the node map
|
Given the node map
|
||||||
|
Loading…
Reference in New Issue
Block a user