FunctionalTestsUsingSpreadsheets
|
|
Your trail: |
owned by the business users. run in a repeatable way by the development team*.
- Ask your business users to create a spreadsheet of sample data and expected results.
- Encourage them to create one FunctionalTest per sheet.
- Write code to read a CSV file, select predetermined fields, and run your functional test. Example coming in this space. Build this with Junit, typically in a FunctionalTest package.
- Save the spreadsheets with your test suite. They are your FunctionalTests.
Example
- Your software needs to count stock and produce a report with daily, month-to-date and year-to-date figures.
- The spreadsheet (to be attached here) gives an example.
- This code (to be attached here) runs a CSV file. You will see that it selects column 1 as the date and column 4 as the expected result.
- Here is the junit test, complete with the counting software.
I'm very interested in a version of this as, for us, spreadsheets form a part of the system and we haven't really figured out how to test them. For this sort of task, it struck me that XML would be an interesting interchange format. --SteveFreeman. OliBye is probably the bigest XML proponent on the planet, but XP says do the simplest thing, so why not save in CSV format (comma separated) this would be easy to load as test data -- OliBye.
Notes
- Although they don't need to be run with unit tests, and they can fail - sometimes because the code has not yet been implemented. FunctionalTests must be ... owned by the business users. run in a repeatable way by the development team*.
- Ask your business users to create a spreadsheet of sample data and expected results.
- Encourage them to create one FunctionalTest per sheet.
- Write code to read a CSV file, select predetermined fields, and run your functional test. Example coming in this space. Build this with Junit, typically in a FunctionalTest package.
- Save the spreadsheets with your test suite. They are your FunctionalTests.
Example
- Your software needs to count stock and produce a report with daily, month-to-date and year-to-date figures.
- The spreadsheet (to be attached here) gives an example.
- This code (to be attached here) runs a CSV file. You will see that it selects column 1 as the date and column 4 as the expected result.
- Here is the junit test, complete with the counting software.
I'm very interested in a version of this as, for us, spreadsheets form a part of the system and we haven't really figured out how to test them. For this sort of task, it struck me that XML would be an interesting interchange format. --SteveFreeman.
OliBye is probably the bigest XML proponent on the planet, but XP says do the simplest thing, so why not save in CSV format (comma separated) this would be easy to load as test data -- OliBye.
Let's see if Office2000 delivers as promises ;-) --SF
Notes
- Although they don't need to be run with unit tests, and they can fail - sometimes because the code has not yet been implemented. ³rev³8³FunctionalTestsUsingSpreadsheet
³³date³September 12, 1999³host³modem-180-216-176-194.vip.uk.com³agent³Mozilla/4.5 en? (WinNT?; I)³FunctionalTestsUsingSpreadsheets
Edit this page More info... Attach file...
|
This page last changed on 12-Sep-1999 15:01:57 BST by unknown. |
|