27

Offline browser testing

Embed Size (px)

Citation preview

Page 1: Offline browser testing
Page 2: Offline browser testing

Offline in the browserWith IndexedDB, AppCache & LocalStorage

Page 3: Offline browser testing

Asia

Europe

Africa

North America

Latin America

Australia

0 12.5 25 37.5 50

Internet Usage Rates

Page 4: Offline browser testing

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

Page 5: Offline browser testing
Page 6: Offline browser testing

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

Page 7: Offline browser testing

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

Page 8: Offline browser testing

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

Page 9: Offline browser testing

Use case

Page 10: Offline browser testing

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

!! - diveintohtml5.info _

Page 11: Offline browser testing
Page 13: Offline browser testing

Gotchas

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

Page 14: Offline browser testing

Gotchas

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

Page 15: Offline browser testing

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 _

Page 16: Offline browser testing

IndexedDB

LocalStorage

Page 17: Offline browser testing

caniuse.com

Page 18: Offline browser testing
Page 20: Offline browser testing

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 _

Page 21: Offline browser testing

AppCache is not BrowserCache

Page 22: Offline browser testing
Page 24: Offline browser testing

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.

Page 25: Offline browser testing
Page 26: Offline browser testing

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?