-
Notifications
You must be signed in to change notification settings - Fork 118
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
#818 added multimodules #857
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.
We need also script for building and coping apks to fixtures/tmp/apk
.
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { |
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.
The module name is fullyIgnoredModule but this test is not ignored
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.
nice catch
app: apk/818/app-multiple-error-debug.apk | ||
test: apk/818/app-multiple-error-debug-androidTest.apk | ||
num-flaky-test-attempts: 2 | ||
async: false | ||
environment-variables: | ||
coverage: true | ||
coverageFilePath: /sdcard/ | ||
clearPackageData: true | ||
performance-metrics: false | ||
record-video: false | ||
test-targets: | ||
- notAnnotation org.junit.Ignore | ||
use-orchestrator: true | ||
flank: | ||
disable-sharding: false | ||
max-test-shards: 2 | ||
num-test-runs: 1 | ||
run-timeout: 20m | ||
max-test-shards: 5 | ||
legacy-junit-result: 'false' | ||
additional-app-test-apks: | ||
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/app-single-success-debug-androidTest.apk | ||
- test: ./src/test/kotlin/ftl/fixtures/tmp/apk/app-multiple-flaky-debug-androidTest.apk | ||
- test: ../test_app/apks/invalid.apk | ||
- test: apk/818/app-multiple-error-debug-androidTest.apk | ||
- test: apk/818/app-multiple-success-debug-androidTest.apk | ||
- test: apk/818/fullyIgnoredModule-debug-androidTest.apk | ||
- test: apk/818/testModule-debug-androidTest.apk | ||
- test: apk/818/testModule1-debug-androidTest.apk | ||
- test: apk/818/testModule10-debug-androidTest.apk | ||
- test: apk/818/testModule11-debug-androidTest.apk | ||
- test: apk/818/testModule12-debug-androidTest.apk | ||
- test: apk/818/testModule13-debug-androidTest.apk | ||
- test: apk/818/testModule14-debug-androidTest.apk | ||
- test: apk/818/testModule15-debug-androidTest.apk | ||
- test: apk/818/testModule16-debug-androidTest.apk | ||
- test: apk/818/testModule17-debug-androidTest.apk | ||
- test: apk/818/testModule18-debug-androidTest.apk | ||
- test: apk/818/testModule19-debug-androidTest.apk | ||
- test: apk/818/testModule2-debug-androidTest.apk | ||
- test: apk/818/testModule3-debug-androidTest.apk | ||
- test: apk/818/testModule4-debug-androidTest.apk |
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 be better to add new config instead of modifying current.
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.
fixed
|
fi | ||
|
||
mkdir -p ../test_runner/src/test/kotlin/ftl/fixtures/tmp/apks$path | ||
find multi-modules -type f -name "*.apk" -exec cp {} ../test_runner/src/test/kotlin/ftl/fixtures/tmp/apks$path \; |
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.
New line
@@ -0,0 +1 @@ | |||
/build |
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.
New line
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
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.
New line
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.example.multiapp", appContext.packageName) | ||
} | ||
} |
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.
New line
</activity> | ||
</application> | ||
|
||
</manifest> |
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.
New line
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@id/textview_first" /> | ||
</androidx.constraintlayout.widget.ConstraintLayout> |
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.
New line
<color name="colorPrimary">#6200EE</color> | ||
<color name="colorPrimaryDark">#3700B3</color> | ||
<color name="colorAccent">#03DAC5</color> | ||
</resources> |
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.
New line
|
||
<string name="hello_first_fragment">Hello first fragment</string> | ||
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string> | ||
</resources> |
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.
New line
|
||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> | ||
|
||
</resources> |
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.
New line
fun addition_isCorrect() { | ||
assertEquals(4, 2 + 2) | ||
} | ||
} |
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.
New line
let's not have merge requests in pull requests 🙂 Instead you can setup rebase
|
Next time I will avoid it |
* #818 added multi modules with tests Co-authored-by: Janek Góral <[email protected]>
configuration similiar to client in #818
Test Plan
Run
generateTestApkAndCopyToFixtures.sh <path_name>
and check that many modules apk is added totest_runner/src/test/kotlin/ftl/fixtures/tmp/apks/<path_name>
Checklist