DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Automation-Friendly Test Design: An Example

Test automation is a key indicator of success. If tests have unnecessary checks, even a skilled automation engineer won't be able to make the automation efficient.

Denny Nguyen user avatar by
Denny Nguyen
·
Nov. 13, 16 · Opinion
Like (1)
Save
Tweet
Share
3.27K Views

Join the DZone community and get the full member experience.

Join For Free

A major contributor to success in test automation is test design. If tests have many unnecessary detailed steps and checks, even a skilled automation engineer will not be able to make the automation efficient and maintainable.

Action-Based Testing (ABT) uses a modular keyword-driven approach. Tests are organized in test modules and are built up of sequences of actions. 

Well-defined test modules can provide a healthy framework for teams to work with, particularly if modules have a clear and unambiguous scope, the scope is well-differentiated from other test modules, and all test cases, actions, and checks within the test module reflect the scope.

A key differentiation is between business tests and interaction tests. Business tests have a business-oriented scope and should not contain UI details. Interaction tests focus on the interaction between the user (or another system) and the application.

Other than this fundamental distinction, various projects may come up with different ways to organize tests. I want to share a way that we have had good experience with. It is based on the observation that, for many applications, a lot of the tests can be well-organized into two main categories: business objects and business flows.

Business objects are the items that an application works with, such as customers, employees, orders, invoices, etc. Business flows are the (mostly) end-to-end processes that usually hit more than one business object. For example, processing an order can involve the order itself, articles, invoices, payments, etc. Most tests will fit in categories (folders) for business objects and business flows. What’s left over are various tests in categories, such as administration, interoperability, data, etc

Consider an e-commerce site. People can view and order items and buy them with a credit card. Such a site would have business objects: articles, customers, orders, payments, credit cards, etc. As an example business object, let’s assume that the site supports “promotions” in which discounts are given under certain conditions.

Promotions can:

  • Be a discount percentage or dollar amount.
  • Be based on articles, article categories or comprehensive.
  • Have a certain time period.
  • Be rewards for volume or timely payment.
  • Be regional or global.

For example of a business level test, it creates two promotions that overlap each other.

To manage promotions, the site will have various UI functions, either web-based or regular. In the UI there might be specific behaviors to be tested, such as a date can only be in the future. Or, in the example below, a certain town in The Netherlands needs to exist in a list box with towns.

Carefully organizing and designing tests can be a great contribution to their quality, efficiency, and manageability. In particular, it can help make their automation more stable and maintainable. A business-oriented approach to the test design, for example, centered on business objects and business flows, can be a great start to obtaining a good and automation-friendly test design.

Testing Design

Published at DZone with permission of Denny Nguyen, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Seamless Integration of Azure Functions With SQL Server: A Developer's Perspective
  • Chaos Engineering Tutorial: Comprehensive Guide With Best Practices
  • Running Databases on Kubernetes
  • Old School or Still Cool? Top Reasons To Choose ETL Over ELT

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: