Skip to content

Instantly share code, notes, and snippets.

@goncalossilva
Created July 3, 2010 00:12
Show Gist options
  • Save goncalossilva/462120 to your computer and use it in GitHub Desktop.
Save goncalossilva/462120 to your computer and use it in GitHub Desktop.
Test applications live under ci/benchmark/* (and ignored with .gitignore)
1. rails generate benchmarking_data
2. rails generate benchmarking_routes (depends on 1. for PUT/DELETE)
3. rails generate benchmarking_ci (runs 1. and 2.)
4. rake benchmark
1.
- Checks if test/fixtures/rails_benchmarking_ci/data/* was not already automatically generated
- Generates fake data automatically and stores it in test/fixtures/rails_benchmarking_ci/data/*
- YAML output format is the usual
2.
- Checks if test/fixtures/rails_benchmarking_ci/routes/* was not already automatically generated
- Generates fake data automatically and stores it in test/fixtures/rails_benchmarking_ci/routes/*
- YAML output format:
"get:
url: localhost:3000/tests/1
post:
url: localhost:3000/tests/new
param1: confirm
param2: deny
put:
url: localhost:3000/tests/2
param1: deny
param2: confirm
delete:
url: localhost:3000/tests/1"
4.
- Can accept an argument for which application to test (redmine, etc)
- Clones the application(s) if they are not already under ci/benchmark/*
- Generates dummy data/routes if they haven't been already generated
- Loads the dummy data
- Benchmarks all test routes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment