Programmer, tester, manager, client – mutual understanding between these people is essential for the positive completion of any mobile application programming project. Nobody said it would be easy, but BDD frameworks can help.

At the very beginning of a project, as its contractor, we have to define the requirements of an android app with the client. Each required functionality should be described on the basis of a specific structure: title, description and acceptance criterion.

The description should contain information about its: user,  business value, and effect (what happens after the function is performed).

Acceptance criterion is a defined list of steps that must be taken to achieve the desired goal.

Behavior driven testing

To determine that a feature meets the agreed upon acceptance criteria, we must test it. This is where the team often encounters communication barriers on the line: tester-developer or manager-client.

Non-technical people understand the data specified in the test by the programmers differently. In relation to that, they are often unable to check what a given test performs and whether it meets the criteria described in the requirements. Behavior-Driven Development will come to our aid.

In the first part of the article, “BDD frameworks”, I will briefly describe the main assumptions of BDD as the sections following describe selected User Interface testing frameworks and Unit testing frameworks.

What is Behavior-Driven Development?

BDD is a software development process created in 2003 on the basis of TDD. Its main task is to describe the behavior of a system from the perspective of its users. With BDD testing tools we can test application views or perform unit tests, among other things.

BDD development

The main rules of Behavior-Driven Development are as follows:

  • The language in which we describe user behavior needs to be natural (understandable to non-technical users)
  • A feature must be found in each test (i.e., the title and description of the feature, information regarding what function it is to perform as in the requirements).
  • Each test also has a scenario (i.e., steps of acceptance, a description of the business situation as in the requirements)

In the description of the system behavior 3 keywords are used:

  • Given– context, scenario
  • When– behavior, action
  • Then– result

Practical example of “Behavior Driven Development Testing”

Feature: Login feature

    Scenario: As a valid user I can log into my app
      When I press "Login"
      Then I see "Welcome to the coolest app ever"

After learning the main assumptions of BDD we can move on.

See the following articles:


You can find the source code on my GitHub.


 

Wojciech Szóstak Mobile Developer

Wojtek is a mobile developer at Zaven. He mostly works on android apps and enhances his knowledge about software testing (like BDD). In his spare time, Wojtek enjoys martial arts - he exercises several times a week!

Popular posts

Augmented Reality as a trend in Mobile Development

Augmented Reality as a trend in Mobile Development

3D maps, realistic games, virtual showrooms and fitting rooms, interactive participation in a conference or concert, visiting museums and exhibitions. These are just a few examples of where Augmented Reality can be used. Applications created with the help of AR effectively combine the real world with the virtual one. Can your business also benefit from […]

Read more
How to use Natural Language Processing in Mobile App?

How to use Natural Language Processing in Mobile App?

The ability to communicate and interact using language is a remarkable skill. It distinguishes humans from other species and machines. Even the most advanced systems and technologies need specific, defined commands to take action. But what would happen if an application could interpret our language and, importantly, recognize the context of our speech? This is […]

Read more
5 Technology Trends Moving into 2021

5 Technology Trends Moving into 2021

What will technology trends dominate in 2021? We prepared statement of 5 the most popular, latest trends in business e.g. Artificial Intelligence, Agile Methodology. Read our article and know more about it!

Read more
Mobile Apps

Get your mobile app in 3 easy steps!

1

Spec out

with the help of our
business analyst

2

Develop

design, implement
and test, repeat!

3

Publish

get your app out
to the stores


back to top