-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff!
# pull generated images from the device | ||
adb pull "`adb shell 'printenv EXTERNAL_STORAGE' | tr -d '\r'`/mapbox" platform/android/build/render-test | ||
# copy expected result and run pixelmatch | ||
python platform/android/scripts/run-render-test.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this depends on the pixelmatch node module being installed, should this target depend on $(BUILD_DEPS)
? Or does it do that indirectly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure how that was enforced, will look at integrating $(BUILD_DEPS)
# pull generated images from the device | ||
adb pull "`adb shell 'printenv EXTERNAL_STORAGE' | tr -d '\r'`/mapbox" platform/android/build/render-test | ||
# copy expected result and run pixelmatch | ||
python platform/android/scripts/run-render-test.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any specific python dependencies?
|
||
import com.mapbox.mapboxsdk.testapp.activity.render.RenderTestActivity; | ||
|
||
public class SnapshotterIdlingResource implements IdlingResource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In c9c2e96 I'm taking a push approach which significantly speeds up the tests since it idles shorter before being ready. Might be beneficial here?
protected void onStop() { | ||
super.onStop(); | ||
for (MapSnapshotter snapshotter : mapSnapshotterList) { | ||
snapshotter.cancel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be strictly needed anymore since the snapshotters are deletable by the gc collector thread now. Anything specific you run into?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do some additional tests, I remember hitting a freeze but could be fixed in meantime.
2477cc6
to
89e21d4
Compare
36607d1
to
9fd4aa3
Compare
9fd4aa3
to
1da8f0c
Compare
This PR adds an initial version of Android render testing using PixelMatch.
Execution of these tests on a armeabi-v7a compatible can be started with:
This will result on generating images based on the test input file:
After generating and pulling them from the device, we use PixelMatch to detect render differences:
The base set of expected images used can be found here and can be updated with: