lazarus-ccr/components/fpspreadsheet/tests
2014-05-15 12:53:56 +00:00
..
colortests.pas fpspreadsheet: Add most of the BIFF8 features to BIFF5. Add test cases for BIFF5 --> pass. Move more shared code from xlsbiff5 and xlsbiff8 to xlscommon. Update wiki. 2014-04-25 22:15:26 +00:00
datetests.pas fpspreadsheet: Add date/time reading/writing support to BIFF2 and the corresponding "write-read" unit test cases. Passed. 2014-05-02 18:49:05 +00:00
fonttests.pas fpspreadsheet: Add most of the BIFF8 features to BIFF5. Add test cases for BIFF5 --> pass. Move more shared code from xlsbiff5 and xlsbiff8 to xlscommon. Update wiki. 2014-04-25 22:15:26 +00:00
formattests.pas fpspreadsheet: Improved format detection when reading biff files. Unit test without errors due to biff now again. Fix compilation error of other formats due to new NumFormatList. 2014-05-15 12:53:56 +00:00
internaltests.pas * Tests: cosmetic/slight tightening file exist test 2013-12-27 13:55:56 +00:00
manualtests.pas fpspreadsheet: Some refinements with color handling: 2014-04-24 21:27:57 +00:00
numberstests.pas fpspreadsheet: Add date/time reading/writing support to BIFF2 and the corresponding "write-read" unit test cases. Passed. 2014-05-02 18:49:05 +00:00
optiontests.pas fpspreadsheet: Fix show/hide gridlines/headers issue of BIFF2 by adding WINDOW1 record. Move WINDOW1 record of BIFF5-BIFF8 to xlscommon. Add test cases for BIFF2. ok. 2014-05-04 20:01:21 +00:00
readme.txt + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
rpntests.inc * Tests updated to work with current code (i.e. no new RPN support yet). 2014-04-08 09:33:13 +00:00
spreadtestcli.lpi + Tests: add support for LibreOffice/OpenOffice .ods spreadsheets 2014-03-23 11:34:37 +00:00
spreadtestcli.lpr * Tests: cosmetic/slight tightening file exist test 2013-12-27 13:55:56 +00:00
spreadtestgui.lpi fpspreadsheet: Row heights now can be saved to all biff versions. Add unit test case for row heights, ok. Bug fixed in BIFFExplorer with format detection. 2014-05-07 18:31:27 +00:00
spreadtestgui.lpr fpspreadsheet: Add unit test cases for pane support and showing/hiding of grid lines and sheet headers (write/read of BIFF5 and BIFF8). Passed. 2014-05-04 19:08:17 +00:00
spreadtestgui.res + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
stringtests.pas fpspreadsheet: Fix crash of unit test. Still some number format detection issues. 2014-05-14 23:17:46 +00:00
testbiff8_1899.xls + Add support for text/number/date formats in BIFF8/xls. 2013-12-22 14:02:04 +00:00
testbiff8.xls fpspreadsheet: Fix crash of unit test. Still some number format detection issues. 2014-05-14 23:17:46 +00:00
testdbwriter_firebird.sql Cosmetic: better test reporting database 2014-03-25 14:44:04 +00:00
testdbwriter_postgresql.sql + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
testdbwriter.ini + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
testdbwriter.pas Cosmetic: better test reporting database 2014-03-25 14:44:04 +00:00
testdbwriter.rc + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted 2013-12-07 13:42:22 +00:00
testdbwriter.res + Add support for more/easier RPN formulas in XLS 2014-04-08 09:48:30 +00:00
testodf_1899.ods + Tests: add support for LibreOffice/OpenOffice .ods spreadsheets 2014-03-23 11:34:37 +00:00
testodf.ods + Tests: add support for LibreOffice/OpenOffice .ods spreadsheets 2014-03-23 11:34:37 +00:00
testsutility.pas fpspreadsheet: Row heights now can be saved to all biff versions. Add unit test case for row heights, ok. Bug fixed in BIFFExplorer with format detection. 2014-05-07 18:31:27 +00:00

Tests for fpspreadsheet

spreadtestgui
=============
Lets you quickly run tests in a GUI.
If there are problems, you can open the spreadtestgui.lpr in Lazarus, compile it with debug mode, and trace through the offending test and the fpspreadsheet code it calls.
More details: FPCUnit documentation

spreadtestcli
=============
Command line version of the above, extended with database output. Useful for scripting use (use e.g. --all --format=plain.

For output to an embedded Firebird database, make sure the required dlls/packages are present and run the program, e.g:
spreadtestcli --comment="Hoped to have fixed that string issue" --revision="482"
(the revision is the SVN revision number, so you can keep track of regresssions)

More details: FPCUnit documentation and
https://bitbucket.org/reiniero/testdbwriter

The tests
=========
Basic tests read XLS files and check the retrieved values against a list. This tests whether reading dates, text etc works.

Another test is to take that list of normative values, write it to an xls file, then read back and compare with the original list. This basically tests whether write support is correct.
The files are written to the temp directory. They are deleted on succesful test completion; otherwise they are kept so you can open them up with a spreadsheet application/mso dumper tool/hex editor and check what exactly got written.

Finally, there is a manual test unit: these tests write out cells to a spreadsheet file (testmanual.xls) that the user should inspect himself. Examples are tests for colors, formatting etc.

Adding tests
============
For most tests:
- Add new cells to the A column in the relevant xls files; see comments in files.
- Add corresponding normative/expected value in the relevant test unit; increase array size
- Add your tests that read the data from xls and checks against the norm array.

Note that tests that check for known failures are quite valuable. You can indicate you expect an exception etc. 

Ideas for more tests:
- add more tests to internaltests to explicitly tests fpspreadsheet functions/procedures/properties that don't read/write to xls/xml files
- writing RPN formulas in the manualtests unit
- more xls/xml file formats tested
- more corner cases
- writing all data available to various sheets and reading it back to test whether complex sheets work
- reading faulty files to test exception handling

For more details, please see the FPCUnit documentation.