Android-components: Consider moving WebserverRule to support-test

Created on 25 Jul 2019  ·  3Comments  ·  Source: mozilla-mobile/android-components

WebserverRule runs a webserver during tests and serves files from the assets folder in the test package. It's generic enough to be helpful for a bunch of apps.

https://github.com/mozilla-mobile/android-components/blob/master/samples/browser/src/androidTest/java/org/mozilla/samples/browser/rules/WebserverRule.kt

help wanted ⌨️ code ✅ testing

Most helpful comment

@csadilek I'll fix this tomorrow morning. Thanks,

All 3 comments

I'm working on this.

@royang51 unfortunately, your fix here causes the smokeTests to fail:

See TC: https://tools.taskcluster.net/groups/Imn6yolnTneNMS0RSqUFKg/tasks/Xbk07HodQminSpRpAT9-Dw/runs/0/logs/public%2Flogs%2Flive.log

One problem is that we need to use androidTestImplemention instead of testImplementation when declaring the dependency for UI tests. I think we also need to move the WebserverRule to support-android-test (instead of support-test), because we'll get into classpath issues with Robolectric otherwise. You can confirm by running the SmokeTests locally.

We should have caught this in the PR build, but the UI tests don't seem to run for those builds. We'll look into that too.

@csadilek I'll fix this tomorrow morning. Thanks,

Was this page helpful?
0 / 5 - 0 ratings