GithubHelp home page GithubHelp logo

dbrady / tourbus Goto Github PK

View Code? Open in Web Editor NEW
266.0 266.0 26.0 565 KB

Website load testing tool in Ruby, with the ability to "unload a busload of tourists" on a website, each with the ability to trace through complex application paths.

License: MIT License

Ruby 99.68% Shell 0.32%

tourbus's People

Contributors

bmabey avatar dbrady avatar jtanner avatar jtzemp avatar maxim-filimonov avatar metropolis-testman avatar neurogami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tourbus's Issues

Improve exception handling for not having a tourbus.yml file

Hi,

I very recently wrote my first tour to evaluate the tool. I wasn't using any variable substitution, so I didn't think a tourbus.yml file was necessary.

I ended up with the following stack trace:

I'm trying @bbozo's fork with 1.9.3-p392 and getting failures.

/Users/nathan/.rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': iconv will be deprecated in the future, use String#encode instead. /Users/nathan/.rbenv/versions/1.9.3-p392/lib/ruby/gems/1.9.1/gems/tourbus-2.0.2/bin/tourbus:8:in': undefined method symbolize_keys' for false:FalseClass (NoMethodError) from /Users/nathan/.rbenv/versions/1.9.3-p392/bin/tourbus:23:inload' from /Users/nathan/.rbenv/versions/1.9.3-p392/bin/tourbus:23:in `'

It was pointed out to me that not having a tourbus.yml would present that issue.

I propose rescuing that exception and reraising with a more descriptive error message.

Thanks!

Who tests the tester?

"There are no specs. Yikes! This is to my eternal shame because I’m sort of a testing freak. Because TourBus WAS a testing tool, I didn’t put tests on it. I haven’t put tests on it yet because I’m not sure how to go about it. Instead of exercising a web app with a test browser, we need to exercise a test browser with… um… a web app? (dbrady notes: Now that we have a contact_app, we could try writing some specs and features to run tourbus against it.)"

How to make it a valid tour?

Here is the code for the tourist.

class SimpleTest < Tourist

  def test_login
    # visit "#{@host}/users/sign_in"
    # visit "http://lvh.me:3000/users/sign_in"
    visit "http://facebook.com"

    assert_contain "entrance"
    fill_in "Email", :with => "[email protected]"
    fill_in "Password", :with => "secret"
    click_button "Enter"
    assert_contain "sachin"
    assert_match /\/dashboard/, current_page.url
  end
end

Now the funny part is, whether the local server is running or not, or even if I visit the facebook.com, it always runs and shows the report with nothing error. What is this?? Driving me insane lol??

○ tourbus -c 1 -n 1 simple_test                                                                                                                                                                         jruby-1.6.4
2011-08-29 00:29:40 TourBus: Starting 1 runs: 1x1 of simple_test
2011-08-29 00:29:40 TourBus: All Runners are ready -- STARTING!
2011-08-29 00:29:40 Runner #1: Ready to run Runner
2011-08-29 00:29:40 Runner #1: Starting Runner run 1/1
2011-08-29 00:29:40 Runner #1: Starting run 1/1 of Tourist simple_test
2011-08-29 00:29:40 Runner #1: Finished run 1/1 of Tourist simple_test
2011-08-29 00:29:40 Runner #1: Finished Runner run 1/1
2011-08-29 00:29:40 Runner #1: Finished all Runner tourists.
2011-08-29 00:29:40 TourBus: Runner Finished!
2011-08-29 00:29:40 TourBus: Runner finished in 0.010 seconds
2011-08-29 00:29:40 TourBus: Runner Finished! runs,passes,fails,errors: 1,1,0,0
2011-08-29 00:29:40 TourBus: Benchmark for runner 1:   0.009000   0.000000   0.009000 (  0.009000)
2011-08-29 00:29:40 TourBus: Initializing 1 Runners...
2011-08-29 00:29:40 TourBus: --------------------------------------------------------------------------------
2011-08-29 00:29:40 TourBus: 1 runs: 1x1 of simple_test
2011-08-29 00:29:40 TourBus: All Runners finished.
2011-08-29 00:29:40 TourBus: Total Tourists: 1
2011-08-29 00:29:40 TourBus: Total Tests: 1
2011-08-29 00:29:40 TourBus: Total Passes: 1
2011-08-29 00:29:40 TourBus: Total Fails: 0
2011-08-29 00:29:40 TourBus: Total Errors: 0
2011-08-29 00:29:40 TourBus: Elapsed Time: 0.0230000019073486
2011-08-29 00:29:40 TourBus: Speed: 43.478 tours/sec
2011-08-29 00:29:40 TourBus: --------------------------------------------------------------------------------

Support tours with a plural name.

"If you give a tour a name that is pluralized, it won’t work. This is probably a bug worth fixing. The reason for it is that we take file names and “classify” them, and e.g. “ranking_reports” becomes “RankingReport”, not “RankingReports”. This is an artifact of borrowing from Rails’ activesupport libs and should probably be fixed."

Javascript support

"@miah_ For me the biggest stumbling block has been javascript support. I think that would bring TB into the 20-teens decade."

Undefined method `sub' on Ruby 1.9.2-p290

I've only been able to get tourbus to run on 1.8.7. When I try to run the tours on 1.9.2 I get the following error:

/Users/evan/.rvm/gems/ruby-1.9.2-p290@tourbus/gems/tourbus-2.0.1/lib/tourist.rb:79:in `block in tours': undefined method `sub' for :tour_projects:Symbol (NoMethodError)

Here is my project_test.rb file:

class ProjectTest < Tourist
  def tour_projects
    visit "http://localhost:3000/projects"
    assert_contain 'Listing projects'
  end
end

Ruby 1.9 / 2.0 support

"Ruby 1.8 and 2.0 have diverged so much that our britches have finally ripped. As of this writing (2013-03-18) I (dbrady) can get TourBus to build on 1.8.7 but not on ruby 1.9 or ruby 2.0. I think in the Very Near Future (which is hopefully much sooner than Real Soon Now) that Tourbus will go Ruby2-only and I’ll bump the version to 3.0 to keep people using 2.x from breaking hard."

bad URI(is not URI?)

Hi David,

I'm trying to use tourbus for some performance testing but am running into the following error :

2013-02-10 23:39:42 Runner #1: bad URI(is not URI?): %257B:url=%253E%2522http://localhost:3000/%2522,%2520:headers=%253Enil%257D

My tourist class is as follows:

class Simple < Tourist
def tour_home
visit "http://localhost:3000"
assert_contain "Log In"
end
end

If this is a config error on my side I apologize, I'm working on sanding down my n00b edges!

Thanks,

Scott

Websickle -> Webrat

"I’d like to remove WebSickle and replace it with Webrat. There is a webrat branch on the main fork (github.com/dbrady/tourbus) that is 90% complete. Once that’s done we can start massaging the API to be a little more friendly. [done (but now that it is, it needs a refactoring–Tour should probably inherit from Webrat::Mechanize, not delegate to it.)]"

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.