Home / Projects / Mobile Applications / CargoLink Mobile
Mobile Applications (APK)

CargoLink Mobile

The mobile twin of the CargoLink web application, with the same three services, the same rates and the same twenty stock lines. Every rupee on the quote screen comes out of arithmetic printed on the page, so you assert on a number you worked out rather than the one the app happened to show you.

This application is for practice purpose, for automation testers.

ApplicationCargoLink Mobile
Packagein.co.jstestingacademy.cargolink
First activity.LoginActivity
Loginstudent / practice123
Screens9
Minimum Android7.0 (API 24)
DownloadDownload the APK (ZIP) – the zip holds the APK and a README
AccessInside the Lifetime Membership – sign in first
What you can practise here
  • Volumetric weight against actual weight, and the half-kilo rounding between them
  • Four zone factors, each reachable with a pincode from the list on the screen
  • A rate broken into nine labelled fields, not one sentence to parse
  • A flat charge that appears only for an out-of-delivery-area pincode
  • Insurance that is refused without a declared value
  • A booking form that will not take the same phone number twice
  • A seven-stage timeline you move along yourself, so you assert on a state you caused
  • Twenty stock lines with search, two dropdowns, a filter and four sort orders
  • Issuing more than is on hand – refused, with the number that is really there
  • One item that starts at zero, so “out of stock” is there on the first run

Everything is held in memory, so closing the app is the reset. No server, no network, no leftovers from the last run.

Step 1

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.

SCREEN.LoginActivity

Sign in

Resource idAppium locator
login_usernameAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_username")
login_passwordAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_password")
login_rememberAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_remember")
login_submitAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_submit")
login_errorAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_error")
login_go_registerAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_go_register")
login_fill_demoAppiumBy.id("in.co.jstestingacademy.cargolink:id/login_fill_demo")
SCREEN.RegisterActivity

Create account

Resource idAppium locator
register_full_nameAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_full_name")
register_usernameAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_username")
register_emailAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_email")
register_phoneAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_phone")
register_passwordAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_password")
register_confirmAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_confirm")
register_termsAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_terms")
register_errorAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_error")
register_submitAppiumBy.id("in.co.jstestingacademy.cargolink:id/register_submit")
SCREEN.HomeActivity

Home

Resource idAppium locator
home_welcomeAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_welcome")
home_countAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_count")
home_quoteAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_quote")
home_shipmentsAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_shipments")
home_shipments_subAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_shipments_sub")
home_stockAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_stock")
home_stock_subAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_stock_sub")
home_noteAppiumBy.id("in.co.jstestingacademy.cargolink:id/home_note")
SCREEN.QuoteActivity

Get a quote

Resource idAppium locator
quote_serviceAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_service")
quote_from_pincodeAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_from_pincode")
quote_from_cityAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_from_city")
quote_to_pincodeAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_to_pincode")
quote_to_cityAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_to_city")
quote_weightAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_weight")
quote_lengthAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_length")
quote_widthAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_width")
quote_heightAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_height")
quote_declaredAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_declared")
quote_insuredAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_insured")
quote_codAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_cod")
quote_errorAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_error")
quote_calculateAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_calculate")
quote_cardAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_card")
quote_volumetricAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_volumetric")
quote_chargeableAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_chargeable")
quote_zoneAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_zone")
quote_freightAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_freight")
quote_fuelAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_fuel")
quote_odaAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_oda")
quote_insuranceAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_insurance")
quote_cod_feeAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_cod_fee")
quote_gstAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_gst")
quote_totalAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_total")
quote_bookAppiumBy.id("in.co.jstestingacademy.cargolink:id/quote_book")
SCREEN.BookActivity

Book shipment

Resource idAppium locator
book_routeAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_route")
book_serviceAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_service")
book_totalAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_total")
book_senderAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_sender")
book_sender_phoneAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_sender_phone")
book_receiverAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_receiver")
book_receiver_phoneAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_receiver_phone")
book_goodsAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_goods")
book_dateAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_date")
book_termsAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_terms")
book_errorAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_error")
book_confirmAppiumBy.id("in.co.jstestingacademy.cargolink:id/book_confirm")
SCREEN.TrackActivity

Track shipment

Resource idAppium locator
track_awbAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_awb")
track_booked_noteAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_booked_note")
track_routeAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_route")
track_serviceAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_service")
track_peopleAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_people")
track_pickupAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_pickup")
track_totalAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_total")
track_statusAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_status")
track_timelineAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_timeline")
track_advanceAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_advance")
track_shipmentsAppiumBy.id("in.co.jstestingacademy.cargolink:id/track_shipments")
SCREEN.ShipmentsActivity

My shipments

Resource idAppium locator
shipments_searchAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipments_search")
shipments_findAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipments_find")
shipments_countAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipments_count")
shipments_emptyAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipments_empty")
shipments_listAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipments_list")
shipment_awbAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipment_awb")
shipment_routeAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipment_route")
shipment_detailAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipment_detail")
shipment_statusAppiumBy.id("in.co.jstestingacademy.cargolink:id/shipment_status")
SCREEN.StockActivity

Warehouse stock

Resource idAppium locator
stock_searchAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_search")
stock_categoryAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_category")
stock_warehouseAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_warehouse")
stock_sortAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_sort")
stock_below_reorderAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_below_reorder")
stock_countAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_count")
stock_emptyAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_empty")
stock_listAppiumBy.id("in.co.jstestingacademy.cargolink:id/stock_list")
item_skuAppiumBy.id("in.co.jstestingacademy.cargolink:id/item_sku")
item_nameAppiumBy.id("in.co.jstestingacademy.cargolink:id/item_name")
item_whereAppiumBy.id("in.co.jstestingacademy.cargolink:id/item_where")
item_quantityAppiumBy.id("in.co.jstestingacademy.cargolink:id/item_quantity")
item_flagAppiumBy.id("in.co.jstestingacademy.cargolink:id/item_flag")
SCREEN.StockActivity

Receive or issue (dialog)

Resource idAppium locator
move_itemAppiumBy.id("in.co.jstestingacademy.cargolink:id/move_item")
move_on_handAppiumBy.id("in.co.jstestingacademy.cargolink:id/move_on_hand")
move_quantityAppiumBy.id("in.co.jstestingacademy.cargolink:id/move_quantity")
move_errorAppiumBy.id("in.co.jstestingacademy.cargolink:id/move_error")
Step 2

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 upA phone or an emulator that adb devices can see. Turn on Developer options, then USB debugging. Android 7.0 or newer.
2. Install the appadb install jsta-shopkart.apk, or copy the file to the phone and open it. Allow installing from this source when Android asks.
3. Start AppiumAppium 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 appSet appPackage and appActivity from the table above. Nothing else is needed — no server, no seed data, no network.
5. Find your first elementUse 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 inRegister your own account, or press Fill in the practice account and sign in as student / practice123.
7. Work through the screensEach 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 twiceTurn 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.
Step 3

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 notIt 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 livesOffline: on the phone only. Online: {prefix}jsta_api_records, one row per record, scoped to your account.
The website’s own practice appsThe 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 itThe 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.
The same record, two ways
  1. Settings → Connect to the live API, then register and sign in.
  2. Do the thing in the app – place the order, book the appointment.
  3. 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.

Step 4

Getting it onto a device

The short version of the steps above, for reference.

1. Download and unzipThe zip holds the .apk and a README with the package name and the login.
2. Put it on the deviceadb 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 Appiumappium --base-path /wd/hub, with the UiAutomator2 driver installed.
4. Point your test at itSet 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.