GnuCash
Contact   Instructions
Bug 787401 - Test Suite for the Report System
Summary: Test Suite for the Report System
Status: RESOLVED FIXED
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Reports (show other bugs)
Version: git-master
Hardware: Other Linux
: Normal enhancement
Target Milestone: ---
Assignee: reports
QA Contact: reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-07 05:13 EDT by Carsten Rinke
Modified: 2018-08-26 12:57 EDT (History)
5 users (show)

See Also:


Attachments
Test Suite for the Report System (239.24 KB, patch)
2017-09-07 05:15 EDT, Carsten Rinke
jralls: rejected+
Details

Description Carsten Rinke 2017-09-07 05:13:27 EDT
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 05:15:24 EDT
Created attachment 359327 [details]
Test Suite for the Report System

This version is working on commit 7ee15a3d70ecde64139ddd72335fa65d9c6220ef (August 25).
Comment 2 Carsten Rinke 2017-09-07 05:44:39 EDT
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 09:54:32 EDT
Comment on attachment 359327 [details]
Test Suite for the Report System

Comment on attachment 359327 [details]
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 16:22:04 EST
Carsten, are you going to pursue this or should I close it?
Comment 5 Carsten Rinke 2017-12-29 02:25:46 EST
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 10:05:56 EST
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 10:16:04 EDT
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 15:00:03 EDT
Comment on attachment 359327 [details]
Test Suite for the Report System

Comment on attachment 359327 [details]
Test Suite for the Report System

Patch superseded by https://github.com/Gnucash/gnucash/pull/360.
Comment 9 John Ralls 2018-06-07 15:03:58 EDT
Having merged PR360. Thanks!
Comment 10 Carsten Rinke 2018-08-26 12:57:46 EDT
just to complete the list of references, the following pull requests have also been created:

add tests for report options
https://github.com/Gnucash/gnucash/pull/379

Test for the report system - HTML Tests
https://github.com/Gnucash/gnucash/pull/391

Tests for jqplot
https://github.com/Gnucash/gnucash/pull/404

Note You need to log in before you can comment on or make changes to this bug.