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
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
  1. DZone
  2. Culture and Methodologies
  3. Agile
  4. Mobile Testing in the Context of BDD, TDD, and ATDD

Mobile Testing in the Context of BDD, TDD, and ATDD

These processes aid developers and testers in understanding the customer’s needs prior to implementation and allow customers to converse in their own domain language.

Eran Kinsbruner user avatar by
Eran Kinsbruner
·
Jan. 18, 17 · Opinion
Like (3)
Save
Tweet
Share
8.87K Views

Join the DZone community and get the full member experience.

Join For Free

Last week, I presented in the Joe Colantonio AutomationGuild online conference. (Kudos to Joe for a great event!)

Among multiple interesting questions that I got post my session (such as, "What is the best test coverage for mobile projects?" and "How do I design effective non-functional and performance testing in mobile and RWD?"), I also got a question about the differences between BDD and ATDD.

My session was around an open-source test automation framework called Quantum that supports cucumber BDD. This obviously triggered the question.

ATDD: Acceptance Test Driven Development

Based on Wikipedia’s definition (referenced above), ATDD is a development methodology based on communication between the business customers, the developers, and the testers. ATDD encompasses many of the same practices as specification by example,behavior-driven development (BDD), example-driven development (EDD), and support-driven development also called story test-driven development (SDD).

All these processes aid developers and testers in understanding the customer’s needs prior to implementation and allow customers to be able to converse in their own domain language.

ATDD is closely related to test-driven development (TDD). It differs by the emphasis on developer-tester-business customer collaboration. ATDD encompasses acceptance testing, but highlights writing acceptance tests before developers begin coding.

BDD: Behavior Driven Development

Again, based on Wikipedia’s definition, BDD is a software development process that emerged from test-driven development (TDD). Behavior-driven development combines the general techniques and principles of TDD with ideas from domain-driven design and object-oriented analysis and design to provide software development and management teams with shared tools and a shared process to collaborate on software development.

Mobile Testing in the Context of BDD and ATDD

The way to look at the Agile like-practices of BDD, ATDD, and TDD is from the context of higher velocity and quality requirements.

Organizations are aiming to release faster to market with great quality and sufficient test coverage, and in the same time, of course, meet the business goals and customer satisfaction. To achieve these goals, teams ought to be strongly collaborative from the very beginning app development and design stages.

Once organizations have the customer product requirements, and they can start developing through user stories and acceptance criteria so that several goals can be met:

  • High customer-vendor alignment. This equates to customer satisfaction.
  • Faster time to market; the app is tested along the SDLC.
  • Quality is in sync with customer needs and there are much less redundant tests.
  • There are no communication gaps or barriers between Dev, Test, Marketing, Management.

Looking at the below example of a BDD-based test automation test code, it is very easy to understand the functionality and use cases under test, the desired test outcome.

quantum123

As can be seen in the screenshot above, the script installs and launches on an available Samsung device. The TestApp.APK file performs a successful login and presses on a menu item. As a final step, it also performs a mobile visual validation to assure that the test also passes, and also, as an automaton anchor, the test code reached the expected screen.

It is important to mention that the test framework and tools that support TDD, ATDD, and BDD can be similar, and one can still develop and test from a BDD or ATTD standpoint by using a Cucumber test automation framework (i.e., Cucumber or Quantum).

If we compare the above functional use case (or, as stated in the Cucumber language, scenario) to a scenario that would fit an ATDD-based approach, we would most likely need to introduce the known three amigos approach: three perspectives of customer (what problem are we trying to solve?), development (how might we solve this problem?), and testing (what about…).

Since a real ATDD best practice will determine a Gherkin-like app scenario before the development even starts, the above BDD example will be a precondition test for the app development team to make sure that they develop against acceptance criteria (which is, in our example, a successful app install and login).

An additional example of an acceptance test that also involves a layer of login/register that I can reference would look like this:

effective-testing-practices-in-an-agile-environment-28-638

I can understand the confusion between BDD and ATDD since, as mentioned above, they can look a lot similar.

The bottom line is that BDD, ATDD, and TDD are all methods to better sync the various counterparts involved in shipping a working product to the market faster, with higher quality, and with the right functionality that meets the customer requirements. Implementing it using the Gherkin method makes a lot of sense due to the easy alignment and common language these counterparts use during the SDLC workflow.

mobile app Testing Software development Test-driven development Test automation Behavior-driven development

Published at DZone with permission of Eran Kinsbruner, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • (Deep) Cloning Objects in JavaScript
  • Distributed Stateful Edge Platforms
  • Why It Is Important To Have an Ownership as a DevOps Engineer
  • Apache Kafka vs. Memphis.dev

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: