ShopKart Mobile
The mobile twin of the ShopKart web application and the ShopKart practice API, with the same catalogue and the same login. A tester who has automated one recognises the other two.
This application is for practice purpose, for automation testers.
| Application | ShopKart Mobile |
| Package | in.co.jstestingacademy.shopkart |
| First activity | .LoginActivity |
| Login | student / practice123 |
| Screens | 7 |
| Minimum Android | 7.0 (API 24) |
| Download | Download the APK (ZIP) – the zip holds the APK and a README |
- Sign in, and the three different rejections an incomplete form gives you
- A search box, a category dropdown and an in-stock switch over the same list
- A quantity stepper whose line total is recalculated, not typed
- Swipe-to-delete in the cart, and a delivery charge that disappears over ₹5,000
- A checkout form with a date picker, a radio group, a switch and a checkbox
- An order id generated at the end – carry it the way you carry an id from a POST
Everything is held in memory, so closing the app is the reset. No server, no network, no leftovers from the last run.
The screens, and how to reach them
Every control carries a resource id and an accessibility description, so you can locate it either way. No XPath over the whole tree, and no counting positions.
.LoginActivitySign in
| Resource id | Appium locator |
|---|---|
login_username | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_username") |
login_password | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_password") |
login_remember | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_remember") |
login_submit | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_submit") |
login_error | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_error") |
login_go_register | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_go_register") |
login_fill_demo | AppiumBy.id("in.co.jstestingacademy.shopkart:id/login_fill_demo") |
.RegisterActivityCreate account
| Resource id | Appium locator |
|---|---|
register_full_name | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_full_name") |
register_username | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_username") |
register_email | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_email") |
register_phone | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_phone") |
register_password | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_password") |
register_confirm | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_confirm") |
register_terms | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_terms") |
register_error | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_error") |
register_submit | AppiumBy.id("in.co.jstestingacademy.shopkart:id/register_submit") |
.CatalogActivityProducts
| Resource id | Appium locator |
|---|---|
catalog_search | AppiumBy.id("in.co.jstestingacademy.shopkart:id/catalog_search") |
catalog_category | AppiumBy.id("in.co.jstestingacademy.shopkart:id/catalog_category") |
catalog_in_stock | AppiumBy.id("in.co.jstestingacademy.shopkart:id/catalog_in_stock") |
catalog_count | AppiumBy.id("in.co.jstestingacademy.shopkart:id/catalog_count") |
catalog_list | AppiumBy.id("in.co.jstestingacademy.shopkart:id/catalog_list") |
catalog_open_cart | AppiumBy.id("in.co.jstestingacademy.shopkart:id/catalog_open_cart") |
.ProductActivityProduct
| Resource id | Appium locator |
|---|---|
detail_name | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_name") |
detail_price | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_price") |
detail_minus | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_minus") |
detail_quantity | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_quantity") |
detail_plus | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_plus") |
detail_line_total | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_line_total") |
detail_add | AppiumBy.id("in.co.jstestingacademy.shopkart:id/detail_add") |
.CartActivityCart
| Resource id | Appium locator |
|---|---|
cart_list | AppiumBy.id("in.co.jstestingacademy.shopkart:id/cart_list") |
cart_subtotal | AppiumBy.id("in.co.jstestingacademy.shopkart:id/cart_subtotal") |
cart_delivery | AppiumBy.id("in.co.jstestingacademy.shopkart:id/cart_delivery") |
cart_total | AppiumBy.id("in.co.jstestingacademy.shopkart:id/cart_total") |
cart_checkout | AppiumBy.id("in.co.jstestingacademy.shopkart:id/cart_checkout") |
.CheckoutActivityCheckout
| Resource id | Appium locator |
|---|---|
checkout_name | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_name") |
checkout_email | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_email") |
checkout_phone | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_phone") |
checkout_address | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_address") |
checkout_date | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_date") |
checkout_payment | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_payment") |
checkout_gift | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_gift") |
checkout_terms | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_terms") |
checkout_error | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_error") |
checkout_payable | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_payable") |
checkout_place | AppiumBy.id("in.co.jstestingacademy.shopkart:id/checkout_place") |
.OrderDoneActivityOrder confirmed
| Resource id | Appium locator |
|---|---|
done_order_id | AppiumBy.id("in.co.jstestingacademy.shopkart:id/done_order_id") |
done_summary | AppiumBy.id("in.co.jstestingacademy.shopkart:id/done_summary") |
done_back | AppiumBy.id("in.co.jstestingacademy.shopkart:id/done_back") |
How to practise on it
Eight steps, in order. Nothing here needs a server or test data — install it, point Appium at it, and start.
| 1. Set the device up | A phone or an emulator that adb devices can see. Turn on Developer options, then USB debugging. Android 7.0 or newer. |
| 2. Install the app | adb install jsta-shopkart.apk, or copy the file to the phone and open it. Allow installing from this source when Android asks. |
| 3. Start Appium | Appium 2 with the UiAutomator2 driver, started with the base path /wd/hub. Check it is up at http://127.0.0.1:4723/wd/hub/status. |
| 4. Point your test at the app | Set appPackage and appActivity from the table above. Nothing else is needed — no server, no seed data, no network. |
| 5. Find your first element | Use the resource id or the accessibility description from the screen tables below. Both work. Never locate by position: that is the habit this app exists to break. |
| 6. Sign in | Register your own account, or press Fill in the practice account and sign in as student / practice123. |
| 7. Work through the screens | Each one below lists what it is there to teach. Start with the simple ones and keep the awkward ones — the gestures, the long list, the WebView — for when the straightforward parts pass reliably. |
| 8. Check your work twice | Turn on Connect to the live API in Settings, do the same thing again, and read the record back through the API. If both agree, your test is checking something real. |
Where the data goes
The app has two modes and the switch is in its Settings. Offline is the default, because a classroom with no wifi still needs a working app and a suite that waits on a server is a slower suite.
| Offline (the default) | Everything the app creates is held in memory on the phone. No network, no server, no account on anybody’s database. Closing the app clears it, so every test run starts from the same place. |
| Online (Settings → Connect to the live API) | The same screens, on top of the practice API. Sign-up goes to POST /auth/register, sign-in to POST /auth/token, and what you create is stored against your account in {prefix}jsta_api_records. Read the very same records back in Postman. |
| The honest answer | |
|---|---|
| Where a practice account lives | {prefix}jsta_api_accounts – a table of its own, with the password hashed. Cleared after 30 days. |
| What it is not | It is not a WordPress user and not a customer. A practice sign-up never reaches wp_users, never creates a WooCommerce order, and cannot buy anything. Real sign-ups and real orders are a different part of the site entirely. |
| Where an order or an appointment lives | Offline: on the phone only. Online: {prefix}jsta_api_records, one row per record, scoped to your account. |
| The website’s own practice apps | The web versions at /qa-apps/ keep their data in the browser’s localStorage, so they reset when you clear site data. They never touch the server either. |
| Why registering is worth it | The shared student login is scoped to the token: sign in again and you start empty. Your own account is scoped to the account, so your records follow you to Postman, to a second phone, and to tomorrow. |
- Settings → Connect to the live API, then register and sign in.
- Do the thing in the app – place the order, book the appointment.
- Sign in to the practice API with the same account and read it back.
It is one record, reached two ways. That is how a UI test and an API test can check each other instead of each trusting itself.
Getting it onto a device
The short version of the steps above, for reference.
| 1. Download and unzip | The zip holds the .apk and a README with the package name and the login. |
| 2. Put it on the device | adb install jsta-shopkart.apk over USB, or copy the file to the phone and open it. Android will ask you to allow installing from this source – that is normal for any app that did not come from the Play Store. |
| 3. Start Appium | appium --base-path /wd/hub, with the UiAutomator2 driver installed. |
| 4. Point your test at it | Set appPackage and appActivity from the table above. Nothing else is needed: the apps hold their data in memory, so a restart is a clean fixture and no server has to be running. |