Cameron Braid wrote:
I don't think that you need to run tests against your live data.
We do the following
A) provide ant tasks to (re)create the database since we are using hibernate this is easy
B) provide ant tasks to populate the database with the test data we use DBUNIT to insert the data from an xml dataset. http://dbunit.sourceforge.net/
C) use junit for unit tests
When we write unit tests we also create a dataset file. This dataset file is inserted into the database prior to running the test method (in setUp())
Having these tasks allow for the testing process to be fully automated by starting with the code and an empty database.
When we discover a bug that somehow gets into production, we * use a dbunit task to scrape relevant data from the production database
into an xml file dataset. * using dbunit to import that dataset into the development database to
reproduce the bug offline.
* then create a unit test that reproduces the bug using as small a
dataset as possible.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco Hernandez
Sent: Monday, 6 October 2003 5:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] testing web applications
so i need to write tests to for successfull conditions and then also failure conditions, I was planning on having the tests all work against a test database so i dont touch my live data.
Robert Douglass wrote:
I make sure to write tests that break the code too. So the
first test
I run is said action without any input parameters, for
example. Then
with bad parameters. The bad tests have to all fail before
I test the
correct case. And, by the way, make sure you have worked
out whether
you're going change state in your database (or whatever persistence mechanism you use). Always write your tests so that you can
run them
on a live application, if you can, without risking data loss etc.
-RD
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Behalf Of
Francisco Hernandez Sent: Monday, October 06, 2003 6:16 AM To: [EMAIL PROTECTED] Subject: [OS-webwork] testing web applications
hey guys, im new to unit testing and am wondering what kind
of tests
you guys do you your apps
for example I have an action that creates a user, do you
guys simply
populate the parameters and execute the action and then
check to see
if the user exists with the correct data in the datastore?
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Opensymphony-webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Opensymphony-webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Opensymphony-webwork mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork