diff --git a/misc/log-analytics/import_logs.py b/misc/log-analytics/import_logs.py index b48fe9b4a92..031a1e9eae3 100755 --- a/misc/log-analytics/import_logs.py +++ b/misc/log-analytics/import_logs.py @@ -1348,6 +1348,7 @@ def invalid_line(line, reason): hits = [] for lineno, line in enumerate(file): + print("LINE: " + line) try: line = line.decode(config.options.encoding) except UnicodeDecodeError: @@ -1449,7 +1450,7 @@ def invalid_line(line, reason): except UnicodeDecodeError: invalid_line(line, 'invalid encoding') continue - + print("SUCCESSFUL PARSE") # Check if the hit must be excluded. if all((method(hit) for method in self.check_methods)): hits.append(hit) diff --git a/tests/PHPUnit/Integration/ImportLogsTest.php b/tests/PHPUnit/Integration/ImportLogsTest.php index 7722eb3a108..fa9bc5013e0 100755 --- a/tests/PHPUnit/Integration/ImportLogsTest.php +++ b/tests/PHPUnit/Integration/ImportLogsTest.php @@ -102,6 +102,7 @@ protected static function trackVisits() { self::logVisitsWithStaticResolver(self::$tokenAuth); self::logVisitsWithAllEnabled(self::$tokenAuth); + self::replayLogFile(self::$tokenAuth); } /** @@ -155,6 +156,23 @@ protected static function logVisitsWithAllEnabled( $token_auth ) self::executeLogImporter($logFile, $opts); } + public static $output; + /** + * Logs a couple visit using log entries that are tracking requests to a piwik.php file. + * Adds two visits to idSite=1 and two to non-existant sites. + */ + protected static function replayLogFile( $token_auth ) + { + $logFile = PIWIK_INCLUDE_PATH.'/tests/resources/fake_logs_replay.log'; + + $opts = array('--token-auth' => $token_auth, + '--recorders' => '4', + '--recorder-max-payload-size' => '2', + '--replay-tracking' => false); + + self::executeLogImporter($logFile, $opts); + echo print_r(self::$output, true); + } protected static function executeLogImporter( $logFile, $options ) { @@ -181,6 +199,7 @@ protected static function executeLogImporter( $logFile, $options ) // run the command exec($cmd, $output, $result); + self::$output = $output; if ($result !== 0) { throw new Exception("log importer failed: ".implode("\n", $output)."\n\ncommand used: $cmd"); diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageTitles_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageTitles_month.xml index 3be030ce1b4..77e2b649183 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageTitles_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageTitles_month.xml @@ -96,4 +96,38 @@ + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml index 34d9de8cb28..bc73f49c8bc 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getEntryPageUrls_month.xml @@ -388,6 +388,24 @@ 100% http://piwik.net/ + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://example.org/index.htm + 1 @@ -404,6 +422,24 @@ 0% http://piwik.net/moved-permanently + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://forum.piwik.org/register.php?0,approve=9a94a02145599 + 1 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageTitles_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageTitles_month.xml index 16cbe295eec..f1b90a5e1d6 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageTitles_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageTitles_month.xml @@ -90,4 +90,38 @@ + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml index 6157951c302..45f6b4c1561 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getExitPageUrls_month.xml @@ -388,6 +388,42 @@ 100% http://piwik.net/ + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://example.org/index.htm + + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://forum.piwik.org/register.php?0,approve=9a94a02145599 + 1 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageTitles_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageTitles_month.xml index 65f4da611cf..2d7babf5e2c 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageTitles_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageTitles_month.xml @@ -130,4 +130,38 @@ + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrl_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrl_month.xml index c234bed59e9..c5d48fa6219 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrl_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrl_month.xml @@ -1,2 +1,21 @@ - \ No newline at end of file + + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://example.org/index.htm + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrls_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrls_month.xml index d42c3b62f94..83ebace1e2b 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrls_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.getPageUrls_month.xml @@ -388,6 +388,24 @@ 100% http://piwik.net/ + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://example.org/index.htm + 1 @@ -404,6 +422,24 @@ 0% http://piwik.net/moved-permanently + + + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 0 + 100% + 100% + http://forum.piwik.org/register.php?0,approve=9a94a02145599 + 1 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml index 0cb16f1ed7a..d6bddb919fb 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Actions.get_month.xml @@ -1,7 +1,7 @@ - 22 - 22 + 24 + 24 3 3 0 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml index 16b68fd7471..dac2ed1a3fc 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__CustomVariables.getCustomVariables_month.xml @@ -116,4 +116,80 @@ + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml index 6de32dd474e..e6257ea0202 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getDaysToConversion_month.xml @@ -2,7 +2,7 @@ - 21 + 22 @@ -54,6 +54,6 @@ - 0 + 1 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsCategory_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsCategory_month.xml index c234bed59e9..89122851de6 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsCategory_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsCategory_month.xml @@ -1,2 +1,12 @@ - \ No newline at end of file + + + + 1 + 1 + 1 + 0 + 0 + 0% + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsName_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsName_month.xml index c234bed59e9..161d8ffeaeb 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsName_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsName_month.xml @@ -1,2 +1,12 @@ - \ No newline at end of file + + + + 1 + 1 + 1 + 0 + 0 + 0% + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsSku_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsSku_month.xml index c234bed59e9..c5ee399492c 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsSku_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getItemsSku_month.xml @@ -1,2 +1,12 @@ - \ No newline at end of file + + + + 1 + 1 + 1 + 0 + 0 + 0% + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml index eafb5116716..126898a098f 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.getVisitsUntilConversion_month.xml @@ -2,7 +2,7 @@ - 21 + 23 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.get_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.get_month.xml index 3480f5fdafa..487d2fe91c8 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Goals.get_month.xml @@ -1,7 +1,7 @@ - 21 - 21 - 95.45 - 105 + 23 + 23 + 95.83 + 115 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getAll_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getAll_month.xml index 99048045e36..d8817d7cd64 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getAll_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getAll_month.xml @@ -2,10 +2,10 @@ - 22 - 25 - 22 - 105 + 24 + 27 + 24 + 115 100% 100% 100% diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getOne_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getOne_month.xml index 40187c1ae48..30ec637970a 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getOne_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__MultiSites.getOne_month.xml @@ -1,9 +1,9 @@ - 22 - 25 - 22 - 105 + 24 + 27 + 24 + 115 100% 100% 100% diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Provider.getProvider_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Provider.getProvider_month.xml index 8313b829362..5eec41dedf0 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Provider.getProvider_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Provider.getProvider_month.xml @@ -2,13 +2,13 @@ - 22 - 25 + 24 + 27 3 305 - 20 - 21 - 22 + 22 + 23 + 24 http://piwik.org/faq/general/#faq_52 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getAll_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getAll_month.xml index c234bed59e9..5366ba283b3 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getAll_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getAll_month.xml @@ -1,2 +1,41 @@ - \ No newline at end of file + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + 3 + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + 3 + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsitesUrls_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsitesUrls_month.xml index f5722c2b947..13002b20179 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsitesUrls_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsitesUrls_month.xml @@ -1,2 +1,2 @@ -0 \ No newline at end of file +2 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsites_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsites_month.xml index f5722c2b947..13002b20179 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsites_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getNumberOfDistinctWebsites_month.xml @@ -1,2 +1,2 @@ -0 \ No newline at end of file +2 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getRefererType_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getRefererType_month.xml index 4acaf6cf584..2af36d17dda 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getRefererType_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getRefererType_month.xml @@ -18,4 +18,60 @@ 105 22 + + + 2 + 2 + 1 + 0 + 2 + + + 2 + 2 + 10 + + + 2 + 10 + 2 + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getWebsites_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getWebsites_month.xml index c234bed59e9..51a1e169f8d 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getWebsites_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__Referers.getWebsites_month.xml @@ -1,2 +1,63 @@ - \ No newline at end of file + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + + + + + + 1 + 1 + 1 + 0 + 1 + + + 1 + 1 + 5 + + + 1 + 5 + 1 + + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + + + + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCity_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCity_month.xml index 70685acddb2..146a03b570c 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCity_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCity_month.xml @@ -2,21 +2,21 @@ - 18 - 21 + 20 + 23 3 305 - 16 + 18 - 17 - 17 - 85 + 19 + 19 + 95 - 17 - 85 - 18 + 19 + 95 + 20 Unknown xx xx diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getContinent_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getContinent_month.xml index 52473135893..90e9302ad7a 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getContinent_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getContinent_month.xml @@ -21,21 +21,21 @@ - 5 - 5 + 7 + 7 1 0 - 5 + 7 - 5 - 5 - 25 + 7 + 7 + 35 - 5 - 25 - 5 + 7 + 35 + 7 Unknown diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCountry_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCountry_month.xml index 06961e716c8..64fc19dca98 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCountry_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getCountry_month.xml @@ -24,21 +24,21 @@ - 5 - 5 + 7 + 7 1 0 - 5 + 7 - 5 - 5 - 25 + 7 + 7 + 35 - 5 - 25 - 5 + 7 + 35 + 7 xx plugins/UserCountry/flags/xx.png 16 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getRegion_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getRegion_month.xml index 7452c8fa2ec..537d5117558 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getRegion_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserCountry.getRegion_month.xml @@ -2,21 +2,21 @@ - 18 - 21 + 20 + 23 3 305 - 16 + 18 - 17 - 17 - 85 + 19 + 19 + 95 - 17 - 85 - 18 + 19 + 95 + 20 xx xx Unknown diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml index 7326a8c90e6..915be1564a5 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserType_month.xml @@ -2,13 +2,13 @@ - 15 - 18 + 17 + 20 3 305 - 13 - 14 - 15 + 15 + 16 + 17 Webkit diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml index 101fd920bb7..ff0876738d9 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowserVersion_month.xml @@ -1,5 +1,17 @@ + + + 5 + 8 + 3 + 305 + 3 + 4 + 5 + plugins/UserSettings/images/browsers/CH.gif + Chrome 11.0 + 5 @@ -12,18 +24,6 @@ plugins/UserSettings/images/browsers/EP.gif Epiphany 2.30 - - - 4 - 7 - 3 - 305 - 2 - 3 - 4 - plugins/UserSettings/images/browsers/CH.gif - Chrome 11.0 - 3 @@ -96,4 +96,16 @@ plugins/UserSettings/images/browsers/SF.gif Safari 4.0 + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + plugins/UserSettings/images/browsers/SF.gif + Safari 5.0 + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowser_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowser_month.xml index ea27472629b..d470f4f74f1 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowser_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getBrowser_month.xml @@ -1,5 +1,16 @@ + + + 9 + 12 + 3 + 305 + 7 + 8 + 9 + plugins/UserSettings/images/browsers/CH.gif + 5 @@ -11,17 +22,6 @@ 5 plugins/UserSettings/images/browsers/EP.gif - - - 8 - 11 - 3 - 305 - 6 - 7 - 8 - plugins/UserSettings/images/browsers/CH.gif - 5 @@ -46,13 +46,13 @@ - 2 - 2 + 3 + 3 1 0 - 2 - 2 - 2 + 3 + 3 + 3 plugins/UserSettings/images/browsers/SF.gif \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml index 71f44fe2123..837580ece39 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getConfiguration_month.xml @@ -70,4 +70,24 @@ 1 1 + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getLanguage_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getLanguage_month.xml index 38b8a1a4522..619432c8a65 100644 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getLanguage_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getLanguage_month.xml @@ -2,12 +2,12 @@ - 22 - 25 + 24 + 27 3 305 - 20 - 21 - 22 + 22 + 23 + 24 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml index 3bf521f0512..da483051534 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getMobileVsDesktop_month.xml @@ -2,13 +2,13 @@ - 20 - 23 + 22 + 25 3 305 - 18 - 19 - 20 + 20 + 21 + 22 plugins/UserSettings/images/screens/normal.gif diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml index 12afdb5adcb..6779e9aa405 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOSFamily_month.xml @@ -13,24 +13,24 @@ - 7 - 7 + 8 + 8 1 0 - 7 - 7 - 7 - plugins/UserSettings/images/os/WI7.gif + 8 + 8 + 8 + plugins/UserSettings/images/os/WXP.gif - 5 - 8 + 6 + 9 3 305 - 3 - 4 - 5 + 4 + 5 + 6 plugins/UserSettings/images/os/MAC.gif diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOS_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOS_month.xml index 834b99cbf1d..3f6f85b4f4a 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOS_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getOS_month.xml @@ -26,13 +26,13 @@ - 5 - 8 + 6 + 9 3 305 - 3 - 4 - 5 + 4 + 5 + 6 plugins/UserSettings/images/os/MAC.gif Mac OS @@ -48,4 +48,16 @@ plugins/UserSettings/images/os/AND.gif Android + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + plugins/UserSettings/images/os/WXP.gif + Win XP + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getPlugin_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getPlugin_month.xml index 92546ec333e..95676b0900e 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getPlugin_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getPlugin_month.xml @@ -2,40 +2,46 @@ - 0 - 0% + 2 + 10.5% plugins/UserSettings/images/plugins/cookie.gif - - - 0 - 0% - plugins/UserSettings/images/plugins/director.gif - - 0 - 0% + 2 + 10.5% plugins/UserSettings/images/plugins/flash.gif - - - 0 - 0% - plugins/UserSettings/images/plugins/gears.gif - - 0 - 0% + 2 + 10.5% plugins/UserSettings/images/plugins/java.gif + + + 1 + 5.3% + plugins/UserSettings/images/plugins/director.gif + + + + 1 + 5.3% + plugins/UserSettings/images/plugins/gears.gif + - 0 - 0% + 1 + 5.3% plugins/UserSettings/images/plugins/pdf.gif + + + 1 + 5.3% + plugins/UserSettings/images/plugins/windowsmedia.gif + 0 @@ -54,10 +60,4 @@ 0% plugins/UserSettings/images/plugins/silverlight.gif - - - 0 - 0% - plugins/UserSettings/images/plugins/windowsmedia.gif - \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getResolution_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getResolution_month.xml index d72a7208921..8748a04c891 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getResolution_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getResolution_month.xml @@ -10,4 +10,24 @@ 21 22 + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getWideScreen_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getWideScreen_month.xml index ba8027ec224..5637d8a4586 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getWideScreen_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__UserSettings.getWideScreen_month.xml @@ -11,4 +11,26 @@ 22 plugins/UserSettings/images/screens/unknown.gif + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + plugins/UserSettings/images/screens/normal.gif + + + + 1 + 1 + 1 + 0 + 1 + 1 + 1 + plugins/UserSettings/images/screens/wide.gif + \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitFrequency.get_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitFrequency.get_month.xml index a1c52e41ac0..136fde34158 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitFrequency.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitFrequency.get_month.xml @@ -1,12 +1,12 @@ - 0 - 0 - 0 + 1 + 1 + 1 0 - 0 - 0 - 0% - 0 + 1 + 1 + 100% + 1 0 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml index 76295199237..f06bbb064ac 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getByDayOfWeek_month.xml @@ -12,7 +12,11 @@ - 0 + 2 + 2 + 2 + 2 + 2 3 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml index f3a2a11be05..0492e7e2a68 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerLocalTime_month.xml @@ -82,13 +82,13 @@ - 4 - 4 + 5 + 5 1 0 - 4 - 4 - 4 + 5 + 5 + 5 @@ -122,13 +122,13 @@ - 0 - 0 - 0 + 1 + 1 + 1 0 - 0 - 0 - 0 + 1 + 1 + 1 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml index 9cdec997087..beae477c357 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitTime.getVisitInformationPerServerTime_month.xml @@ -42,13 +42,22 @@ - 0 - 0 - 0 + 2 + 2 + 1 0 - 0 + 2 0 - 0 + + + 2 + 2 + 10 + + + 2 + 10 + 2 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml index 173db632504..0721d82d145 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByDaysSinceLast_month.xml @@ -2,7 +2,7 @@ - 22 + 23 @@ -58,6 +58,6 @@ - 0 + 1 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml index a5e21f10806..9398bbf5281 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsByVisitCount_month.xml @@ -2,7 +2,7 @@ - 22 + 24 100% diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml index bb68bd0e633..a3bde0ed6d2 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerPage_month.xml @@ -2,7 +2,7 @@ - 20 + 22 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml index c4c524be4d2..2c6a6903691 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitorInterest.getNumberOfVisitsPerVisitDuration_month.xml @@ -2,7 +2,7 @@ - 20 + 22 diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getActions_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getActions_month.xml index 4c77f1f6e60..40bd2e592a5 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getActions_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getActions_month.xml @@ -1,2 +1,2 @@ -25 \ No newline at end of file +27 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml index 150341e14d8..8ed00bd6289 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getBounceCount_month.xml @@ -1,2 +1,2 @@ -20 \ No newline at end of file +22 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml index 8ed00bd6289..5154fe8a288 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getUniqueVisitors_month.xml @@ -1,2 +1,2 @@ -22 \ No newline at end of file +24 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml index 738d0b74ef1..f832b0e0c74 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisitsConverted_month.xml @@ -1,2 +1,2 @@ -21 \ No newline at end of file +23 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml index 8ed00bd6289..5154fe8a288 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.getVisits_month.xml @@ -1,2 +1,2 @@ -22 \ No newline at end of file +24 \ No newline at end of file diff --git a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.get_month.xml b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.get_month.xml index 33835769551..7eea85710e2 100755 --- a/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.get_month.xml +++ b/tests/PHPUnit/Integration/expected/test_ImportLogs__VisitsSummary.get_month.xml @@ -1,13 +1,13 @@ - 22 - 22 - 25 - 21 - 20 + 24 + 24 + 27 + 23 + 22 305 3 - 91% + 92% 1.1 - 14 + 13 \ No newline at end of file diff --git a/tests/resources/fake_logs_replay.log b/tests/resources/fake_logs_replay.log new file mode 100644 index 00000000000..a9d0a192374 --- /dev/null +++ b/tests/resources/fake_logs_replay.log @@ -0,0 +1,6 @@ +- - - [15/Aug/2012:06:18:38 +0200] "GET /piwik.php?idsite=1&rec=1&apiv=1&rand=1636495582&_id=e4002ba0f2c2dd70&fla=1&java=1&dir=0&qt=0&realp=0&pdf=0&wma=0&gears=0&ag=0&h=12&m=34&s=6&res=1024x768&cookie=1&_cvar=%7B%225%22%3A%5B%22VisitorType%22%2C%22NewLoggedOut%22%5D%7D&cvar=%7B%223%22%3A%5B%22_pks%22%2C%22SKU2%22%5D%2C%224%22%3A%5B%22_pkn%22%2C%22PRODUCT+name%22%5D%2C%225%22%3A%5B%22_pkc%22%2C%22Electronics+%26+Cameras%22%5D%7D&url=http%3A%2F%2Fexample.org%2Findex.htm&urlref=&action_name=incredible+title%21&urlref=http%3A%2F%2Fpiwik.org%2Fcontribute% HTTP/1.1" 200 43 "http://forum.piwik.org/read.php?2,76977" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1" +- - - [15/Aug/2012:06:30:13 +0200] "GET /piwik.php?action_name=Piwik%20Forums&idsite=1&rec=1&r=136285&h=8&m=0&s=47&url=http%3A%2F%2Fforum.piwik.org%2Fregister.php%3F0%2Capprove%3D9a94a02145599&urlref=http%3A%2F%2Fsn110w.snt110.mail.live.com%2Fmail%2FInboxLight.aspx%3Fn%3D184083971&_id=0290799d35c0f2ba&_idts=1306645141&_idvc=1&_idn=0&_refts=0&_viewts=1306645141&pdf=1&qt=0&realp=0&wma=1&dir=1&fla=1&java=1&gears=1&ag=0&res=1280x800&cookie=1&_cvar=%7B%223%22%3A%5B%22Forum%20status%22%2C%22Anonymous%22%5D%7D HTTP/1.1" 200 43 "http://forum.piwik.org/register.php?0,approve=9a94a02145599" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.71 Safari/534.24" +- - - [15/Aug/2012:06:18:38 +0200] "GET /piwik.php?idsite=2&rec=1&apiv=1&rand=837354687&_id=e4002ba0f2c2dd70&fla=1&java=1&dir=0&qt=0&realp=0&pdf=0&wma=0&gears=0&ag=0&h=12&m=34&s=6&res=1024x768&cookie=1&_cvar=%7B%225%22%3A%5B%22VisitorType%22%2C%22NewLoggedOut%22%5D%7D&cvar=%7B%223%22%3A%5B%22_pks%22%2C%22SKU+VERY+nice+indeed%22%5D%2C%224%22%3A%5B%22_pkn%22%2C%22PRODUCT+name%22%5D%7D&url=http%3A%2F%2Fexample.org%2Findex.htm&urlref=&action_name=Another+Product+page+with+no+category&urlref=http%3A%2F%2Fpiwik.org%2Fcontribute% HTTP/1.1" 200 43 "http://forum.piwik.org/read.php?2,76977" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1" +175.41.192.40 - - [09/Aug/2012:10:10:38 +0200] "GET /blog/category/meta/ HTTP/1.1" 200 3574 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) RockMelt/0.9.58.494 Chrome/11.0.696.71 Safari/534.24" +- - - [15/Aug/2012:06:18:38 +0200] "GET /piwik.php?idsite=3&rec=1&apiv=1&rand=1976958961&_id=e4002ba0f2c2dd70&fla=1&java=1&dir=0&qt=0&realp=0&pdf=0&wma=0&gears=0&ag=0&h=12&m=34&s=6&res=1024x768&cookie=1&_cvar=%7B%225%22%3A%5B%22VisitorType%22%2C%22NewLoggedOut%22%5D%7D&cvar=%7B%225%22%3A%5B%22_pkc%22%2C%22Electronics+%26+Cameras%22%5D%7D&url=http%3A%2F%2Fexample.org%2Findex.htm&urlref=&action_name=Looking+at+Electronics+%26+Cameras+page+with+a+page+level+custom+variable&urlref=http%3A%2F%2Fpiwik.org%2Fcontribute% HTTP/1.1" 200 43 "http://forum.piwik.org/read.php?2,76977" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1" +175.41.192.40 - - [09/Aug/2012:10:11:30 +0200] "GET /faq/ HTTP/1.1" 200 3574 "-" "Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; HTC Vision Build/GRI40) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" \ No newline at end of file