crappish
crappish

Reputation: 2708

How to automatically test if offline mode is working in web application

I have mobile web application that has offline capabilities (via HTML5).

I'm currently building automatic build & testing for it (ant, JsTestDriver etc.), until I hit a wall. How can I test if the web application has working offline mode? This is specially painful since if tested by hand; iPhone practically needs full reset between tests (it tends to cling on to some parts of the data).

I'm thinking something around these lines (on a idea level):

  1. Setup Java web server with ant
  2. Fire some sort of headless client, that supports HTML5 offline use
  3. Load the application
  4. Validate that everything is loaded
  5. Disable server
  6. Load the application
  7. Validate that everything is loaded, still

Any suggestions how would I proceed doing something like this?

Upvotes: 3

Views: 850

Answers (1)

DomDom
DomDom

Reputation: 21

Not sure I understand your question, but what do you think of:

  1. Not using an iPhone, but chrome on PC with the ripple emulator http://ripple.tinyhippos.com/
  2. Setting a fake proxy or editing the .host file in order to be sure that your chrome session does not have access to your server.

Upvotes: 2

Related Questions