[
https://issues.apache.org/jira/browse/DMAP-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13864091#comment-13864091
]
Bertrand Delacretaz commented on DMAP-29:
-----------------------------------------
At http://svn.apache.org/r1556176 I have adapted the tests so that divergences
from the expected device IDs are listed in the test file.
The java build tests now say (this example was created with
-Ddevicemap.max.tests=0 to include all test cases):
{code}
[main] WARN org.apache.devicemap.client.RefDataTest -
All tests passed but 29586 IDs did not match or were not found, as expected
according to DMAP_JAVA_DIFFERS marks in the test file
[main] WARN org.apache.devicemap.client.RefDataTest -
Out of 51175 collected tests, only 21589 were successful, 29586 failed or were
ignored
Tests run: 51175, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 8.652 sec...
{code}
Where 29586 is the number of lines in
data/test-data/src/main/resources/test-data/dmap_20130522.txt that have a
DMAP_JAVA_DIFFERS field, as in this example:
{code}
# Example where we expect to find no ID
Nokia7370 DMAP_EXPECT id:Nokia7370 DMAP_JAVA_DIFFERS id:DMAP_NOT_FOUND
# Example where we expect to find a different ID, "desktopDevice", than the
actual "HTC"
HTC-P3600/1.0 Opera 9.5 DMAP_EXPECT id:HTC DMAP_JAVA_DIFFERS id:desktopDevice
{code}
With this I think we have a decent way of evolving the test file to reflect
imperfect results, while having a clear trace of which results are not as
expected.
> Automated tests for the devicemapjava module
> --------------------------------------------
>
> Key: DMAP-29
> URL: https://issues.apache.org/jira/browse/DMAP-29
> Project: DeviceMap
> Issue Type: Improvement
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
>
> The devicemapjava module needs automated tests, we can reuse the existing
> openddr/test-data module which contains expected mappings of User-Agent
> values to device properties.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)