Offline browser testing

Post on 08-May-2015

283 views 0 download

Transcript of Offline browser testing

Offline in the browserWith IndexedDB, AppCache & LocalStorage

Asia

Europe

Africa

North America

Latin America

Australia

0 12.5 25 37.5 50

Internet Usage Rates

Asia

Europe

Africa

North America

Latin America

Australia

0 17.5 35 52.5 70

~ 28%

~ 64%

~ 16%

~ 80%

~ 43%

~ 68%

% of population% of internet penetration

I don’t have an internet issue. What’s in it for me?

I don’t have an internet issue. What’s in it for me?

I don’t have an internet issue. What’s in it for me?

Use case

“Simply put, it’s a way for web pages to store named key/value pairs locally, within the client web browser.”

!! - diveintohtml5.info _

Gotchas

• “5 megabytes” is how much storage space each origin gets by default.

Gotchas

• “2.5 million characters” is how much storage space each origin gets by default.

IndexedDB“IndexedDB is an API for client-side storage of significant amounts of structured data and for high performance searches on this data using

indexes.” ! - developer.mozilla.org _

IndexedDB

LocalStorage

caniuse.com

ApplicationCache“Developers can use the Application Cache (AppCache) interface to

specify resources that the browser should cache and make available to offline users” !

- developer.mozilla.org _

AppCache is not BrowserCache

Gotchas

• Any changes made to the appcache file will cause the browser to update the entire application cache."

• If any of the files mentioned in the CACHE section can't be retrieved, the entire cache will be disregarded."

• Regardless of whether you include the address of the current page in the configuration, it will be cached.

Challenges

• How to automate indexedDB?"

• How to switch off network in between running automation script?"

• Inform exact point of failure"

• CI integration"

• Which browser to choose for automation testing?

Thank You

www.nextgentesting.org

kansal.raman@gmail.com"manan.bharara@gmail.com"

@kansal_raman"@mananbharara