Giter Club home page Giter Club logo

stella's Introduction

Stella - 0.7 PREVIEW

Blame Stella for breaking your web applications.

Features

  • Realistic load simulation

  • Sophisticated response handling (with automatic HTML document parsing)

  • Dynamic variable replacement

PREVIEW NOTICE

This is an early preview of Stella. The following features are still under development (as of 2009-09-15):

  • Reporting of any kind.

  • File uploads.

  • Documentation.

Usage Example

# Verify a test plan is defined correctly
# by running a single user functional test.
$ stella verify -p examples/basic/plan.rb http://stellaaahhhh.com/

# Generate load using the same test plan. 
$ stella generate -p examples/basic/plan.rb -c 50 http://stellaaahhhh.com/

Test Plan Example

Test plans are defined in the Ruby programming language. This makes it possible to define sophisticated logic to handle responses. They also typically contain more than one usecase which is important when simulating realistic load. In this example, 65% of virtual users will execute the first usecase and 35% will execute the second.

usecase 65, "Simple search" do

  get "/", "Homepage" do
    wait 1..5
    response 200 do
      status                       # => 200
      headers['Content-Type']      # => ['text/html']
      body                         # => <html>...
      doc                          # => Nokigiri::HTML::Document
    end
  end

  get "/search", "Search Results" do
    wait 2..5
    param :what  => 'Sarsaparilla'
    param :where => 'Lexington'
    response 200 do
      listing = doc.css('div.listing').first
      set :lid, listing['id'].match(/(\d+)/)[0]
    end
  end

  get "/listing/:lid" do           # URIs can contain variables.
    desc "Selected listing"        # This one will be replaced by
    wait 1..8                      # the one stored in the previous
  end                              # request.

end

usecase 35, "YAML API" do

  resource :listing_ids, list('ids.csv')

  get "/listing/:lid.yaml" do
    desc "Select listing"
    param :lid => random(:listing_ids)
    response 200 do
      repeat 5
    end
  end

end

See examples/ for more.

Installation

Get it in one of the following ways:

$ gem install stella 
$ git clone git://github.com/solutious/stella.git
$ gem install solutious-stella --source http://gems.github.com

More Information

Credits

Thanks

  • Harm Aarts for the great test case and feedback!

  • Kalin Harvey for keeping me on track.

  • Dave L, the best intern money can’t buy.

  • Peter McCurdy for the feedback and bug fixes.

License

See LICENSE.txt

stella's People

Contributors

delano avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.