Skip to content

Expect this library's own test package in ExampleInstrumentedTest - #16

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/example-instrumented-test
Oct 27, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/example-instrumented-test

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

不具合

ExampleInstrumentedTest.useAppContext が常に失敗していた。

org.junit.ComparisonFailure: expected:<com.mapconductor.[googlemaps]> but was:<com.mapconductor.[mapbox.test]>

原因

android-for-googlemaps からコピーしたテンプレートのままで、期待値が com.mapconductor.googlemaps だった。ライブラリの計装テストはテスト用 APK の中で動くので、targetContext.packageName は com.mapconductor.mapbox.test になる。

修正

期待値を com.mapconductor.mapbox.test にした。1 行だけ。

確認

MapConductor/tests の ./run.sh android -p mapbox -r mapbox=fix/example-instrumented-test でエミュレータ(mc_test)上の connectedDebugAndroidTest: 4 件すべて成功(このテスト + MapboxGroundImageStyleChangeTest の 3 件)。develop では同じ実行で 3/4 だった。

The template was copied from android-for-googlemaps and still expected
com.mapconductor.googlemaps, so connectedAndroidTest always failed here.
A library's instrumented tests run in its test APK, whose package is
com.mapconductor.mapbox.test.
@wf9a5m75
wf9a5m75 merged commit 65c01bf into develop Oct 27, 2026
2 checks passed
@wf9a5m75
wf9a5m75 deleted the fix/example-instrumented-test branch October 27, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant