The purpose of this document is to establish a set of guidelines for testing the app during dependency updates. Specifically, it outlines a series of test instructions that should be adhered to when updating a dependency.
This document focuses on a set of screens that are essential to the app's functionality. The concept is that, to ensure an update's safety, there's no need to test every screen using that dependency; testing the core ones should suffice.
Engineers should only update this document if new core screens are added, potentially introducing regressions if left untested, or if an existing core screen is removed, rendering the dependency update redundant. If an engineer observes that a core screen has been updated, they should revise the testing instructions as part of the dependency update pull request. This makes keeping this document up-to-date a low-effort and minimally maintenance-intensive task.
No engineer should blindly trust and strictly adhere to the testing instructions provided in this document. These instructions serve as a starting point and a reminder for engineers working on a dependency update to ensure they test the core screens. Engineers should exercise their best judgment and conduct additional testing if they deem it necessary.
Some dependency updates are quite broad and apply to the entire app, making it challenging to
provide specific testing instructions (e.g., fragment
, appcompat
, compose
, etc.). In such
cases, engineers should use their best judgment to perform a smoke test on the entire app to ensure
its correctness. Engineers should rely on their intuition to identify which dependencies warrant
testing instructions. Therefore, this document should be regarded as a set of helpful guidelines
rather than strict requirements.
- Plugin
- AndroidX Jetpack
- AndroidX/Google
- Firebase/Google
- Tool
- Other Core
- Other UI
- Smoke Test
- Special
ℹ️ Every test instruction should be prefixed with one of the following:
- [JP/WP] This test applies to both, the
Jetpack
andWordPress
apps. - [JP] This test applies to the
Jetpack
app only. - [WP] This test applies to the
WordPress
app only.
Navigation [androidx-navigation]
1. [JP/WP] Image Editing Flow [libs:image-editor]
- Add a new
blog
post. - Add a new
image
block. - Choose an image and wait for it to be uploaded within the
image
block. - Click on the
media options
of this image (top right) and then clickedit
. - Verify that the
Edit Image
screen is shown and functioning as expected. - Crop the image and click the
done
menu option (top right). - Make sure the image is updated accordingly.
WorkManager [androidx-work]
1. [JP/WP] UploadWorker.kt
- Go to
Post
screen. - Create a new post and publish it.
- Turn device offline.
- Go to this post and update it.
- Notice the warning message:
We'll publish the post when your device is back online.
- Turn device online.
- Notice this post being automatically uploaded.
- Open this post on a web browser and verify the post is indeed updated.
2. [JP] ReminderWorker.kt
- Go to
Site Settings
screen. - Find the
Blogging
section, click onReminders
, toggle-on every day and click onUpdate
. - Notice the
All set!
bottom sheet appearing, clickDone
. - Close the app, preferably swipe the app off.
- Go to the device's
Settings
app, find theDate & Time
section, turnAutomatic date & time
off. - Set the device's date to a day after today.
- Open the app.
- Verify the
Blogging Reminders
notification appearing. For example, the notification title could beDaily Prompt
, while the notification description something likeIs there anything you feel too old to do anymore?
.
3. [JP] LocalNotificationWorker.kt
- TODO
- TODO
- TODO
4. [JP] WeeklyRoundupWorker.kt
- TODO
- TODO
- TODO
Preference (AndroidX) [androidx-preference]
1. [JP] Notifications Settings [NotificationsSettingsFragment.java]
- Go to
Notifications
tab. - Click on the
Gear
setting button (top-right). - Verify that the
Notification Settings
screen is displayed. - Click on each of the settings within the
Notification Settings
settings screen and verify that every setting works as expected.
Preference (Android) [N/A]
ℹ️ Note that this is not an actual dependency, it being part of the Android
SDK, that it is
deprecated and will be migrated to its AndroidX
equivalent in the future. [Issue]
1. [JP/WP] Account Settings [AccountSettingsFragment.kt]
- Go to
Me
tab. - Click on the
Account Settings
button. - Verify that the
Account Settings
screen is displayed. - Click on each of the settings within the
Account Settings
screen and verify that every setting works as expected.
2. [JP/WP] App Settings [AppSettingsFragment.java]
- Go to
Me
tab. - Click on the
App Settings
button. - Verify that the
App Settings
screen is displayed. - Click on each of the settings within the
App Settings
screen and verify that every setting works as expected, including the inner settings like thePrivacy Settings
. - Do the same for the
Debug Settings
screens.
3. [JP/WP] Site Settings [SiteSettingsFragment.java]
- Go to
Site Settings
screen. - Verify that the
Site Settings
screen is displayed. - Click on each of the settings within the
Site Settings
screen and verify that every setting works as expected.
4. [JP/WP] Jetpack Settings - Security [JetpackSecuritySettingsFragment.java]
ℹ️ Prerequisite: To have this setting displayed you must have a Jetpack connected site.
- Go to
Site Settings
screen. - Find the
Jetpack Settings
section and click onSecurity
. - Verify that the
Security
setting screen is displayed. - Click on each of the settings within the
Security
settings screen and verify that every setting works as expected.
5. [JP] Notifications Settings [NotificationsSettingsFragment.java]
- Go to
Notifications
tab. - Click on the
Gear
setting button (top-right). - Verify that the
Notification Settings
screen is displayed. - Click on each of the settings within the
Notification Settings
settings screen and verify that every setting works as expected.
6. [JP/WP] Edit Post Screen [EditPostActivity.java]
ℹ️ Editing a new post uses PreferenceManager
to setDefaultValues(...)
for Account Settings
.
- Go to
Post
screen. - Edit a new post, add a few of the main blocks and verify that everything is workings as expected.
ExoPlayer [google-exoplayer]
1. [JP/WP] Image Preview
- Go to
Post
screen. - Edit a new post, add an
Image
block and then an image into it. - Having added an image to the image block, click on the image block and then again on the image within.
- This will launch
Media Preview
screen and the image should be previewed. - Verify that the
Image Preview
is working as expected, that rotating the device works and finally that clicking back navigates you back to the post edit screen.
2. [JP/WP] Video Preview
- Go to
Post
screen. - Edit a new post, add an
Video
block but don't add a video into it just yet. - Find the
Video
block, click onADD VIDEO
and thenChoose from device
to choose a video. - From the list of available videos to choose from screen, click on the
Play
button on the center on any video. FYI: If you don't click on the center, this video will get selected for use, but it won't play. - This will launch
Media Preview
screen and the video should start playing. - Verify that the
Video Preview
is working as expected, that rotating the device works and finally that clicking back navigates you back to the list of available videos to choose from screen.
Webkit [androidx-webkit]
1. [TODO] TODO
- TODO
- TODO
- TODO
Firebase [google-firebase-bom]
1. [JP/WP] Push Notification on Post Being Published [GCMMessageService.java]
- Add a new
blog
post. - Add any number of blocks.
- Publish the post.
- Verify that, on post being published, you get a push notification with the post's title, which, when you click on it, navigates you to the 'Notifications Detail' screen for this post.
FirebaseIid [google-firebase-iid]
1. [TODO] TODO
- TODO
- TODO
- TODO
MLKitBarcodeScanning [google-mlkit-barcode-scanning-main]
1. [JP] Scan Login Code
Step.1:
- Build and install the
Jetpack
app (note that you don't need a release build, a debug build will suffice). - Log in to the
Jetpack
app with aWP.com
account (note that you need to use a nonA8C
account and a non2FA
enabled account). - Navigate to the
Me
screen (click on avatar at top-right). - (STOP)
Step.2:
- Head over to your desktop and open a web browser (note that using an incognito tab works best).
- Browse to
wordpress.com
(note that if you are logged-in, log-out first). - Tap the
Log In
link (top-right). - Tap the
Login via the mobile app
link in the list of options below the mainContinue
button (bottom-middle). - Verify you are on the
Login via the mobile app
view andUse QR Code to login
is shown, along with a QR code for you to scan. - (STOP)
Step.3:
- Head back to your mobile.
- Tap the
Scan Login Code
item on theMe
screen you are currently at. - Scan the QR code on the web browser.
- Follow the remaining prompts on your mobile to log in to WordPress on your web browser (desktop), verify that you have successfully logged-in and are able to use WordPress as expected.
PlayServicesAuth [google-play-services-auth]
ℹ️ These set of testing instructions are for internal contributors only, which can have access to
upload an .aab
to Google Play Store. As such, external contributors can't possibly test this
update.
1. [JP] Google Sign-in on Jetpack
ℹ️ Prerequisite: If you don't have access to upload an .aab
to Google Play Store for
Jetpack - Website Builder
, post a request to +systemsrequests
.
- Check-out this branch and edit the
version.properties
file to pick a dummyversionName
andversionCode
, preferable using a higherversionCode
to the existing one.- I recommend using a
versionCode
of1000000001
and above. - I recommend using an explicit
versionName
likedeps-update-google-play-services-20-4-1
(similar to the name of this branch itself)
- I recommend using a
- Build the release
.aab
locally using this command:./gradlew bundleJetpackVanillaRelease
- Upload the locally generated
.aab
, found within theWordPress/build/outputs/bundle/jetpackVanillaRelease/
build folder, and into Google Play Console (Jetpack - Website Builder
) via:App Bundle Explorer
>Upload new version
(top-right)- Wait for the upload to complete, then via this newly uploaded app version, navigation to the
Downloads
, on theAssets
section, find theSigned, universal APK
and click theDownload
icon (middle-right) to download the signed.apk
locally. - After having this signed
.apk
downloaded locally, go ahead and click on theDelete app bundle
to delete the this app bundle from the list of available app bundles.
- Wait for the upload to complete, then via this newly uploaded app version, navigation to the
- Install this download signed
.apk
using this command:adb install -r Downloads/jpandroid-deps-update-google-play-services-20-4-1-Signed.apk
(note that you can use./tools/rename_apk_aab.sh
to rename the download signed.apk
) - If you were already logged-in to Jetpack, log-out and log-in again using the
Continue with Google
button (note that you need to use a nonA8C
account to be able to complete this flow). - Verify that the Google sign-in works, that you have successfully logged-in and are able to use the app as expected.
2. [WP] Google Sign-in on WordPress
ℹ️ Prerequisite: If you don't have access to upload an .aab
to Google Play Store for
WordPress - Website Builder
, post a request to +systemsrequests
.
- Check-out this branch and edit the
version.properties
file to pick a dummyversionName
andversionCode
, preferable using a higherversionCode
to the existing one.- I recommend using a
versionCode
of1000000001
and above. - I recommend using an explicit
versionName
likedeps-update-google-play-services-20-4-1
(similar to the name of this branch itself)
- I recommend using a
- Build the release
.aab
locally using this command:./gradlew bundleWordPressVanillaRelease
- Upload the locally generated
.aab
, found within theWordPress/build/outputs/bundle/wordpressVanillaRelease/
build folder, and into Google Play Console (WordPress - Website Builder
) via:App Bundle Explorer
>Upload new version
(top-right)- Wait for the upload to complete, then via this newly uploaded app version, navigation to the
Downloads
, on theAssets
section, find theSigned, universal APK
and click theDownload
icon (middle-right) to download the signed.apk
locally. - After having this signed
.apk
downloaded locally, go ahead and click on theDelete app bundle
to delete the this app bundle from the list of available app bundles.
- Wait for the upload to complete, then via this newly uploaded app version, navigation to the
- Install this download signed
.apk
using this command:adb install -r Downloads/wpandroid-deps-update-google-play-services-20-4-1-Signed.apk
(note that you can use./tools/rename_apk_aab.sh
to rename the download signed.apk
) - If you were already logged-in to WordPress, log-out and log-in again using the
Continue with Google
button (note that you need to use a nonA8C
account to be able to complete this flow). - Verify that the Google sign-in works, that you have successfully logged-in and are able to use the app as expected.
PlayReview [google-play-review]
1. In app reviews
- Perform a clean install.
- Publish three (
AppReviewManager.TARGET_COUNT_POST_PUBLISHED + 1
) new posts or stories. - Verify that there are no crashes.
Zendesk [zendesk]
1. [JP] Zendesk Update [Tickets & Contact Support]
ℹ️ This test only works when testing with a normal, non-a8c user account.
- Go to
Me
tab ->Help
->Tickets
. - Verify that the
My tickets
Zendesk related screen opens and that it lists all of your tickets (or non if you don't have any yet). - Go back to the
Help
settings screen and then click onContact Support
. - Verify that the
Help
Zendesk related screen opens and that you are prompt toSend a message...
. - Type
Testing Zendesk X.Y.Z update, please ignore and thank you!
and then send your message. - After sending the first message, tap the
Contact support 📢
button to create the support ticket. - Go back to the
Help
settings screen and then click onTickets
again. - Verify that your previously sent message is listed in there and that you can click on it.
PS: You could also check your emails and verify that you got a
Thank you for contacting the WordPress.com support team! (#1234567)
email. - Verify that clicking on it navigates you to the inner screen where your message is shown as
Delivered
along with a predefined automatedmobile support
response message.
JSoup [jsoup]
1. [JP/WP] Classic Editor [Aztec]
ℹ️ Disable the Block Editor
before testing this. You can do so by going to Site Settings
->
Editor
section -> Use Block Editor
option and switch that off.
📝 Note that you might need to be on a business plan to have this Editor
section available as not
all sites have this option.
- Go to
Posts
screen and create a new post. - Add an
Image
,Video
and any other entry (likeParagraph
,Ordered List
,Quote
, etc). - Publish this newly created post.
- Verify that this newly created
Classic Editor
related post of yours is being displayed as expected, both when previewing it from within thePosts
andReader
screens. FYI: OnReader
, you will find you post within theFOLLOWING
tab.
2. [JP/WP] Block Editor [Gutenberg]
ℹ️ Enable the Block Editor
before testing this. You can do so by going to Site Settings
->
Editor
section -> Use Block Editor
option and switch that on.
📝 Note that you might need to be on a business plan to have this Editor
section available as not
all sites have this option.
- Go to
Posts
screen and create a new post. - Add an
Image
,Gallery
,Video
,Audio
,File
,Media Text
andCover
blocks to the post. - Publish this newly created post.
- Verify that this newly created
Block Editor
related post of yours is being displayed as expected, both when previewing it from within thePosts
andReader
screens. FYI: OnReader
, you will find you post within theFOLLOWING
tab.
3. [JP] Reader Post Details [ReaderPostRenderer.java]
- Go to
Reader
screen and click on various posts. - Verify that each and every post, along with all their details is being displayed as expected.
4. [JP] Stats Insights - Latest Post Summary [LatestPostSummaryMapper.kt]
ℹ️ If the Latest Post Summary
card is not being displayed, navigate to the bottom of the Stats
screen and click on the Add new stats card
. Then, enabled the Latest Post Summary
from within
the Posts and Pages
group.
- Go to
Stats
screen and itsINSIGHTS
tab. - Scroll to the
Latest Post Summary
card and verify that it is being displayed as expected.
KSP API [ksp]
1. [JP/WP] Remote Features [@Feature]
️️ℹ️ Just test the most recent remote feature flag.
2. [JP/WP] Features in Development [@FeatureInDevelopment]
ℹ️ Just test the most recent feature flag in development.
3. [JP/WP] Remote Field Configs [@RemoteFieldDefaultGenerater]
ℹ️ Just test the most recent remote remote field configs.
4. [JP/WP] Experimental Features [@Experiment]
ℹ️ Just test the most recent experimental feature.
KotlinPoet [squareup-kotlin-poet]
1. [JP/WP] Remote Features [@Feature]
️️ℹ️ Just test the most recent remote feature flag.
2. [JP/WP] Features in Development [@FeatureInDevelopment]
ℹ️ Just test the most recent feature flag in development.
3. [JP/WP] Remote Field Configs [@RemoteFieldDefaultGenerater]
ℹ️ Just test the most recent remote remote field configs.
4. [JP/WP] Experimental Features [@Experiment]
ℹ️ Just test the most recent experimental feature.
Lottie [airbnb-lottie]
1. [JP/WP] JP Install Full Plugin Animation [JPInstallFullPluginAnimation.kt]
- TODO
- TODO
- TODO
1. [WP] Jetpack Static Poster [JetpackStaticPoster.kt]
- TODO
- TODO
- TODO
1. [JP] Notifications Screen [NotificationsDetailListFragment.kt]
- TODO
- TODO
- TODO
UCrop [yalantis-ucrop]
1. [JP/WP] Image Edit Screen [PreviewImageFragment.kt + CropFragment.kt]
- Add a new
blog
post. - Add a new
image
block. - Choose an image and wait for it to be uploaded within the
image
block. - Click on the
media options
of this image (top right) and then clickedit
. - Crop the image and click the
done
menu option (top right). - Verify the image is updated accordingly.
- Plugin
- Kotlin
- EventBus
- AndroidX Core
- AndroidX Compose
- AndroidX/Google
- Material/Google
- Network
- Tool
- Other Core
- Other
ℹ️ Some smoke test instructions might have an Extra
section with addition instructions.
GoogleServices [google-services]
Dagger [google-dagger]
Kotlin [kotlin-main] + [androidxComposeCompilerVersion]
Coroutines [kotlinx-coroutines]
EventBus [greenrobot-eventbus]
Annotation [androidx-annotation]
ArchCore [androidx-arch-core]
Lifecycle [androidx-lifecycle]
Core [androidx-core]
Activity [androidx-activity]
Fragment [androidx-fragment]
AppCompat [androidx-appcompat]
Compose [androidx-compose-bom]
ComposeMaterial3 [androidx-compose-material3]
ComposeConstraintLayout [androidx-constraintlayout-compose]
Coil [coil]
RecyclerView [androidx-recyclerview]
ViewPager2 [androidx-viewpager2]
Material [google-material]
ConstraintLayout [androidx-constraintlayout]
Retrofit [squareup-retrofit]
Volley [android-volley]
Glide [bumptech-glide] + [glideVolleyVersion]
Gson [google-gson]
InstallReferrer [android-installreferrer]
ApacheCommons [apache-commons-text]
Desugar [android-desugar]
Extra
Focus on testing push notifications and/or blogging reminders since this was why this library was introduced to this project in the first place (see here and here).
- Gradle
- Plugin
- React Native
ℹ️ Every special test instructions have a Why & Extra
section to further explain why that
dependency update is so special and how to deal with it.
Gradle [gradle-wrapper]
Why & How
- TODO
- TODO
- TODO
AGP [agp]
Why & How
- TODO
- TODO
- TODO
Sentry [sentry]
Why & How
sentryVersion
in this project relates to Sentry Gradle Plugin only. Sentry SDK is bundled with
Automattic-Tracks-Android.
We use Sentry Gradle Plugin to send ProGuard mapping files and source context files to Sentry. It
makes stacktrace readable on Sentry dashboard. This should be the main focus when testing after
bumping sentryVersion
.
Please build the release variant (vanillaRelease
) of both WordPress and Jetpack flavors and verify if issues are sent correctly. You can use the following snippet.
PATCH (warning: it'll probably have some conflicts in the future when `WPMainActivityViewModel` change. It's more for an idea:
Subject: [PATCH] tests: add a test for features in development generation
---
Index: WordPress/src/main/java/org/wordpress/android/viewmodel/main/WPMainActivityViewModel.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/WordPress/src/main/java/org/wordpress/android/viewmodel/main/WPMainActivityViewModel.kt b/WordPress/src/main/java/org/wordpress/android/viewmodel/main/WPMainActivityViewModel.kt
--- a/WordPress/src/main/java/org/wordpress/android/viewmodel/main/WPMainActivityViewModel.kt (revision 806913d9fb807250cecd5b24b36001d55ea4c255)
+++ b/WordPress/src/main/java/org/wordpress/android/viewmodel/main/WPMainActivityViewModel.kt (date 1710772966823)
@@ -5,6 +5,7 @@
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.distinctUntilChanged
+import com.automattic.android.tracks.crashlogging.CrashLogging
import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.firstOrNull
import org.wordpress.android.R
@@ -67,6 +68,7 @@
private val bloggingPromptsStore: BloggingPromptsStore,
@Named(UI_THREAD) private val mainDispatcher: CoroutineDispatcher,
private val shouldAskPrivacyConsent: ShouldAskPrivacyConsent,
+ private val crashLogging: CrashLogging,
) : ScopedViewModel(mainDispatcher) {
private var isStarted = false
@@ -161,6 +163,7 @@
launch { loadMainActions(site) }
updateFeatureAnnouncements()
+ crashLogging.sendReport(Throwable("Test crash"))
}
@Suppress("LongMethod")
Detekt [detekt]
Why & How
- TODO
- TODO
- TODO
ViolationComments [violation-comments]
Why & How
- TODO
- TODO
- TODO
ReactNative [facebook-react]
Why & How
- TODO
- TODO
- TODO