After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787401 - Test Suite for the Report System
Test Suite for the Report System
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Reports
git-master
Other Linux
: Normal enhancement
: ---
Assigned To: gnucash-reports-maint
gnucash-reports-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-07 09:13 UTC by Carsten Rinke
Modified: 2018-06-29 23:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Test Suite for the Report System (239.24 KB, patch)
2017-09-07 09:15 UTC, Carsten Rinke
rejected Details | Review

Description Carsten Rinke 2017-09-07 09:13:23 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.
Comment 1 Carsten Rinke 2017-09-07 09:15:20 UTC
Created attachment 359327 [details] [review]
Test Suite for the Report System

This version is working on commit 7ee15a3d70ecde64139ddd72335fa65d9c6220ef (August 25).
Comment 2 Carsten Rinke 2017-09-07 09:44:35 UTC
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 3 John Ralls 2017-09-07 13:54:28 UTC
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.
Comment 4 John Ralls 2017-12-28 21:22:00 UTC
Carsten, are you going to pursue this or should I close it?
Comment 5 Carsten Rinke 2017-12-29 07:25:42 UTC
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.
Comment 6 John Ralls 2017-12-29 15:05:52 UTC
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.
Comment 7 Carsten Rinke 2018-06-03 14:16:00 UTC
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 8 John Ralls 2018-06-07 18:59:59 UTC
Comment on attachment 359327 [details] [review]
Test Suite for the Report System

Patch superseded by https://github.com/Gnucash/gnucash/pull/360.
Comment 9 John Ralls 2018-06-07 19:03:54 UTC
Having merged PR360. Thanks!
Comment 10 John Ralls 2018-06-29 23:59:18 UTC
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.