Project

General

Profile

« Previous | Next » 

Revision 4688

Added by daigle about 16 years ago

Add a section on testing against different db schema versions

View differences:

testing-metacat.html
46 46
      <div class="toc2"><a href="#RunAllTests">Run All Tests</a></div>
47 47
      <div class="toc2"><a href="#RunOneTest">Run One Test</a></div>
48 48
      <div class="toc2"><a href="#ViewingOutput">Viewing Test Output</a></div>
49
    <div class="toc1"><a href="#TestDbVersions">Testing Different Database Schema Versions</a></div>
50
      <div class="toc2"><a href="#scripts">Scripts to Run</a></div>
51
      <div class="toc2"><a href="#checkoutScripts">Get Scripts Via Checkout</a></div>
52
      <div class="toc2"><a href="#scriptRepo">Script Repository</a></div>
49 53
  </div>  
50 54
  
51 55
  <a name="Intro"></a><div class="header1">About Metacat Testing</div>
......
188 192
  all standard error and standard out output as well as information on assertion 
189 193
  failures in the event of a failed test.
190 194
  </p>
195
  
196
  <a name="TestDbVersions"></a><div class="header1">Testing Different Database Schema Versions</div>
197
  <p>Now and again it is necessary to restore your test database to an older schema version
198
  either because you need to test upgrade functionality, or you need to test backwords 
199
  compatibility of code.  This section describes how to get your db schema to an older 
200
  version.
201
  
202
  <a name="scripts"></a><div class="header2">Scripts to Run</div>
203
  <p>It is assumed that you have an empty metacat database up and running with a 
204
  metacat user.
205
  <p>There are two types of scripts that need to be run in order to create a Metacat
206
  schema:</p>
207
  <ul>
208
  <li>xmltables-&lt;dbtype&gt;.sql - where &lt;dbtype&gt; is either oracle or postgres
209
  depending on what type of database you are running against.  This script creates the
210
  necessary tables for Metacat.</li>
211
  <li>loaddtdschema-&lt;dbtype&gt;.sql - where &lt;dbtype&gt; is either oracle or postgres
212
  depending on what type of database you are running against.  This script creates the
213
  necessary seed data for Metacat.</li>
214
  </ul> 
215
  
216
  <a name="checkoutScripts"></a><div class="header2">Get Scripts Via Checkout</div>
217
  <p>One way to get the scripts you need is to check out the release tag for the version
218
  of metacat that you want to install.  You can then run the two scripts shown above to
219
  create your database.</p>
220
  
221
  <a name="scriptRepo"></a><div class="header2">Script Repository</div>
222
  <p>For convenience, the scripts to create each version have been extracted and 
223
  checked into:</p>
224
    <div class="code">&lt;metacat_code&gt;/src/scripts/metacat-db-versions</div>
225
  <p>The files look like:</p>
226
  <ul>
227
  <li>&lt;version&gt;_xmltables-&lt;dbtype&gt;.sql - where &lt;version&gt; is the version
228
  of the schema that you want to create and &lt;dbtype&gt; is either oracle or postgres
229
  depending on what type of database you are running against.  This script creates the
230
  necessary tables for Metacat.</li>
231
  <li>&lt;version&gt;_loaddtdschema-&lt;dbtype&gt;.sql - where &lt;version&gt; is the version
232
  of the schema that you want to create and &lt;dbtype&gt; is either oracle or postgres
233
  depending on what type of database you are running against.  This script creates the
234
  necessary seed data for Metacat.</li>
235
  <li>&lt;version&gt;_cleanall-&lt;dbtype&gt;.sql - where &lt;version&gt; is the version
236
  of the schema that you want to create and &lt;dbtype&gt; is either oracle or postgres
237
  depending on what type of database you are running against. This is a convenience script
238
  to clean out the changes for that version.</li>
239
  </ul>
240
  
241
  <a name="scriptRepo"></a><div class="header2">Manually Run Scripts</div>
242
  <p>For instructions on running database scripts manually, please refer to:
243
  <a href="../user/run-db-scripts.html">how to run database scripts</a></p>
191 244
    
192 245
  <br>
193 246
  <a href="./metacat-eclipse-project.html">Back</a> | <a href="./index.html">Home</a> | 
194 247
  <!--a href="add next file here when one exists" -->Next<!-- /a -->
195
  </ul>
196 248

  
197 249
</BODY>
198 250
</HTML>

Also available in: Unified diff