README.rdoc in bret-watircraft-0.4.2 vs README.rdoc in bret-watircraft-0.4.3
- old
+ new
@@ -12,11 +12,14 @@
== FEATURES
* Generates a directory structure for your test suite with one command.
* Provides page adapters you can customize for your application.
* Configure application URL and browser type (IE, Firefox) in one location.
-* Framework automatically initializes browser for testing.
+* Uses templates to create tests and libraries.
+* Automatically initializes browser for testing.
+* Provides the glue to ensure your tests can find your libraries. Don't
+ write another "require" statement again.
== APPROACH
WatirCraft is an object-oriented testing framework that helps you create
class libraries to support the tests for your application. On their own,
@@ -28,22 +31,114 @@
more features to the WatirCraft framework, your test suite will automatically
get the benefit.
== INSTALL
- gem update --system
- gem install watircraft
+Run the following if you haven't already:
+ > gem update --system
+ > gem sources -a http://gems.github.com
+
+Install the gem:
+
+ > gem install bret-watircraft
+
+See the History.txt file for detailed notes on the contents of each release.
+
+== GETTING STARTED
+
+Use the +watircraft+ command to create your project. Your project will contain
+your tests, your libraries, your configuration files, and all the glue code
+necessary to allow it all to work together. Let's create a project for
+testing Google.
+
+ > watircraft google
+
+This will create a directory called "google" and populate it with a bunch of
+directories and files.
+
+You'll need to edit the <tt>config\environments.yml</tt> file to point to you base
+url of your project.
+
+ test:
+ url: http://google.com
+
+By default, your tests will run in the "test" environment, but you can specify
+additional environments later. When you run your tests, you can specify which environment
+to use on the command line.
+
+Use the <tt>script\generate</tt> command to populate your project with project files.
+This command must be run from the top of your project.
+
+ > cd google
+
+Create a test. WatirCraft uses the RSpec test harness and therefore calls a
+test a "spec".
+
+ > script\generate spec search
+
+This creates a bare template for a test. Edit the file that was just created
+(<tt>test/specs/search_spec.rb</tt>) and add the following
+lines.
+
+ browser.text_field(:name, 'q').set 'WatirCraft'
+ browser.button(:name, 'btnG').click
+ browser.text.should include('Test automation for web applications')
+
+The WatirCraft framework will automatically start the browser at the
+configured url when you run it.
+
+After you have added these lines to the template, the complete file will
+look like this.
+
+ $LOAD_PATH.unshift File.dirname(__FILE__) unless
+ $LOAD_PATH.include? File.dirname(__FILE__)
+ require 'spec_helper'
+
+ describe "Search" do
+
+ it "should find WatirCraft" do
+ browser.text_field(:name, 'q').set 'WatirCraft'
+ browser.button(:name, 'btnG').click
+ browser.text.should include('Test automation for web applications')
+ end
+
+ end
+
+Use the +rake+ command to run the tests for your project(only one so far).
+This needs to be run from the base of your project.
+
+ > rake spec
+
+By default, your test runs with Internet Explorer, but you can also run it
+with Firefox.
+
+ > rake spec BROWSER=firefox
+
+You can also just run individual files.
+
+ > ruby test/specs/search_spec.rb
+
+Note that many editors will do this automatically for you. For example the
+Scite editor will do this when you hit "F5".
+
== EXAMPLE
An example test suite for this framework can be found in the framework
-examples project on github. Look in the watircraft directory.
-* http://github.com/bret/framework-examples/
+examples project on github. Look in the +watircraft+ directory.
+* http://github.com/bret/framework-examples
-== ORIGIN
+== QUESTIONS AND FEEDBACK
-WatirCraft is based on the Taza framework.
-* http://github.com/scudco/taza/wikis
+Join our mailing list for WatirCraft users.
+* http://tech.groups.yahoo.com/group/watir-framework
+
+The WatirCraft framework is developed by WatirCraft LLC, based on Taza[http://github.com/scudco/taza/wikis].
+Please send bug reports, feature requests and other comments to us at feedback@watircraft.com[mailto:feedback@watircraft.com]
+
+WatirCraft LLC provides training and consulting for Watir, Ruby and the
+WatirCraft framework.
+* http://www.watircraft.com
== LICENSE
(The MIT License)