@mattab opened this Issue on December 16th 2014 Owner

The goal of this issue is to make our Continuous Integration run automated tests for the static PNG graphs generated by the ImageGraph module.

in 2.10.0-b8 we got hit by a couple regressions in the static Image Graphs see #6863 #6862 - we should be able to detect such huge regressions and prevent them occuring again without us noticing!

Current state

We actually had to remove PNG graphs from the CI because there were minor pixel differences in images between local machine and CI, causing tests to fail.

  1. on system tests builds we see the tests are marked as skipped: 1) Piwik\Tests\System\EcommerceOrderWithItemsTest::testImagesIncludedInTests - Scheduled reports generated during integration tests will not contain the image graphs. For tests to generate images, use a machine with the following specifications : OS = linux, PHP = 5.5 and GD = 2.1.1.
  2. on UI screenshot tests the sparklines are removed here with \Piwik\Visualization\Sparkline::$enableSparklineImages = false;

Proposed steps

  • [ ] how to make travis run the same GD version as all/most core developers?
  • [x] create a new integration test in ImageGraph plugin that will generate the evolution graph, pie chart, bar graph, with static data from a test API. this will help us isolate the feature and depend less on our system tests. Example typical graphs are listed in the doc.
  • [ ] enable sparklines in UI tests and check the UI build is green on both local machine and remote (that same sparklines are generated)
  • [ ] enable scheduled reports that include graphs
  • [ ] celebrate!!
@mattab commented on September 23rd 2015 Owner

The Graphs generated by the ImageGraph.get API (dev doc) is now tested by automated tests. This was added in https://github.com/piwik/piwik-ui-tests/commit/b21a91666f6b86cbb317ad7566dc2f30345cbdd7

Powered by GitHub Issue Mirror