title | metadesc | noindex | order | page_id | warning | contextual_links | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Finding App Package & App Activity (Android) |
Testing Android apps in Testsigma requires a few details about the app in order to locate and test activity in app. This article discusses finding app package & activity |
false |
23.68 |
App Package & App Activity |
false |
|
Test execution of Android applications in Testsigma (or in General) requires a few characteristic details about the application to locate the application and the specific feature to be tested. They are:
-
App Package Name
-
App Activity Name
Each Android app has a unique identifier, like a Java package name, like com.example.myapp. This identifier helps find your app on devices and the Google Play Store.
Moreover, an Android application will have multiple Activities or Pages, each containing elements like fields or buttons for testing.
In simple terms, An Activity in an Android Application is similar to a Web page in a Web Application or Website.
The App Package Name helps locate the application for testing purposes, while the App Activity Name pinpoints the specific page to be tested.
- Android SDK should be installed and set up on the computer.
Let us try finding the details of the Whatsapp application in this case.
-
Connect your Android device or emulator to your PC/Mac. Open the app you wish to inspect, in this case, WhatsApp.
-
Open a Command Prompt or Terminal window and run the adb devices command. This will display a list of connected devices with their unique device ID.
-
Use the following commands to retrive information about the currently open application:
-
For Mac/Linux: adb shell dumpsys window | grep -E 'mCurrentFocus'
-
For Windows: adb shell dumpsys window | find "mCurrentFocus"
-
-
The output will display the Android Application Package name and Application Activity name.
[[info | NOTE:]] | Ensure the WhatsApp app is open on the device and the device screen is unlocked before executing these steps. This applies to any android application installed on the device.
ℹ️More Info:
The package name can also be verified by tapping More Details on the app's Google Play Store page.