Code Monkey home page Code Monkey logo

smurfs_v2's Introduction

Smurfs_v2

Smurfs v2 using Nightmare_v2 API to load test your webpages

##Why use Atom/Electron instead of Phantomjs:

  1. nightmare v1 wrappers phantomjs to make user friendly API to make synchronous instead of using callbacks
  2. nightmare v2 use atom/electron to improve the speed and footprint with the same APIs: V2 Proposal

##Precondition:

  • install node on your test machine
  • npm install --save nightmare
  • npm install --save vo
  • install ruby(v2.2.3 from my side tested), add them to PATH
  • gem install concurrent-ruby
  • gem install concurrent-ruby-edge
  • gem install concurrent-ruby-ext (optional, for perf improvement on MRI)
  • gem install rufus-scheduler (optional)
  • gem install poseidon (optional, for kafka client)
  • gem install sinatra (optional, create web server to forward kafka messages)

##How to use (Tested on Mac OS X 10.10):

  • ruby smurfs.rb -u 3 -l 10 -d 20 -g homepage -f ./test_script/pagetest.js

####Notice:

  • First option [-u 3]: 3 Concurrent users
  • Second option [-l 10 optional]: Execute 10 loops by each user
  • Third option [-d 20 optional]: Test duration timed out value
  • Fouth option [-g group optional]: Test Group Name
  • Fifth option [-f ./xxx/x.js]: Test script you want to exec

or you can test your script by using node cmd:

  • node --harmony test_script/pagetest.js

##If you still want to use Phantomjs to test your single pages:
Checkout my Smurfs_v1, it uses native phantomjs scripts to load tests your website: Smurfs V1 Project

smurfs_v2's People

Contributors

joychester avatar

Stargazers

Fred Xue avatar

Watchers

 avatar James Cloos avatar Fred Xue avatar

Forkers

fredxue

smurfs_v2's Issues

[Task] Scale the Tests

We need to support scale the tests across different hosts and send the perf data into data pipeline

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.