Selenium Camp 2016 - Effective UI tests scaling on Java

21
Effective UI tests scaling on Java Pitfalls and solutions

Transcript of Selenium Camp 2016 - Effective UI tests scaling on Java

Page 1: Selenium Camp 2016 - Effective UI tests scaling on Java

Effective UI tests scaling on JavaPitfalls and solutions

Page 2: Selenium Camp 2016 - Effective UI tests scaling on Java

Speaker’s info: Lead Test Engineer at GlobalLogic Consultant and mentor: http://lessons2.ru/consulting Editor and moderator: http://automated-testing.info Certified ISTQB engineer

Contacts and contributions: Email: [email protected] GitHub: sskorol Blog: http://qa-automation-notes.blogspot.com

Serhii Korol

Page 3: Selenium Camp 2016 - Effective UI tests scaling on Java

Static context: friend or enemy?

Page 4: Selenium Camp 2016 - Effective UI tests scaling on Java

Custom wheels

Page 5: Selenium Camp 2016 - Effective UI tests scaling on Java

Demo time

Page 6: Selenium Camp 2016 - Effective UI tests scaling on Java

Threads’ race condition

Page 7: Selenium Camp 2016 - Effective UI tests scaling on Java

Accurate nodes’ identification

Page 8: Selenium Camp 2016 - Effective UI tests scaling on Java

Accurate nodes’ identification

Page 9: Selenium Camp 2016 - Effective UI tests scaling on Java

Demo time

Page 10: Selenium Camp 2016 - Effective UI tests scaling on Java

Variety of storages

Page 11: Selenium Camp 2016 - Effective UI tests scaling on Java

Annotations are not extendable. Overhead with plain jdbc driver. How to manage sessions across threads? How to access multiple data sources?

Lack of functionality

Page 12: Selenium Camp 2016 - Effective UI tests scaling on Java

A wheel has already been invented. Don’t be afraid of annotations. Java 8 is your weapon. Avoid spamming classes with multiple data

providers.

Make me generic

Page 13: Selenium Camp 2016 - Effective UI tests scaling on Java

Demo time

Page 14: Selenium Camp 2016 - Effective UI tests scaling on Java

Object pool

Page 15: Selenium Camp 2016 - Effective UI tests scaling on Java

Libraries: Vibur: http://vibur.org/vibur-object-pool AspectJ: https://eclipse.org/aspectj

Object pool – usage scenario

Page 16: Selenium Camp 2016 - Effective UI tests scaling on Java

Still struggling with unstable environment?

Page 17: Selenium Camp 2016 - Effective UI tests scaling on Java

Infrastructure

Page 18: Selenium Camp 2016 - Effective UI tests scaling on Java

Environment watcher - demo

Page 19: Selenium Camp 2016 - Effective UI tests scaling on Java

Infrastructure: screenshots issue

Page 20: Selenium Camp 2016 - Effective UI tests scaling on Java

Thread-safe containers save your nerve cells.

CapabilityMatcher is the Lord's Grid’s Eye. 5-lines generic DataProvider protects against

N more specific implementations. Object pool makes test scenarios more

realistic. Environment watcher could be your best

housekeeper.

Let’s keep in mind that…

Page 21: Selenium Camp 2016 - Effective UI tests scaling on Java

[email protected]://qa-automation-notes.blogspot.com

http://lessons2.ru/consulting