Wednesday, July 1, 2009

UNIT TESTING


Note: This works well for MYSQl, if your company using some other DB and use hibernate kind of technology then still you can do loading etc for your testing purposes.<BEWARE> This tool will however fail for date fields in Oracle.

Have you ever faced issues of your test data being tampered by some of your collegue. Do you wish to have simple Test data setup for JUNIT , so that you donot have to write read thousands of documentation to the same.
We as a company are currently working on trade monitoring and wish to become india largest custodian of retail portfolio strategy to learn more about us visit : http://plan-execute-trade.blogspot.com/

This is a very simple application which works on excel sheet. so that you can create test data that you enter into the excel sheet will be entered into your database. this sheet should only be used with JUNIT DB instance as it purge all the data before inserting the new data from the excel sheet.

These are the steps of using it :
1. Assume, for testing one set of functionality you need some sample data, this is how u would ideally do in J2EE world. Take some DBUnit etc etc write few insert statement etc...etc
But this is much simpler you insert the data in excel sheet and then press one button the data is inserted into your Database, please note it will remove all the data from a table before entering new data (Beware of this fact).

2. Sheet number 1 should be named : MAIN_SHEET
3. C6 should hold the ODBC bridge name [simple to set, if u donot know ask i can add that small note for you]
4. C7 is for DB_USER name
5. C8 is for DB pass word
6. Add another sheet, Name the sheet same as your table name, note the first sheet should nt have any dependency on other db.all dependent tables should moved to right side sheets.
7. First cell in each sheet should have the makeup of INSERT statement like INSERT INTO NSE_HOLIDAYS (YEAR,HOLIDAY_DATE) VALUES (
8. Next adjacent cell should hold the name of the table
9. Next row should be for number of columns you would like to insert.
10. enter the data, for date ensure you enter data in format YYYY/MM/DD and keep the field FORMAT type as TEXT for date fields.
11. Once you have completed all the data fillup you can press "CREATE TEST DATA"
12. later we can provide poi apis to integrate with JUNIT.

DOWNLOAD FROM HERE:
http://www.ziddu.com/download/5431986/webservices_Excel.xls.html

No comments:

Post a Comment