← Node guide
App

Background App

Sends the app away for a few seconds and brings it back — the standard way to ask whether state survives being suspended.

app.background
The piece

Send the app to the background for a few seconds, then bring it back — the usual way to check that state survives being suspended. The step reports the app it moved and whether it really left the foreground and came back.

Reach for it when

  • Proving a half-filled form, a video position or a cart is still there after a phone call.
  • Catching the reload-on-resume bug, where coming back throws the user to the home screen.
Background App
Idle
In the bag

Every setting this block has. A field marked only when appears once you have chosen the mode above it — those are alternatives to each other, not extra things to fill in.

  • Seconds
    starts at 3
  • Return to foreground
    starts at on

    Bring the app back after the wait (the usual suspend-and-resume check). Turn it off to leave it in the background — the step then ends on the home screen, and a later Launch App decides when it comes back.

Build it
  1. Say how long it goes away for

    Background AppSettings
    Seconds
    3
    Return to foregroundThe usual suspend-and-resume check
    on
  2. Or leave it in the background

    Turn Return to foreground off and the step ends on the home screen, with a later Launch deciding when the app comes back. Useful when something else has to happen in between.

    com.acme.shop3s awaythen back to the front
    away, then back
  3. Check what came back

    The step reports whether the app really left the foreground and really returned — assert on the screen either way.

    Background App
    Wait for Element
    Assert / Verify
What comes out
  • The app it moved, and whether it actually left and returned.
Watch out
  • Three seconds is not long enough for the system to reclaim memory. To test being killed in the background, use Terminate App instead.
Usually next to