You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diosmosis opened this issue
Oct 20, 2014
· 2 comments
Labels
TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
Currently system tests (through Fixtures) will invoke many HTTP requests via curl to track visits. Instead of doing this in EVERY system test, we should create two new system tests that use HTTP (one for the normal HTTP tracker API, and another for bulk tracking). Then change all fixtures to use LocalTracker. This will hopefully speed up tests and make it easier to maintain the old system tests.
TODO:
create HttpTrackingTest. We should look through all existing fixtures and see how the HTTP API is tested and make sure those tests that require being tested through an HTTP request are replicated in the new test.
create BulkTrackingTest. Do the same as above just for bulk tracking requests only.
switch to LocalTracker in all Fixtures. Should probably be enough to change Fixture::getTracker
make sure there are no major drops in code coverage
Notes:
LocalTracker was written a long time ago as a hack to improve test speed. Sometime in the future when the tracker is refactored, we should switch to doing something like:
$tracker = new \Piwik\Tracker();
$tracker->track(...);
CC-ing @tsteur since you've been thinking about refactoring tests for a while now.
The text was updated successfully, but these errors were encountered:
diosmosis
added
the
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
label
Oct 20, 2014
I doubt it will make it that much faster, in my past experience it was a tiny bit faster than using a bulk tracking request. Anyway that's more of a side effect, the main improvement is better scoped tests.
I don't consider this the only thing to do to the tests, but I think it's a good first step to take to clean up the test suites, w/o losing our existing coverage.
TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.wontfixIf you can reproduce this issue, please reopen the issue or create a new one describing it.
Currently system tests (through Fixtures) will invoke many HTTP requests via curl to track visits. Instead of doing this in EVERY system test, we should create two new system tests that use HTTP (one for the normal HTTP tracker API, and another for bulk tracking). Then change all fixtures to use LocalTracker. This will hopefully speed up tests and make it easier to maintain the old system tests.
TODO:
Notes:
CC-ing @tsteur since you've been thinking about refactoring tests for a while now.
The text was updated successfully, but these errors were encountered: