Sha256: 416fa89f07b76b6120f1d26a0ef0c3b22245156efb5776d4b0ccdf986db351bd

Contents?: true

Size: 1.44 KB

Versions: 17

Compression:

Stored size: 1.44 KB

Contents

# Stella Test Plan - Dynamic Data (2009-11-28)
#
#
# 1. START THE EXAMPLE APPLICATION
# 
# This test plan is written to work with the
# example application that ships with Stella. 
# See:
#
# $ stella example
#
#
# 2. RUN THE TEST PLAN
#
# $ stella verify -p examples/dynamic/plan.rb http://127.0.0.1:3114/
# 
# $ stella generate -c 2 -r 2 -p examples/dynamic/plan.rb http://127.0.0.1:3114/
#
usecase "Dynamic Data" do
  
  # Specify HTTP Authentication (Basic or Digest). 
  # Specify a username, password, and optional value
  # to use for the authentication domain. If no domain
  # is specifed, the root URI will be used. 
  #auth :user, :password, 'http://domain/'
  
  # Retrieve a list of listings and store
  # them in a resource called listing_ids.
  get '/listings.yaml', "Get Listings" do
    response 200 do
      listings = doc.collect! { |l|; l[:id]; }
      set :listing_ids, listings[0..2]
    end
  end
  
  # Access each listing page in the order
  get "/listing/:lid.yaml", "Sequential" do
    param :lid => sequential(:listing_ids)
    response 200 do
      repeat 5
    end
  end
  
  # Access each listing page in reverse order
  get "/listing/:lid.yaml", "Reverse Sequential" do
    param :lid => rsequential(:listing_ids)
    response 200 do
      repeat 5
    end
  end
 
  # Access listing pages in random order
  get "/listing/:lid.yaml", "Random" do
    param :lid => random(:listing_ids)
    response 200 do
      repeat 5
    end
  end
   
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
stella-0.8.7.003 examples/dynamic/plan.rb
stella-0.8.7.002 examples/dynamic/plan.rb
stella-0.8.7.001 examples/dynamic/plan.rb
stella-0.8.6.002 examples/dynamic/plan.rb
stella-0.8.6.001 examples/dynamic/plan.rb
stella-0.8.5.002 examples/dynamic/plan.rb
stella-0.8.5.001 examples/dynamic/plan.rb
stella-0.8.4.001 examples/dynamic/plan.rb
stella-0.8.3.002 examples/dynamic/plan.rb
stella-0.8.3.001 examples/dynamic/plan.rb
stella-0.8.2.003 examples/dynamic/plan.rb
stella-0.8.2.002 examples/dynamic/plan.rb
stella-0.8.2.001 examples/dynamic/plan.rb
stella-0.8.1.002 examples/dynamic/plan.rb
stella-0.8.1.001 examples/dynamic/plan.rb
stella-0.8.0.001 examples/dynamic/plan.rb
stella-0.8.0.000 examples/dynamic/plan.rb