haleaurelian / proteusproject

Automatically exported from code.google.com/p/proteusproject
0 stars 0 forks source link

Defining database, schema and datafiles in a config file #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Would be nice if database, schema and datafiles could be defined in 
app.config or a proteus.config file.

For example,
<proteus>
  <test name="regressionTest1">
    <database name="abc" conn="">
      <schema path=""/>
      <datafile path=""/>
    </database>
  </test>
  <test name="regressionTest2">
    <database name="cde" conn="">
      <schema path=""/>
      <datafile path=""/>
    </database>
  </test>
</proteus>

regressionTest1 and regressionTest2 are test classes.

Original issue reported on code.google.com by ah...@kf7.co.uk on 6 Jan 2010 at 4:09

GoogleCodeExporter commented 8 years ago
I started to write an explanation of how its already quite possible to 
(easily!) do
this right here but then decided it might be more valuable to just turn the 
question
into a blog post so I did so here:

http://unhandled-exceptions.com/blog/index.php/2010/01/09/externalizing-settings
-for-data-dependent-unit-tests-using-proteus-databaseunittestbase/

This post explains how its easy to change the behavior of the 
DatabaseUnitTestBase
class using a derive + override approach to add this specific functionality (at 
least
as I understand the request).

Can you advise if the approach in that post will give you what you're looking 
for
(and if not, can you help me understand where it falls short so that I can 
reconsider
adding the missing capability to the Proteus libraries)?

Thanks,

-Steve B.

Original comment by sboh...@gmail.com on 9 Jan 2010 at 5:20

GoogleCodeExporter commented 8 years ago
Thanks for your reply Steve. The blog does help. This is exactly what I was 
looking 
for.

Cheers!

Original comment by ah...@kf7.co.uk on 11 Jan 2010 at 11:42

GoogleCodeExporter commented 8 years ago
No problem.  Glad that helped.

Original comment by sboh...@gmail.com on 11 Jan 2010 at 12:41