GNOME Bugzilla – Bug 787401
Test Suite for the Report System
Last modified: 2018-06-29 23:59:18 UTC
This is a proposal for a test suite for the report system. It is based on Glib. To use it go to path <build-directory-root>/gnucash/report/report-system/test and run "make check" followed by "cat cat test-report-system.log" Note: Make sure to run the above commands after "make install", otherwise the tests for jqplot availability will fail. Currently I do not know a way how to tell the test suite where to find the jqplot files other than in the installation directory.
Created attachment 359327 [details] [review] Test Suite for the Report System This version is working on commit 7ee15a3d70ecde64139ddd72335fa65d9c6220ef (August 25).
Please note that this is a starting point. It is by far not a complete test suite. I file this here to check for feedback if this is a valid approach that might some day end up in master, or if this is a completely obsolete attempt.
Comment on attachment 359327 [details] [review] Test Suite for the Report System In general new code for master should be in C++ and use Googletest, but surely report system tests should be in Scheme. Are there no unit testing frameworks for Scheme? There's no CMakelists.txt patch. 4000 lines in a single file is too big. Please modularize it. We would prefer that contributions of this size be made via Github pull request rather than in a bug report.
Carsten, are you going to pursue this or should I close it?
Hi John, let's close it for now. I have looked into CMake, CTest and GoogleTest, and I think I have understood less than half of it - considering C++ on top -> I am totally lost here. I can come back to it once my learning curve has caught up.
OK. Don't get distracted by C++. I think Scheme code should be tested with Scheme, and former GnuCash documenter Yawar Amin has written https://github.com/yawaramin/ggspec. Perhaps that will work for us.
pull request #360 created for testing of report definition (which is just a sub-set of the targeted test suite): https://github.com/Gnucash/gnucash/pull/360
Comment on attachment 359327 [details] [review] Test Suite for the Report System Patch superseded by https://github.com/Gnucash/gnucash/pull/360.
Having merged PR360. Thanks!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=787401. Please update any external references or bookmarks.