You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2013/03/08 17:16:50 UTC

svn commit: r1454446 - in /deltacloud/trunk/site: content/ output/

Author: marios
Date: Fri Mar  8 16:16:50 2013
New Revision: 1454446

URL: http://svn.apache.org/r1454446
Log:
SITE: Improvements Add white box unit test description.

  This commit is for the content changes only, not the output
  It adds the section "Validate contributions using the white box tests"
  to the "Contribute/How Can I Contribute?" link.

  It includes:
    A description of the test source layout.
    How to run he tests
    Why one may need to update the VCR fixtures?
    An example of updating the VCR fixtures.
TrackedAt: http://tracker.deltacloud.org/patch/f70075cdbbf849ef47c4b708e29e87cc95bca8fd

Added:
    deltacloud/trunk/site/content/running-the-white-box-tests.md
    deltacloud/trunk/site/content/update-vcr-test-fixtures-data-example.md
    deltacloud/trunk/site/content/white-box-tests-layout.md
    deltacloud/trunk/site/content/white-box-tests.md
    deltacloud/trunk/site/content/why-update-vcr-test-fixtures-data.md
    deltacloud/trunk/site/output/running-the-white-box-tests.html
      - copied, changed from r1453723, deltacloud/trunk/site/output/how-to-contribute.html
    deltacloud/trunk/site/output/update-vcr-test-fixtures-data-example.html
      - copied, changed from r1453723, deltacloud/trunk/site/output/how-to-contribute.html
    deltacloud/trunk/site/output/white-box-tests-layout.html
      - copied, changed from r1453723, deltacloud/trunk/site/output/how-to-contribute.html
    deltacloud/trunk/site/output/white-box-tests.html
      - copied, changed from r1453723, deltacloud/trunk/site/output/how-to-contribute.html
    deltacloud/trunk/site/output/why-update-vcr-test-fixtures-data.html
      - copied, changed from r1453723, deltacloud/trunk/site/output/how-to-contribute.html
Modified:
    deltacloud/trunk/site/content/how-to-contribute.md
    deltacloud/trunk/site/output/how-to-contribute.html

Modified: deltacloud/trunk/site/content/how-to-contribute.md
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/content/how-to-contribute.md?rev=1454446&r1=1454445&r2=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/content/how-to-contribute.md (original)
+++ deltacloud/trunk/site/content/how-to-contribute.md Fri Mar  8 16:16:50 2013
@@ -5,7 +5,7 @@ title: How Can I Contribute?
 <br/>
 
 <h3 id="contribute">Contribute to Deltacloud</h3>
-Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="/contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. 
+Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="/contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project.
 
 <h4 id="how">How can I contribute?</h4>
 
@@ -26,6 +26,9 @@ Deltacloud project is a free open source
   <li>
     <a href="#documentation">Write documentation</a>
   </li>
+  <li>
+    <a href="/white-box-tests.html">Validate contributions using the white box tests</a>
+  </li>
 </ul>
 
 <br/>

Added: deltacloud/trunk/site/content/running-the-white-box-tests.md
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/content/running-the-white-box-tests.md?rev=1454446&view=auto
==============================================================================
--- deltacloud/trunk/site/content/running-the-white-box-tests.md (added)
+++ deltacloud/trunk/site/content/running-the-white-box-tests.md Fri Mar  8 16:16:50 2013
@@ -0,0 +1,63 @@
+---
+site_name: Deltacloud API
+title: Running the Whitebox Tests
+---
+
+<br/>
+
+<ul class="breadcrumb">
+  <li>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Running The White Box Tests</li>
+</ul>
+
+<h3>Running the white box tests</h3>
+
+<p>The tests can be executed in groups, using tasks in the Rakefile, or
+   individually.</p>
+
+<ul>
+  <li>
+    <p>Examples using rake tasks to executed groups of tests.</p>
+  </li>
+
+  <ul>
+    <li>
+      <p>Rake task to run <b><u><i>all</i></u></b> the tests: </p>
+      <pre>
+      % cd <b>REPO</b>/deltacloud/server
+      % rake test                 # Run all tests
+      </pre>
+    </li>
+
+    <li>
+      <p>Rake task to run the various <b><u><i>Frontend </i></u></b> tests: </p>
+      <pre>
+      % cd <b>REPO</b>/deltacloud/server
+      % rake test:base            # Run tests for base
+      % rake test:cimi:models     # Run tests for models
+      % rake test:ec2             # Run tests for ec2
+      </pre>
+    </li>
+
+    <li>
+      <p>Rake task to run the various <b><u><i>Driver </i></u></b>  tests: </p>
+      <pre>
+      % cd <b>REPO</b>/deltacloud/server
+      % rake test:drivers:ec2     # Run tests for ec2
+      % rake test:drivers:mock    # Run tests for mock
+      % rake test:drivers:rhevm   # Run tests for rhevm
+      </pre>
+     </li>
+  </ul>
+
+  <li>
+    <p>Example manually running an <b><u><i>individual</i></u></b> test: </p>
+    <pre>
+    % cd <b>REPO</b>/deltacloud/server
+    % bundle exec ruby tests/drivers/ec2/realms_test.rb
+    </pre>
+  </li>
+
+</ul>

Added: deltacloud/trunk/site/content/update-vcr-test-fixtures-data-example.md
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/content/update-vcr-test-fixtures-data-example.md?rev=1454446&view=auto
==============================================================================
--- deltacloud/trunk/site/content/update-vcr-test-fixtures-data-example.md (added)
+++ deltacloud/trunk/site/content/update-vcr-test-fixtures-data-example.md Fri Mar  8 16:16:50 2013
@@ -0,0 +1,185 @@
+---
+site_name: Deltacloud API
+title: Updating VCR Fixtures Example
+---
+
+<br/>
+
+<ul class="breadcrumb">
+  <li>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Updating VCR Fixtures Example</li>
+</ul>
+
+<h3>An Example of Re-recording the VCR test fixtures.</h3>
+
+<p>
+Below is an example of recording new fixtures for the test:
+<i><u><b>server/tests/drivers/rhevm/instance_test.rb</b></u></i>
+tests.
+</p>
+
+<p>
+More information can be found on the past recording of the
+<a href="http://youtu.be/zTCGRDO_3dU">Deltacloud Community Call #12</a>
+</p>
+
+
+<ol>
+  <li>
+    <p> Create ${HOME}/.deltacloud/config</p>
+
+    <pre>
+    rhevm:
+      user:     'admin@internal'
+      password: 'localpassword'
+      provider: 'https://16.1.1.3/api;b9bb11c2-f397-4f41-a57b-7ac15a894779'
+    mock:
+      user: mockuser
+      password: mockpassword
+      provider: compute
+  </li>
+
+  <li>
+    <p>Modify the test source to have the realm, instance, image & provider
+       for a live cloud provider.</p>
+
+    <pre>
+    % vim server/tests/drivers/rhevm/instance_test.rb
+    ...
+    TST_REALM    = '12345678-123a-123b-123c-123456789abc'
+    TST_INSTANCE = '23456781-23a1-23b1-23c1-23456789abce'
+    TST_IMAGE    = '34567812-3a12-3b12-3c12-3456789abcef'
+    ...
+        @driver = Deltacloud::Test::config.driver(:rhevm,
+          provider="https://16.1.1.3/api;b9bb11c2-f397-4f41-a57b-7ac15a894779")
+    </pre>
+
+  </li>
+
+  <li>
+    <p>Set the VCR record mode to :record => :all</p>
+
+    <pre>
+    % vim server/tests/drivers/rhevm/common.rb
+    ...
+    # Set :record to :all, when re-recording and between re-record attemps
+    # be sure to clear fixtures/*.yml files which can be done with "git checkout".
+    # e.g.:
+    c.default_cassette_options = { :record => :all }
+    # c.default_cassette_options = { :record => :none }
+    ...
+    </pre>
+
+  </li>
+
+
+  <li>
+    <p>Run the test in record mode</p>
+
+    <pre>
+    % cd YOUR-REPO/deltacloud/server
+
+    # Record only the single test
+    % ruby tests/drivers/rhevm/instance_test.rb
+
+    or
+
+    # Record the drivers:rhevm tests:
+    % rake test:drivers:rhevm
+
+    or
+
+    # Record all the tests:
+    % rake test
+    </pre>
+
+  </li>
+
+  <li>
+    <p>Remove the user:password creds from the fixture.</p>
+
+    <p>
+    The recorded fixture will contain live creds. For security reasons
+    it is best to either change the credentials on the cloud provider or
+    remove them from the fixture YAML file. Removing them from the fixture
+    YAML file can easily be accomplished using sed.
+    </p>
+
+    <pre>
+    e.g.:
+    for i in $(ls tests/drivers/rhevm/fixtures/test_0*.yml); do \
+      echo $i; \
+      cat $i | sed s/admin%40internal:localpassword/fakeuser:fakepassword/ > $i.new; \
+      mv $i.new $i; \
+    done
+    </pre>
+
+  </li>
+
+  <li>
+    <p>Remove ${HOME}/.deltacloud/config</p>
+
+    <p>
+    This is done to avoid using the credentials from the config file
+    during non-recording test runs.
+    </p>
+
+    <pre>
+    e.g.: (note it might be best to save it in ".ORIG" for future re-recordings.)
+    mv ${HOME}/.deltacloud/config ${HOME}/.deltacloud/config.ORIG
+    </pre>
+  </li>
+
+  <li>
+    <p>Turn off record mode.
+
+    <p>To turn off record mode set the record mode to { :record => :none }</p>
+
+    <pre>
+    % vim server/tests/drivers/rhevm/common.rb
+    ...
+    # Set :record to :all, when re-recording and between re-record attemps
+    # be sure to clear fixtures/*.yml files which can be done with "git checkout".
+    # e.g.:
+    # c.default_cassette_options = { :record => :all }
+    c.default_cassette_options = { :record => :none }
+    ...
+    </pre>
+
+  </li>
+
+  <li>
+    <p>Remove trailing white space from the fixtures YAML files.</p>
+
+    <p>
+    Recording can place trailing white space in the fixtures YAML files
+    which can be removed or ignored.
+    </p>
+
+    <p>There are many ways to accomplish this.</p>
+  </li>
+
+  <li>
+    <p>Confirm all tests run in mock mode</p>
+
+    <pre>
+    % cd <REPO>/deltacloud/server
+
+    # Run only the single tests that had been re-recorded
+    % ruby tests/drivers/rhevm/instance_test.rb
+
+      and
+
+    # Run all tests in that section:
+    % rake test:drivers:rhevm
+
+      and
+
+    # Record all the tests:
+    % rake test
+    </pre>
+  </li>
+
+</ol>

Added: deltacloud/trunk/site/content/white-box-tests-layout.md
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/content/white-box-tests-layout.md?rev=1454446&view=auto
==============================================================================
--- deltacloud/trunk/site/content/white-box-tests-layout.md (added)
+++ deltacloud/trunk/site/content/white-box-tests-layout.md Fri Mar  8 16:16:50 2013
@@ -0,0 +1,141 @@
+---
+site_name: Deltacloud API
+title:  White Box Tests Source Description
+---
+
+<br/>
+
+<ul class="breadcrumb">
+  <li>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">White Box Tests Source Description</li>
+</ul>
+
+<h3>Where Are The White Box Tests:</h3>
+
+<p>The following depicts where in the deltacloud directory source structure the
+white box tests are located:</p>
+<div class="row">
+  <div class="span1"></div>
+  <div class="span10 offset1">
+<pre>
+deltacloud
+|-----------------------------------------------------------------------------
+|-d--> server
+  |---------------------------------------------------------------------------
+  |-d-->tests               Contains unit tests for drivers
+  |---------------------------------------------------------------------------
+    |-d-->cimi              Contains Frontend CIMI tests
+    |-------------------------------------------------------------------------
+    |-d-->deltacloud        Contains Frontend deltacloud tests
+    |-------------------------------------------------------------------------
+    |-d-->ec2               Contains Frontend ec2 tests
+    |-------------------------------------------------------------------------
+    |-d-->drivers           Contains Backend driver gem tests
+    |-------------------------------------------------------------------------
+      |-d-->base
+      |-d-->ec2
+      |-d-->fgcp
+      |-d-->gogrid
+      |-d-->google          Contains the varios driver tests
+      |-d-->mock                and
+      |-d-->models          VCR YAML fixtures
+      |-d-->openstack
+      |-d-->rhevm
+    |-------------------------------------------------------------------------
+    |-d-->helpers           Contains helper code common to multiple tests
+    |-------------------------------------------------------------------------
+    |-f-->test_helper.rb    Contains the common test helper routes
+    |-------------------------------------------------------------------------
+</pre>
+
+  </div>
+</div>
+
+<br/>
+
+<h3>Driver tests</h3>
+
+<u><b>REPO</b>/deltacloud/server/tests/drivers</u>
+
+<br/>
+
+<p>
+This directory provides all the <i><b>driver</b></i> tests. Each driver tests is
+placed into a separate directory with the driver name.  Everything that touchs
+the driver API goes here as well. It is good practice to divide the tests into
+logical collections, in this case driver methods.
+</p>
+
+<p>
+Driver tests use the Deltacloud::new method to create new instance of a driver.
+This method is usually called in a <i>before</i> block and takes two parameters:
+<i>driver name</i> and <i>credentials</i>. The driver methods can be called
+directly on the instance of Deltacloud::new.
+</p>
+
+<p>
+Some driver tests may use the <a href="https://github.com/vcr/vcr">VCR</a> gem
+to record and then mock the real communication with the backend server. The fixtures
+are maintained in the <i>tests/drivers/<b>DRIVER</b>/fixtures</i> directory.
+</p>
+
+<p>
+For more informations about recording, look at the file: <i>tests/drivers/ec2/common.rb</i>,
+<a href="why-update-vcr-test-fixtures-data.html">Why Updating the VCR Fixtures</a>
+and <a href="update-vcr-test-fixtures-data-example.html">Updating VCR Fixtures Example</a>
+</p>
+
+<h3>Test Helpers</h3>
+
+<u><b>REPO</b>/deltacloud/server/tests/helpers</u>
+
+<br/>
+
+<p>
+The <i>base</i> directory contain tests for Deltacloud::Driver class and the Library
+class.
+</p>
+
+<h3>Frontend tests</h3>
+
+<p>
+In addition to the default <i>deltacloud</i> frontend Deltacloud may also
+operate using different frontends. In this case, instead of exposing the
+DC API specification to the client, Deltacloud will provide its drivers
+API through different frontends (like CIMI or Amazon EC2).
+</p>
+
+<p>
+Some tests might use the Mock driver to call the <i>control</i> blocks in Rabbit
+collections.  These tests are <b>not</b> driver tests, they just use the mock
+driver to make sure the Rabbit operation <i>control blocks</i> works as expected
+and they provide expected output.
+</p>
+
+<u><b>REPO</b>/deltacloud/server/tests/deltacloud</u>
+
+<p>
+This directory provides tests for Deltacloud API frontend. It contains tests
+for collections that this frontend provides and also tests helpers that this
+frontend use.
+</p>
+
+<u><b>REPO</b>/deltacloud/server/tests/ec2</u>
+
+<p>
+This directory provides tests for the EC2 frontend. Tests make sure that mapping
+between EC2 actions and Deltacloud driver API works correctly. All tests
+relevant to EC2 frontend tests should go here. **NOTE** this directory does not
+provide Amazon EC2 driver tests.
+</p>
+
+<u><b>REPO</b>/deltacloud/server/tests/cimi</u>
+
+<p>
+This directory provides tests for the CIMI frotend. They make sure that
+JSON/XML serialization of the CIMI models works correctly. Also there are tests
+to make sure the output provided by CIMI collections is correct.
+</p>
+

Added: deltacloud/trunk/site/content/white-box-tests.md
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/content/white-box-tests.md?rev=1454446&view=auto
==============================================================================
--- deltacloud/trunk/site/content/white-box-tests.md (added)
+++ deltacloud/trunk/site/content/white-box-tests.md Fri Mar  8 16:16:50 2013
@@ -0,0 +1,55 @@
+---
+site_name: Deltacloud API
+title: White Box Tests
+---
+
+<br/>
+
+<ul class="breadcrumb">
+  <li>
+    <a href="/how-to-contribute.html#how">How to contribute?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Validate Contributions Using the White Box Tests</li>
+</ul>
+
+<h3>Validate Contributions Using the White Box Tests</h3>
+
+<p>
+Deltacloud contains automated API tests, that are driven using pre-recorded
+<a href="https://github.com/vcr/vcr">VCR</a> YAML files called <i>fixtures</i>.
+The test source and fixtures are maintained in the deltacloud source tree
+under: <i><b>REPO/deltacloud/server/tests</i>
+</p>
+
+<p>
+In some cases it might be necessarey to re-record the VCR fixtures for
+particular tests. For example, this could become necessarey, if new
+functionality or a bug fix alters the exchange with the backend cloud
+provider.
+</p>
+
+<p>
+The process for updating the test data involves exercising the tests against a live
+cloud provider and recording the live API exchange into the VCR fixtures YAML files.
+After which the tests can more quickly and easily be run using the recorded VCR
+fixtures without the need to accessess a live cloud provider.
+</p>
+
+<h4 id="how">Dealing With the White Box Test</h4>
+
+<ul class="nav nav-list">
+  <li class="nav-header"></li>
+  <li>
+    <a href="/white-box-tests-layout.html">White Box Tests Source Description</a>
+  </li>
+  <li>
+    <a href="/running-the-white-box-tests.html">Running The White Box Tests</a>
+  </li>
+  <li>
+    <a href="/why-update-vcr-test-fixtures-data.html">Why Update The VCR Fixtures?</a>
+  </li>
+  <li>
+    <a href="/update-vcr-test-fixtures-data-example.html">Updating VCR Fixtures Example</a>
+  </li>
+</ul>
+

Added: deltacloud/trunk/site/content/why-update-vcr-test-fixtures-data.md
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/content/why-update-vcr-test-fixtures-data.md?rev=1454446&view=auto
==============================================================================
--- deltacloud/trunk/site/content/why-update-vcr-test-fixtures-data.md (added)
+++ deltacloud/trunk/site/content/why-update-vcr-test-fixtures-data.md Fri Mar  8 16:16:50 2013
@@ -0,0 +1,109 @@
+---
+site_name: Deltacloud API
+title: Why Update The VCR Fixtures
+---
+
+<br/>
+
+<ul class="breadcrumb">
+  <li>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Why Update The VCR Fixtures</li>
+</ul>
+
+<p>
+Deltacloud uses pre-recorded <a href="https://github.com/vcr/vcr">VCR</a> YAML
+files called <i>fixtures</i> to allow test execution without the need for a live
+cloud provider.
+</p>
+
+<p>
+The <i>fixtures</i> YAML files are located under:
+<u><b>REPO</b>/deltacloud/server/tests/drivers/<i>driver name</i>/fixtures</u>
+</p>
+
+<p>
+A live cloud provider, with valid credentials, needs to be used in order to
+<a href="https://www.relishapp.com/vcr/vcr/v/1-6-0/docs/record-modes">record</a>
+the fixtures YAML files but once recorded the tests can then be executed without
+a live cloud provider.
+</p>
+
+<p>
+Because valid credentials are used to record the VCR fixtures data care must be
+taken to either alter the credentials on the live cloud provider or remove them
+from the fixtures data after doing the recording.
+More on how to do this can be found in
+<a href="update-vcr-test-fixtures-data-example.html">Updating VCR Fixtures Example</a>
+</p>
+
+<h3>Why VCR data May Need Updating:</h3>
+
+<p>
+In some cases you will need to re-record the VCR fixtures for particular test.
+This happen when a request is made to the backend cloud provider that a
+test does not yet exercise. <b>For Example:</b>
+</p>
+
+<ul>
+  <li>
+    <p>
+    A bug is fixed in the EC2 driver, where <i>images()</i> method had not work properly.
+    </p>
+    <ol>
+      <li>
+        <p>Open <i>tests/drivers/ec2/images_tests.rb</i></p>
+      </li>
+      <li>
+        <p>Add a new test to capture this bug.</p>
+        <p>At the end of this file and add a the new code:</p>
+        <pre>
+        it 'should provide correct output' do
+          # assertions go here
+        end
+        </pre>
+      </li>
+    </ol>
+  </li>
+
+  <li>
+    <p>
+    Scenario: You added new collection <i>oranges()</i> into RHEV-M driver.
+    </p>
+    <ol>
+      <li>
+        <p>Write all driver methods tests here: <i>tests/drivers/rhevm/oranges_tests.rb</i></p>
+      </li>
+      <li>
+        <p>Create <i>tests/deltacloud/collections/oranges_collection_tests.rb</i></p>
+      </li>
+      <li>
+        <p>Write all collection operations tests here ^^</p>
+      </li>
+    </ol>
+  </li>
+
+  <li>
+    <p>
+    A bug is fixed in the Deltacloud frontend where <i>/api/images/123/create</i>
+    operation does not provide correct status code. You corrected it.
+    </p>
+    <ol>
+      <li>
+        <p>Open 'tests/deltacloud/collections/images_collection_test.rb'</p>
+      </li>
+      <li>
+        <p>Locate this line: </p>
+          <pre>
+          it 'allow to create and destroy the new image' do</p>
+          </pre>
+      </li>
+      <li>
+        <p>Provide the correct value into 'status.must_equal' method</p>
+      </li>
+    </ol>
+  </li>
+
+</ul>
+

Modified: deltacloud/trunk/site/output/how-to-contribute.html
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/output/how-to-contribute.html?rev=1454446&r1=1454445&r2=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/output/how-to-contribute.html (original)
+++ deltacloud/trunk/site/output/how-to-contribute.html Fri Mar  8 16:16:50 2013
@@ -98,7 +98,7 @@
       <p><br></p>
 
 <h3 id="contribute">Contribute to Deltacloud</h3>
-<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. </p>
+<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project.</p>
 
 <h4 id="how">How can I contribute?</h4>
 
@@ -120,6 +120,9 @@
   <li>
     <a href="#documentation">Write documentation</a>
   </li>
+  <li>
+    <a href="white-box-tests.html">Validate contributions using the white box tests</a>
+  </li>
 </ul><p><br></p>
 
 <h3>Overview of the Deltacloud directory structure</h3>

Copied: deltacloud/trunk/site/output/running-the-white-box-tests.html (from r1453723, deltacloud/trunk/site/output/how-to-contribute.html)
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/output/running-the-white-box-tests.html?p2=deltacloud/trunk/site/output/running-the-white-box-tests.html&p1=deltacloud/trunk/site/output/how-to-contribute.html&r1=1453723&r2=1454446&rev=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/output/how-to-contribute.html (original)
+++ deltacloud/trunk/site/output/running-the-white-box-tests.html Fri Mar  8 16:16:50 2013
@@ -2,7 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>How Can I Contribute?</title>
+    <title>Running the Whitebox Tests</title>
     <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
     <!--[if lt IE 9]>
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@@ -97,88 +97,59 @@
 
       <p><br></p>
 
-<h3 id="contribute">Contribute to Deltacloud</h3>
-<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. </p>
+<ul class="breadcrumb">
+<li>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Running The White Box Tests</li>
+</ul><h3>Running the white box tests</h3>
 
-<h4 id="how">How can I contribute?</h4>
+<p>The tests can be executed in groups, using tasks in the Rakefile, or
+   individually.</p>
 
-<ul class="nav nav-list">
-<li class="nav-header">
-  </li>
+<ul>
 <li>
-    <a href="send-patch.html">Send a patch</a>
-  </li>
-  <li>
-    <a href="write-new-driver.html">Write a provider driver</a>
-  </li>
-  <li>
-    <a href="#bug">Report a bug</a>
+    <p>Examples using rake tasks to executed groups of tests.</p>
   </li>
-  <li>
-    <a href="#idea">Propose an idea</a>
-  </li>
-  <li>
-    <a href="#documentation">Write documentation</a>
-  </li>
-</ul><p><br></p>
-
-<h3>Overview of the Deltacloud directory structure</h3>
-
-<p>The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:</p>
-
-<div class="row">
-  <div class="span1"></div>
-  <div class="span10 offset1">
-<pre>
-deltacloud
-|-----------------------------------------------------------------------------------
-|-d--&gt;tests                           Contains Cucumber tests
-|-----------------------------------------------------------------------------------
-|-d--&gt;site                            Files for this website
-|-----------------------------------------------------------------------------------
-|-d--&gt;client                          Contains the Deltacloud ruby client
-|-----------------------------------------------------------------------------------
-|-d--&gt;clients                         Contains other Deltacloud clients (e.g. java)
-|-----------------------------------------------------------------------------------
-|-d--&gt; server
-       |----------------------------------------------------------------------------
-       |-d--&gt;bin                      Contains the Deltacloud executable deltacloudd
-       |----------------------------------------------------------------------------
-       |-d--&gt;views                    Contains haml views for each collection
-       |----------------------------------------------------------------------------
-       |-d--&gt;tests                    Contains unit tests for drivers
-       |----------------------------------------------------------------------------
-       |-d--&gt;lib
-             |----------------------------------------------------------------------
-             |-d--&gt;sinatra            Contains rabbit DSL and various helpers
-             |----------------------------------------------------------------------
-             |-d--&gt;deltacloud
-                   |----------------------------------------------------------------
-                   |-d--&gt;models       Definition of each collection model
-                   |----------------------------------------------------------------
-                   |-d--&gt;drivers      Contains the drivers for each cloud provider
-                   |----------------------------------------------------------------
-                   |-d--&gt;helpers      Various helper methods used by the drivers
-                   |----------------------------------------------------------------
-                   |-d--&gt;base_driver  Contains the Deltacloud base driver
-                   |----------------------------------------------------------------
-                   |-f--&gt;server.rb                Contains the sinatra routes
-                   |----------------------------------------------------------------
-</pre>
-
-  </div>
-</div>
-
-<p><br></p>
 
-<h3 id="bug">Reporting a bug</h3>
-<p>We track bugs in <a href="https://issues.apache.org/jira/browse/DTACLOUD">Apache JIRA</a>. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, <a href="https://issues.apache.org/jira/secure/CreateIssue!default.jspa">report it</a>.</p>
-
-<h3 id="idea">Proposing an idea</h3>
-<p>Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our <a href="http://teambox.com/projects/deltacloud">Teambox</a> page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.</p>
+  <ul>
+<li>
+      <p>Rake task to run <b><u><i>all</i></u></b> the tests: </p>
+      <pre>
+      % cd <b>REPO</b>/deltacloud/server
+      % rake test                 # Run all tests
+      </pre>
+    </li>
+
+    <li>
+      <p>Rake task to run the various <b><u><i>Frontend </i></u></b> tests: </p>
+      <pre>
+      % cd <b>REPO</b>/deltacloud/server
+      % rake test:base            # Run tests for base
+      % rake test:cimi:models     # Run tests for models
+      % rake test:ec2             # Run tests for ec2
+      </pre>
+    </li>
+
+    <li>
+      <p>Rake task to run the various <b><u><i>Driver </i></u></b>  tests: </p>
+      <pre>
+      % cd <b>REPO</b>/deltacloud/server
+      % rake test:drivers:ec2     # Run tests for ec2
+      % rake test:drivers:mock    # Run tests for mock
+      % rake test:drivers:rhevm   # Run tests for rhevm
+      </pre>
+     </li>
+  </ul>
+<li>
+    <p>Example manually running an <b><u><i>individual</i></u></b> test: </p>
+    <pre>
+    % cd <b>REPO</b>/deltacloud/server
+    % bundle exec ruby tests/drivers/ec2/realms_test.rb
+    </pre>
+  </li>
 
-<h3 id="documentation">Writing documentation</h3>
-<p>You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, don’t hesitate to do it and <a href="http://mail-archives.apache.org/mod_mbox/deltacloud-dev/">send us</a> your contribution. We really appreciate your help.</p>
+</ul>
 
       <footer class="footer">
         <p class="pull-right"><span class='icon-circle-arrow-up'>&nbsp;</span><a href="#">Back to top</a></p>

Copied: deltacloud/trunk/site/output/update-vcr-test-fixtures-data-example.html (from r1453723, deltacloud/trunk/site/output/how-to-contribute.html)
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/output/update-vcr-test-fixtures-data-example.html?p2=deltacloud/trunk/site/output/update-vcr-test-fixtures-data-example.html&p1=deltacloud/trunk/site/output/how-to-contribute.html&r1=1453723&r2=1454446&rev=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/output/how-to-contribute.html (original)
+++ deltacloud/trunk/site/output/update-vcr-test-fixtures-data-example.html Fri Mar  8 16:16:50 2013
@@ -2,7 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>How Can I Contribute?</title>
+    <title>Updating VCR Fixtures Example</title>
     <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
     <!--[if lt IE 9]>
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@@ -97,88 +97,188 @@
 
       <p><br></p>
 
-<h3 id="contribute">Contribute to Deltacloud</h3>
-<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. </p>
+<ul class="breadcrumb">
+<li>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Updating VCR Fixtures Example</li>
+</ul><h3>An Example of Re-recording the VCR test fixtures.</h3>
 
-<h4 id="how">How can I contribute?</h4>
+<p>
+Below is an example of recording new fixtures for the test:
+<i><u><b>server/tests/drivers/rhevm/instance_test.rb</b></u></i>
+tests.
+</p>
+
+<p>
+More information can be found on the past recording of the
+<a href="http://youtu.be/zTCGRDO_3dU">Deltacloud Community Call #12</a>
+</p>
 
-<ul class="nav nav-list">
-<li class="nav-header">
-  </li>
+<ol>
+<li>
+    <p> Create ${HOME}/.deltacloud/config</p>
+
+    <pre>
+    rhevm:
+      user:     'admin@internal'
+      password: 'localpassword'
+      provider: 'https://16.1.1.3/api;b9bb11c2-f397-4f41-a57b-7ac15a894779'
+    mock:
+      user: mockuser
+      password: mockpassword
+      provider: compute
+  
+
+  </pre>
+</li>
 <li>
-    <a href="send-patch.html">Send a patch</a>
+    <p>Modify the test source to have the realm, instance, image &amp; provider
+       for a live cloud provider.</p>
+
+    <pre>
+    % vim server/tests/drivers/rhevm/instance_test.rb
+    ...
+    TST_REALM    = '12345678-123a-123b-123c-123456789abc'
+    TST_INSTANCE = '23456781-23a1-23b1-23c1-23456789abce'
+    TST_IMAGE    = '34567812-3a12-3b12-3c12-3456789abcef'
+    ...
+        @driver = Deltacloud::Test::config.driver(:rhevm,
+          provider="https://16.1.1.3/api;b9bb11c2-f397-4f41-a57b-7ac15a894779")
+    </pre>
+
+  </li>
+
+  <li>
+    <p>Set the VCR record mode to :record =&gt; :all</p>
+
+    <pre>
+    % vim server/tests/drivers/rhevm/common.rb
+    ...
+    # Set :record to :all, when re-recording and between re-record attemps
+    # be sure to clear fixtures/*.yml files which can be done with "git checkout".
+    # e.g.:
+    c.default_cassette_options = { :record =&gt; :all }
+    # c.default_cassette_options = { :record =&gt; :none }
+    ...
+    </pre>
+
+  </li>
+
+
+  <li>
+    <p>Run the test in record mode</p>
+
+    <pre>
+    % cd YOUR-REPO/deltacloud/server
+
+    # Record only the single test
+    % ruby tests/drivers/rhevm/instance_test.rb
+
+    or
+
+    # Record the drivers:rhevm tests:
+    % rake test:drivers:rhevm
+
+    or
+
+    # Record all the tests:
+    % rake test
+    </pre>
+
   </li>
+
   <li>
-    <a href="write-new-driver.html">Write a provider driver</a>
+    <p>Remove the user:password creds from the fixture.</p>
+
+    <p>
+    The recorded fixture will contain live creds. For security reasons
+    it is best to either change the credentials on the cloud provider or
+    remove them from the fixture YAML file. Removing them from the fixture
+    YAML file can easily be accomplished using sed.
+    </p>
+
+    <pre>
+    e.g.:
+    for i in $(ls tests/drivers/rhevm/fixtures/test_0*.yml); do \
+      echo $i; \
+      cat $i | sed s/admin%40internal:localpassword/fakeuser:fakepassword/ &gt; $i.new; \
+      mv $i.new $i; \
+    done
+    </pre>
+
   </li>
+
   <li>
-    <a href="#bug">Report a bug</a>
+    <p>Remove ${HOME}/.deltacloud/config</p>
+
+    <p>
+    This is done to avoid using the credentials from the config file
+    during non-recording test runs.
+    </p>
+
+    <pre>
+    e.g.: (note it might be best to save it in ".ORIG" for future re-recordings.)
+    mv ${HOME}/.deltacloud/config ${HOME}/.deltacloud/config.ORIG
+    </pre>
   </li>
+
   <li>
-    <a href="#idea">Propose an idea</a>
-  </li>
-  <li>
-    <a href="#documentation">Write documentation</a>
-  </li>
-</ul><p><br></p>
-
-<h3>Overview of the Deltacloud directory structure</h3>
-
-<p>The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:</p>
-
-<div class="row">
-  <div class="span1"></div>
-  <div class="span10 offset1">
-<pre>
-deltacloud
-|-----------------------------------------------------------------------------------
-|-d--&gt;tests                           Contains Cucumber tests
-|-----------------------------------------------------------------------------------
-|-d--&gt;site                            Files for this website
-|-----------------------------------------------------------------------------------
-|-d--&gt;client                          Contains the Deltacloud ruby client
-|-----------------------------------------------------------------------------------
-|-d--&gt;clients                         Contains other Deltacloud clients (e.g. java)
-|-----------------------------------------------------------------------------------
-|-d--&gt; server
-       |----------------------------------------------------------------------------
-       |-d--&gt;bin                      Contains the Deltacloud executable deltacloudd
-       |----------------------------------------------------------------------------
-       |-d--&gt;views                    Contains haml views for each collection
-       |----------------------------------------------------------------------------
-       |-d--&gt;tests                    Contains unit tests for drivers
-       |----------------------------------------------------------------------------
-       |-d--&gt;lib
-             |----------------------------------------------------------------------
-             |-d--&gt;sinatra            Contains rabbit DSL and various helpers
-             |----------------------------------------------------------------------
-             |-d--&gt;deltacloud
-                   |----------------------------------------------------------------
-                   |-d--&gt;models       Definition of each collection model
-                   |----------------------------------------------------------------
-                   |-d--&gt;drivers      Contains the drivers for each cloud provider
-                   |----------------------------------------------------------------
-                   |-d--&gt;helpers      Various helper methods used by the drivers
-                   |----------------------------------------------------------------
-                   |-d--&gt;base_driver  Contains the Deltacloud base driver
-                   |----------------------------------------------------------------
-                   |-f--&gt;server.rb                Contains the sinatra routes
-                   |----------------------------------------------------------------
-</pre>
-
-  </div>
-</div>
-
-<p><br></p>
+    <p>Turn off record mode.
+
+    </p>
+<p>To turn off record mode set the record mode to { :record =&gt; :none }</p>
+
+    <pre>
+    % vim server/tests/drivers/rhevm/common.rb
+    ...
+    # Set :record to :all, when re-recording and between re-record attemps
+    # be sure to clear fixtures/*.yml files which can be done with "git checkout".
+    # e.g.:
+    # c.default_cassette_options = { :record =&gt; :all }
+    c.default_cassette_options = { :record =&gt; :none }
+    ...
+    </pre>
+
+  
+
+  </li>
+<li>
+    <p>Remove trailing white space from the fixtures YAML files.</p>
+
+    <p>
+    Recording can place trailing white space in the fixtures YAML files
+    which can be removed or ignored.
+    </p>
+
+    <p>There are many ways to accomplish this.</p>
+  </li>
+
+  <li>
+    <p>Confirm all tests run in mock mode</p>
+
+    <pre>
+    % cd <repo>/deltacloud/server
+
+    # Run only the single tests that had been re-recorded
+    % ruby tests/drivers/rhevm/instance_test.rb
+
+      and
+
+    # Run all tests in that section:
+    % rake test:drivers:rhevm
+
+      and
 
-<h3 id="bug">Reporting a bug</h3>
-<p>We track bugs in <a href="https://issues.apache.org/jira/browse/DTACLOUD">Apache JIRA</a>. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, <a href="https://issues.apache.org/jira/secure/CreateIssue!default.jspa">report it</a>.</p>
+    # Record all the tests:
+    % rake test
+    
+  
 
-<h3 id="idea">Proposing an idea</h3>
-<p>Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our <a href="http://teambox.com/projects/deltacloud">Teambox</a> page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.</p>
 
-<h3 id="documentation">Writing documentation</h3>
-<p>You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, don’t hesitate to do it and <a href="http://mail-archives.apache.org/mod_mbox/deltacloud-dev/">send us</a> your contribution. We really appreciate your help.</p>
+</repo></pre>
+</li>
+</ol>
 
       <footer class="footer">
         <p class="pull-right"><span class='icon-circle-arrow-up'>&nbsp;</span><a href="#">Back to top</a></p>

Copied: deltacloud/trunk/site/output/white-box-tests-layout.html (from r1453723, deltacloud/trunk/site/output/how-to-contribute.html)
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/output/white-box-tests-layout.html?p2=deltacloud/trunk/site/output/white-box-tests-layout.html&p1=deltacloud/trunk/site/output/how-to-contribute.html&r1=1453723&r2=1454446&rev=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/output/how-to-contribute.html (original)
+++ deltacloud/trunk/site/output/white-box-tests-layout.html Fri Mar  8 16:16:50 2013
@@ -2,7 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>How Can I Contribute?</title>
+    <title>White Box Tests Source Description</title>
     <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
     <!--[if lt IE 9]>
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@@ -97,73 +97,47 @@
 
       <p><br></p>
 
-<h3 id="contribute">Contribute to Deltacloud</h3>
-<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. </p>
-
-<h4 id="how">How can I contribute?</h4>
-
-<ul class="nav nav-list">
-<li class="nav-header">
-  </li>
+<ul class="breadcrumb">
 <li>
-    <a href="send-patch.html">Send a patch</a>
-  </li>
-  <li>
-    <a href="write-new-driver.html">Write a provider driver</a>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
   </li>
-  <li>
-    <a href="#bug">Report a bug</a>
-  </li>
-  <li>
-    <a href="#idea">Propose an idea</a>
-  </li>
-  <li>
-    <a href="#documentation">Write documentation</a>
-  </li>
-</ul><p><br></p>
-
-<h3>Overview of the Deltacloud directory structure</h3>
-
-<p>The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:</p>
+  <li class="active">White Box Tests Source Description</li>
+</ul><h3>Where Are The White Box Tests:</h3>
 
+<p>The following depicts where in the deltacloud directory source structure the
+white box tests are located:</p>
 <div class="row">
   <div class="span1"></div>
   <div class="span10 offset1">
 <pre>
 deltacloud
-|-----------------------------------------------------------------------------------
-|-d--&gt;tests                           Contains Cucumber tests
-|-----------------------------------------------------------------------------------
-|-d--&gt;site                            Files for this website
-|-----------------------------------------------------------------------------------
-|-d--&gt;client                          Contains the Deltacloud ruby client
-|-----------------------------------------------------------------------------------
-|-d--&gt;clients                         Contains other Deltacloud clients (e.g. java)
-|-----------------------------------------------------------------------------------
+|-----------------------------------------------------------------------------
 |-d--&gt; server
-       |----------------------------------------------------------------------------
-       |-d--&gt;bin                      Contains the Deltacloud executable deltacloudd
-       |----------------------------------------------------------------------------
-       |-d--&gt;views                    Contains haml views for each collection
-       |----------------------------------------------------------------------------
-       |-d--&gt;tests                    Contains unit tests for drivers
-       |----------------------------------------------------------------------------
-       |-d--&gt;lib
-             |----------------------------------------------------------------------
-             |-d--&gt;sinatra            Contains rabbit DSL and various helpers
-             |----------------------------------------------------------------------
-             |-d--&gt;deltacloud
-                   |----------------------------------------------------------------
-                   |-d--&gt;models       Definition of each collection model
-                   |----------------------------------------------------------------
-                   |-d--&gt;drivers      Contains the drivers for each cloud provider
-                   |----------------------------------------------------------------
-                   |-d--&gt;helpers      Various helper methods used by the drivers
-                   |----------------------------------------------------------------
-                   |-d--&gt;base_driver  Contains the Deltacloud base driver
-                   |----------------------------------------------------------------
-                   |-f--&gt;server.rb                Contains the sinatra routes
-                   |----------------------------------------------------------------
+  |---------------------------------------------------------------------------
+  |-d--&gt;tests               Contains unit tests for drivers
+  |---------------------------------------------------------------------------
+    |-d--&gt;cimi              Contains Frontend CIMI tests
+    |-------------------------------------------------------------------------
+    |-d--&gt;deltacloud        Contains Frontend deltacloud tests
+    |-------------------------------------------------------------------------
+    |-d--&gt;ec2               Contains Frontend ec2 tests
+    |-------------------------------------------------------------------------
+    |-d--&gt;drivers           Contains Backend driver gem tests
+    |-------------------------------------------------------------------------
+      |-d--&gt;base
+      |-d--&gt;ec2
+      |-d--&gt;fgcp
+      |-d--&gt;gogrid
+      |-d--&gt;google          Contains the varios driver tests
+      |-d--&gt;mock                and
+      |-d--&gt;models          VCR YAML fixtures
+      |-d--&gt;openstack
+      |-d--&gt;rhevm
+    |-------------------------------------------------------------------------
+    |-d--&gt;helpers           Contains helper code common to multiple tests
+    |-------------------------------------------------------------------------
+    |-f--&gt;test_helper.rb    Contains the common test helper routes
+    |-------------------------------------------------------------------------
 </pre>
 
   </div>
@@ -171,14 +145,89 @@ deltacloud
 
 <p><br></p>
 
-<h3 id="bug">Reporting a bug</h3>
-<p>We track bugs in <a href="https://issues.apache.org/jira/browse/DTACLOUD">Apache JIRA</a>. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, <a href="https://issues.apache.org/jira/secure/CreateIssue!default.jspa">report it</a>.</p>
+<h3>Driver tests</h3>
+
+<u><b>REPO</b>/deltacloud/server/tests/drivers</u>
+
+<p><br></p>
+
+<p>
+This directory provides all the <i><b>driver</b></i> tests. Each driver tests is
+placed into a separate directory with the driver name.  Everything that touchs
+the driver API goes here as well. It is good practice to divide the tests into
+logical collections, in this case driver methods.
+</p>
+
+<p>
+Driver tests use the Deltacloud::new method to create new instance of a driver.
+This method is usually called in a <i>before</i> block and takes two parameters:
+<i>driver name</i> and <i>credentials</i>. The driver methods can be called
+directly on the instance of Deltacloud::new.
+</p>
+
+<p>
+Some driver tests may use the <a href="https://github.com/vcr/vcr">VCR</a> gem
+to record and then mock the real communication with the backend server. The fixtures
+are maintained in the <i>tests/drivers/<b>DRIVER</b>/fixtures</i> directory.
+</p>
+
+<p>
+For more informations about recording, look at the file: <i>tests/drivers/ec2/common.rb</i>,
+<a href="why-update-vcr-test-fixtures-data.html">Why Updating the VCR Fixtures</a>
+and <a href="update-vcr-test-fixtures-data-example.html">Updating VCR Fixtures Example</a>
+</p>
+
+<h3>Test Helpers</h3>
 
-<h3 id="idea">Proposing an idea</h3>
-<p>Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our <a href="http://teambox.com/projects/deltacloud">Teambox</a> page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.</p>
+<u><b>REPO</b>/deltacloud/server/tests/helpers</u>
+
+<p><br></p>
 
-<h3 id="documentation">Writing documentation</h3>
-<p>You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, don’t hesitate to do it and <a href="http://mail-archives.apache.org/mod_mbox/deltacloud-dev/">send us</a> your contribution. We really appreciate your help.</p>
+<p>
+The <i>base</i> directory contain tests for Deltacloud::Driver class and the Library
+class.
+</p>
+
+<h3>Frontend tests</h3>
+
+<p>
+In addition to the default <i>deltacloud</i> frontend Deltacloud may also
+operate using different frontends. In this case, instead of exposing the
+DC API specification to the client, Deltacloud will provide its drivers
+API through different frontends (like CIMI or Amazon EC2).
+</p>
+
+<p>
+Some tests might use the Mock driver to call the <i>control</i> blocks in Rabbit
+collections.  These tests are <b>not</b> driver tests, they just use the mock
+driver to make sure the Rabbit operation <i>control blocks</i> works as expected
+and they provide expected output.
+</p>
+
+<u><b>REPO</b>/deltacloud/server/tests/deltacloud</u>
+
+<p>
+This directory provides tests for Deltacloud API frontend. It contains tests
+for collections that this frontend provides and also tests helpers that this
+frontend use.
+</p>
+
+<u><b>REPO</b>/deltacloud/server/tests/ec2</u>
+
+<p>
+This directory provides tests for the EC2 frontend. Tests make sure that mapping
+between EC2 actions and Deltacloud driver API works correctly. All tests
+relevant to EC2 frontend tests should go here. **NOTE** this directory does not
+provide Amazon EC2 driver tests.
+</p>
+
+<u><b>REPO</b>/deltacloud/server/tests/cimi</u>
+
+<p>
+This directory provides tests for the CIMI frotend. They make sure that
+JSON/XML serialization of the CIMI models works correctly. Also there are tests
+to make sure the output provided by CIMI collections is correct.
+</p>
 
       <footer class="footer">
         <p class="pull-right"><span class='icon-circle-arrow-up'>&nbsp;</span><a href="#">Back to top</a></p>

Copied: deltacloud/trunk/site/output/white-box-tests.html (from r1453723, deltacloud/trunk/site/output/how-to-contribute.html)
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/output/white-box-tests.html?p2=deltacloud/trunk/site/output/white-box-tests.html&p1=deltacloud/trunk/site/output/how-to-contribute.html&r1=1453723&r2=1454446&rev=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/output/how-to-contribute.html (original)
+++ deltacloud/trunk/site/output/white-box-tests.html Fri Mar  8 16:16:50 2013
@@ -2,7 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>How Can I Contribute?</title>
+    <title>White Box Tests</title>
     <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
     <!--[if lt IE 9]>
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@@ -97,88 +97,52 @@
 
       <p><br></p>
 
-<h3 id="contribute">Contribute to Deltacloud</h3>
-<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. </p>
+<ul class="breadcrumb">
+<li>
+    <a href="how-to-contribute.html#how">How to contribute?</a> <span class="divider">/</span>
+  </li>
+  <li class="active">Validate Contributions Using the White Box Tests</li>
+</ul><h3>Validate Contributions Using the White Box Tests</h3>
+
+<p>
+Deltacloud contains automated API tests, that are driven using pre-recorded
+<a href="https://github.com/vcr/vcr">VCR</a> YAML files called <i>fixtures</i>.
+The test source and fixtures are maintained in the deltacloud source tree
+under: <i><b>REPO/deltacloud/server/tests
+
+
+</b></i></p><p>
+In some cases it might be necessarey to re-record the VCR fixtures for
+particular tests. For example, this could become necessarey, if new
+functionality or a bug fix alters the exchange with the backend cloud
+provider.
+</p>
+
+<p>
+The process for updating the test data involves exercising the tests against a live
+cloud provider and recording the live API exchange into the VCR fixtures YAML files.
+After which the tests can more quickly and easily be run using the recorded VCR
+fixtures without the need to accessess a live cloud provider.
+</p>
 
-<h4 id="how">How can I contribute?</h4>
+<h4 id="how">Dealing With the White Box Test</h4>
 
 <ul class="nav nav-list">
 <li class="nav-header">
   </li>
 <li>
-    <a href="send-patch.html">Send a patch</a>
+    <a href="white-box-tests-layout.html">White Box Tests Source Description</a>
   </li>
   <li>
-    <a href="write-new-driver.html">Write a provider driver</a>
+    <a href="running-the-white-box-tests.html">Running The White Box Tests</a>
   </li>
   <li>
-    <a href="#bug">Report a bug</a>
+    <a href="why-update-vcr-test-fixtures-data.html">Why Update The VCR Fixtures?</a>
   </li>
   <li>
-    <a href="#idea">Propose an idea</a>
+    <a href="update-vcr-test-fixtures-data-example.html">Updating VCR Fixtures Example</a>
   </li>
-  <li>
-    <a href="#documentation">Write documentation</a>
-  </li>
-</ul><p><br></p>
-
-<h3>Overview of the Deltacloud directory structure</h3>
-
-<p>The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:</p>
-
-<div class="row">
-  <div class="span1"></div>
-  <div class="span10 offset1">
-<pre>
-deltacloud
-|-----------------------------------------------------------------------------------
-|-d--&gt;tests                           Contains Cucumber tests
-|-----------------------------------------------------------------------------------
-|-d--&gt;site                            Files for this website
-|-----------------------------------------------------------------------------------
-|-d--&gt;client                          Contains the Deltacloud ruby client
-|-----------------------------------------------------------------------------------
-|-d--&gt;clients                         Contains other Deltacloud clients (e.g. java)
-|-----------------------------------------------------------------------------------
-|-d--&gt; server
-       |----------------------------------------------------------------------------
-       |-d--&gt;bin                      Contains the Deltacloud executable deltacloudd
-       |----------------------------------------------------------------------------
-       |-d--&gt;views                    Contains haml views for each collection
-       |----------------------------------------------------------------------------
-       |-d--&gt;tests                    Contains unit tests for drivers
-       |----------------------------------------------------------------------------
-       |-d--&gt;lib
-             |----------------------------------------------------------------------
-             |-d--&gt;sinatra            Contains rabbit DSL and various helpers
-             |----------------------------------------------------------------------
-             |-d--&gt;deltacloud
-                   |----------------------------------------------------------------
-                   |-d--&gt;models       Definition of each collection model
-                   |----------------------------------------------------------------
-                   |-d--&gt;drivers      Contains the drivers for each cloud provider
-                   |----------------------------------------------------------------
-                   |-d--&gt;helpers      Various helper methods used by the drivers
-                   |----------------------------------------------------------------
-                   |-d--&gt;base_driver  Contains the Deltacloud base driver
-                   |----------------------------------------------------------------
-                   |-f--&gt;server.rb                Contains the sinatra routes
-                   |----------------------------------------------------------------
-</pre>
-
-  </div>
-</div>
-
-<p><br></p>
-
-<h3 id="bug">Reporting a bug</h3>
-<p>We track bugs in <a href="https://issues.apache.org/jira/browse/DTACLOUD">Apache JIRA</a>. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, <a href="https://issues.apache.org/jira/secure/CreateIssue!default.jspa">report it</a>.</p>
-
-<h3 id="idea">Proposing an idea</h3>
-<p>Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our <a href="http://teambox.com/projects/deltacloud">Teambox</a> page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.</p>
-
-<h3 id="documentation">Writing documentation</h3>
-<p>You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, don’t hesitate to do it and <a href="http://mail-archives.apache.org/mod_mbox/deltacloud-dev/">send us</a> your contribution. We really appreciate your help.</p>
+</ul>
 
       <footer class="footer">
         <p class="pull-right"><span class='icon-circle-arrow-up'>&nbsp;</span><a href="#">Back to top</a></p>

Copied: deltacloud/trunk/site/output/why-update-vcr-test-fixtures-data.html (from r1453723, deltacloud/trunk/site/output/how-to-contribute.html)
URL: http://svn.apache.org/viewvc/deltacloud/trunk/site/output/why-update-vcr-test-fixtures-data.html?p2=deltacloud/trunk/site/output/why-update-vcr-test-fixtures-data.html&p1=deltacloud/trunk/site/output/how-to-contribute.html&r1=1453723&r2=1454446&rev=1454446&view=diff
==============================================================================
--- deltacloud/trunk/site/output/how-to-contribute.html (original)
+++ deltacloud/trunk/site/output/why-update-vcr-test-fixtures-data.html Fri Mar  8 16:16:50 2013
@@ -2,7 +2,7 @@
 <html lang="en">
   <head>
     <meta charset="utf-8">
-    <title>How Can I Contribute?</title>
+    <title>Why Update The VCR Fixtures</title>
     <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
     <!--[if lt IE 9]>
     <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
@@ -97,88 +97,105 @@
 
       <p><br></p>
 
-<h3 id="contribute">Contribute to Deltacloud</h3>
-<p>Deltacloud project is a free open source software licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation</a> license. The developers community is open to anyone who wants to contribute. Contributors are required to sign an individual contributor <a href="http://www.apache.org/licenses/icla.txt">license agreement</a>. Do not hesitate to <a href="contact.html">contact us</a> if you have any questions about contributing to the Deltacloud project. </p>
-
-<h4 id="how">How can I contribute?</h4>
-
-<ul class="nav nav-list">
-<li class="nav-header">
-  </li>
+<ul class="breadcrumb">
 <li>
-    <a href="send-patch.html">Send a patch</a>
-  </li>
-  <li>
-    <a href="write-new-driver.html">Write a provider driver</a>
-  </li>
-  <li>
-    <a href="#bug">Report a bug</a>
-  </li>
-  <li>
-    <a href="#idea">Propose an idea</a>
-  </li>
-  <li>
-    <a href="#documentation">Write documentation</a>
+    <a href="white-box-tests.html">White Box Tests?</a> <span class="divider">/</span>
   </li>
-</ul><p><br></p>
-
-<h3>Overview of the Deltacloud directory structure</h3>
-
-<p>The following list contains paths to essential files and directories for developers. It is intended as a help with orientation in the project directory - for example to quickly identify where the Deltacloud cloud provider drivers are stored:</p>
+  <li class="active">Why Update The VCR Fixtures</li>
+</ul><p>
+Deltacloud uses pre-recorded <a href="https://github.com/vcr/vcr">VCR</a> YAML
+files called <i>fixtures</i> to allow test execution without the need for a live
+cloud provider.
+</p>
+
+<p>
+The <i>fixtures</i> YAML files are located under:
+<u><b>REPO</b>/deltacloud/server/tests/drivers/<i>driver name</i>/fixtures</u>
+</p>
+
+<p>
+A live cloud provider, with valid credentials, needs to be used in order to
+<a href="https://www.relishapp.com/vcr/vcr/v/1-6-0/docs/record-modes">record</a>
+the fixtures YAML files but once recorded the tests can then be executed without
+a live cloud provider.
+</p>
+
+<p>
+Because valid credentials are used to record the VCR fixtures data care must be
+taken to either alter the credentials on the live cloud provider or remove them
+from the fixtures data after doing the recording.
+More on how to do this can be found in
+<a href="update-vcr-test-fixtures-data-example.html">Updating VCR Fixtures Example</a>
+</p>
+
+<h3>Why VCR data May Need Updating:</h3>
+
+<p>
+In some cases you will need to re-record the VCR fixtures for particular test.
+This happen when a request is made to the backend cloud provider that a
+test does not yet exercise. <b>For Example:</b>
+</p>
 
-<div class="row">
-  <div class="span1"></div>
-  <div class="span10 offset1">
-<pre>
-deltacloud
-|-----------------------------------------------------------------------------------
-|-d--&gt;tests                           Contains Cucumber tests
-|-----------------------------------------------------------------------------------
-|-d--&gt;site                            Files for this website
-|-----------------------------------------------------------------------------------
-|-d--&gt;client                          Contains the Deltacloud ruby client
-|-----------------------------------------------------------------------------------
-|-d--&gt;clients                         Contains other Deltacloud clients (e.g. java)
-|-----------------------------------------------------------------------------------
-|-d--&gt; server
-       |----------------------------------------------------------------------------
-       |-d--&gt;bin                      Contains the Deltacloud executable deltacloudd
-       |----------------------------------------------------------------------------
-       |-d--&gt;views                    Contains haml views for each collection
-       |----------------------------------------------------------------------------
-       |-d--&gt;tests                    Contains unit tests for drivers
-       |----------------------------------------------------------------------------
-       |-d--&gt;lib
-             |----------------------------------------------------------------------
-             |-d--&gt;sinatra            Contains rabbit DSL and various helpers
-             |----------------------------------------------------------------------
-             |-d--&gt;deltacloud
-                   |----------------------------------------------------------------
-                   |-d--&gt;models       Definition of each collection model
-                   |----------------------------------------------------------------
-                   |-d--&gt;drivers      Contains the drivers for each cloud provider
-                   |----------------------------------------------------------------
-                   |-d--&gt;helpers      Various helper methods used by the drivers
-                   |----------------------------------------------------------------
-                   |-d--&gt;base_driver  Contains the Deltacloud base driver
-                   |----------------------------------------------------------------
-                   |-f--&gt;server.rb                Contains the sinatra routes
-                   |----------------------------------------------------------------
-</pre>
-
-  </div>
-</div>
-
-<p><br></p>
+<ul>
+<li>
+    <p>
+    A bug is fixed in the EC2 driver, where <i>images()</i> method had not work properly.
+    </p>
+    <ol>
+<li>
+        <p>Open <i>tests/drivers/ec2/images_tests.rb</i></p>
+      </li>
+      <li>
+        <p>Add a new test to capture this bug.</p>
+        <p>At the end of this file and add a the new code:</p>
+        <pre>
+        it 'should provide correct output' do
+          # assertions go here
+        end
+        </pre>
+      </li>
+    </ol>
+</li>
 
-<h3 id="bug">Reporting a bug</h3>
-<p>We track bugs in <a href="https://issues.apache.org/jira/browse/DTACLOUD">Apache JIRA</a>. When you discover a problem with Deltacloud functionality, check JIRA if someone has already reported the issue to the Deltacloud developers. Otherwise, <a href="https://issues.apache.org/jira/secure/CreateIssue!default.jspa">report it</a>.</p>
+  <li>
+    <p>
+    Scenario: You added new collection <i>oranges()</i> into RHEV-M driver.
+    </p>
+    <ol>
+<li>
+        <p>Write all driver methods tests here: <i>tests/drivers/rhevm/oranges_tests.rb</i></p>
+      </li>
+      <li>
+        <p>Create <i>tests/deltacloud/collections/oranges_collection_tests.rb</i></p>
+      </li>
+      <li>
+        <p>Write all collection operations tests here ^^</p>
+      </li>
+    </ol>
+</li>
 
-<h3 id="idea">Proposing an idea</h3>
-<p>Have you found a way how to improve Deltacloud project? Do you miss a feature or a tool, which we could include into Deltacloud? Our <a href="http://teambox.com/projects/deltacloud">Teambox</a> page is a place where we keep the latest task lists and where you can add comments or suggest new features for the project.</p>
+  <li>
+    <p>
+    A bug is fixed in the Deltacloud frontend where <i>/api/images/123/create</i>
+    operation does not provide correct status code. You corrected it.
+    </p>
+    <ol>
+<li>
+        <p>Open 'tests/deltacloud/collections/images_collection_test.rb'</p>
+      </li>
+      <li>
+        <p>Locate this line: </p>
+          <pre>
+          it 'allow to create and destroy the new image' do
+          </pre>
+      </li>
+      <li>
+        <p>Provide the correct value into 'status.must_equal' method</p>
+      </li>
+    </ol>
+</li>
 
-<h3 id="documentation">Writing documentation</h3>
-<p>You can also contribute with a piece of documentation. There are still things which needs to be described. If you found one like that and you are interested in writing a couple of sentences about the particular issue, please, don’t hesitate to do it and <a href="http://mail-archives.apache.org/mod_mbox/deltacloud-dev/">send us</a> your contribution. We really appreciate your help.</p>
+</ul>
 
       <footer class="footer">
         <p class="pull-right"><span class='icon-circle-arrow-up'>&nbsp;</span><a href="#">Back to top</a></p>