Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand unit test coverage for UserSettings #1165

Closed
robocoder opened this issue Feb 20, 2010 · 3 comments
Closed

Expand unit test coverage for UserSettings #1165

robocoder opened this issue Feb 20, 2010 · 3 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@robocoder
Copy link
Contributor

Unit tests were added in [1850] but is incomplete. Propose to provide 100% coverage for the user agent strings that Piwik is expected to parse. A large sampling of user agent strings should help in identifying deficiencies in the parser.

For example, the following is mis-identified as Firefox 3.0:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en; rv:1.9.0.10pre) Gecko/2009041800 Camino/2.0b3pre (like Firefox/3.0.10pre)

@mattab
Copy link
Member

mattab commented Feb 22, 2010

I think in an ideal world we could aim for a 100% coverage of user agent strings.

However I am afraid that this will lead to a very complicated user agent parsing code. We need to keep this code simple (to be maintainable) and also fast (as it is executed in the Tracker).

I vote for expanding the unit tests to the 95% top user agents, as well as ensuring accurate detection of mobile devices (iphone VS ipod touch VS blackberry etc.) - if this is not already the case.

But I vote for won't fix on the 100% test coverage that would lead to a complex parsing code which is not necessary for Piwik.

@robocoder
Copy link
Contributor Author

Agreed: 100% test coverage for the browsers that we've already identified in UserAgentParser.php; not 100% of all known browsers in the history of the Internet.

@robocoder
Copy link
Contributor Author

(In [1859]) fixes #1165 - expand UserSettings unit test coverage;
fixes #1167 - fix UserAgentParser issues

@robocoder robocoder added this to the Piwik 0.5.5 milestone Jul 8, 2014
@robocoder robocoder self-assigned this Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants