Overview

Smokegraphy is a simple http access testing framework. That deploies test specific fixtures at setup, and remove them at teardown, and test must be executed with real http access. If you setup auto-deploying to use ftp, you can test not only localhost but also remote server. With Smokegraphy's test, you can find out miss configurations and/or network problems. Of course, Smokegraphy is useful to test webapps.

This is compatible with only ruby-1.8, now.

Install

$ gem install smokegraphy

Quick Start

Execute smokegraphy command as below. Then, directory 'simple-test' is created, and some teplates will be wrote.

$ smokegraphy new simple_test basic
$ cd simple_test

Edit config.yaml, some path, http host name, and deploy method.

Then exec runner script.

 $ ./runner.rb

Writing a Test

Below is simplest code.

  class TestBasic < Smokegraphy::TestCase
    def test_index_html
        simple_test
    end
  end

simple_test method will access to server/base_path/index.html, then checks status code and response body.

simple_test { |res| assert_equals(“text/html”, res) }

File Layout

Smokegraphy test should be placed as bellow

testdir / tests    / test_basic.rb
        | source   / basic / **.html
        | expected / basic / **.html.result