I am testing mobile application and have one question regarding the offline mode. When there is no connection, what should be the right behavior when user press Log out button?

My concern is if the app allows log out then on server this user status will still be logged in, this can cause some miss communicating between app and server.

  • How about trying other mobile apps? How they behave on mobile in this cae? – dzieciou Dec 10 '12 at 18:13
  • 1
    I wouldn't close the question but rather generalize it to think the question: "How should I define expected application behavior when there are no explicit requirements given?" – dzieciou Dec 10 '12 at 18:16

Actually this is a good testing question because you are evaluating the client/server functionality between a device and a cloud service, and how the mobile client behaves when it changes from one state (eg logged on in cloud w/connection) to another state (logged on with no connection).

If the user is "offline" (e.g. changes to airplane mode) or has lost connection they wouldn't be able to receive any push notification anyway, so the logic/excuse from your developer seems a bit flawed. (Of course this assumes your app is smart enough not to allow the user to log on if there is no network connection available.)

Many apps that require a 'handshake' with the service will usually display some sort of message indicating that the device is unable to establish a network connection (no cell bars or no wifi) when attempting to perform some action.

But, if the log out functionality displayed this error message it would leave the client on the device in a funky state (user might think it is still logged in). So, most apps that I have seen will simply return the user to the log in page state of the app when the user presses log out on a mobile device.

In lieu of specs (or even with specs), in general you could look for consistency with how other mobile apps (how do other apps that are similar to yours) handle this situation.

Testing mobile apps for lost connections is an important aspect of mobile app testing. You should also consider possible scenarios such as temporarily lost connections (eg. 30 seconds, 5 minutes, 6 hours), switching to airplane mode (both cell and wifi off), switching on airplane mode with cell signal (eg CDMA, GSM, etc) off and wifi on, etc.

| improve this answer | |

Do you have Requirements that indicate what the behavior should be in this scenario?

If not, then my guess is that after pressing Log Out, the system should behave as it is designed to do in logged-out mode, without regard to online/offline status.

But "right behavior" is always defined by Requirements, not by guesses. You should bring the subject up with your stakeholders.

| improve this answer | |

As others have stated, it's hard to really answer your question. What I would expect is that some local token (ie: cookie, temporary file) would be removed and you would be asked to login when your connection is returned.

As for what happens in the UI, outside of what you may already know via your requirements documentation, I would suggest either an error message "Sorry no connection, blah blah" or simply loading the login page. I'd imagine that would be cached locally anyway.

| improve this answer | |

Hi Spid and welcome to SQA.

This is more of a user experience question than a testing one.

The expected behaviour from the point of view of a user is exactly what the button states, that logout button should log the user out of the application.

Remember that your user does not have any idea of how the app is built, so they won't, and shouldn't know whether the data is cached locally or being accessed from a server.

As for client server communication problems, this is exactly what a tester is for, coming up with hypothesises of how the application could become corrupted and test those scenarios.

| improve this answer | |
  • You have the point there. In my case, the developer said it would cause problem if the app allows users to log out when there is no connection. This is because Log out button would invoke the web service to update user status. If user is allowed to log out, he will not be able to receive any push notification sent from server since his status is still online. What is your idea in this case? – Spid Dec 11 '12 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.