2018-06-13 23:40:36 +05:30
..
2018-06-11 01:56:32 +05:30
2018-06-11 01:56:32 +05:30

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Component Object component-object /patterns/component-object/ Testing
Java
Difficulty-Intermediate

Intent

Web development is shifting more and more towards reusable components. Frameworks like React, Polymer, Angular etc. provide various component friendly abstractions to make front-end code-bases more maintainable. So our web applications are now full of “widgets” that have same behavior. We can use component various times on single web page or re-use it on various web pages. Therefore it is logical to create abstraction which covers functionality of single component and reuse it across end-to-end tests.

alt text

Applicability

Use the Component Object Pattern in the following situations:

  • When you have various same components on single web page and you need to test the web page
  • When you have multiple web pages using same component abstractions and you need to test the web pages

Credits