-
Notifications
You must be signed in to change notification settings - Fork 27
Test Framework Design
vladlion77 edited this page Jan 8, 2015
·
4 revisions
We follow a few principles when designing our test framework:
- Test code should be of Production Quality!
- For the test code to be of Production Quality, it needs to be designed and built with the design patterns.
- This well-designed test framework should have proper abstraction layers. These abstraction layers help to:
- Decouple test specification from test implementation
- Provide higher level of re-usability
- Make re-factoring easier
- Maintain and evolve the framework easier
- Make it easier for all team members to ramp-up and work in a collaborative way on specific abstraction layers.
- Evolve your framework functionality and implementation. Keeping the end goal in mind, develop the framework as per requirements at that point in time. Do not attempt to build all the functionality in a single shot. More likely than not, you will end up building something that is not going to satisfy the future requirement.
See the diagram below as a reference on different possible layers of a Test Framework.
Test Specifications
|
Business functionality
|
Domain functionality
(actions, verifications, rules)
______|________
/ | \
Pages -- Entities -- Resources
|_________|___________|
/ \
Common API to talk with the product |--Helpers/utilities
Ex: Capybara |--Loggers
__________/ |--Resource Handlers
|--WebDriver |--Custom Reporter
|--WebServices |--WebService Utilities
|--Poltergeist
|--WebKit