Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

thoughtbot/assert_performs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assert Performs

This is a single Test::Unit assertion written to test performance of a Rails action. Meant to be run on staging before production deploys.

Usage

class PerformanceTest < Test::Unit::TestCase
  self.performance_server = "staging.example.com"
  context "a GET to users/1" do
    should "be performant" do
      assert_performs :get, user_path, :rate        => 3,
                                       :timeout     => 5
                                       :id          => 1  # extra params
    end
  end
end

assert_performs takes the following arguments:

  • an HTTP verb

  • a path

  • a threshold request rate (req/s)

  • a timeout (in seconds)

    assert_performs :get, '/', :rate => 3, :timeout => 5

Requirements

  • httperf
  • web server

About

Easily add performance sanity checks using Test::Unit and a web server.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages