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.
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)
featuremust 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
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:
- BDD frameworks (part 2): About User Interface Testing
- BDD frameworks (part 3): About Unit Testing Framework
You can find the source code on my GitHub.
Since 2011, Zaven has been providing digital solutions for global clients. Our team is composed of experts in custom development, UX/UI design, data analytics, backend integration and more. We aim to build long-term business relationships with our clients in order to create the highest quality and most innovative solutions. Clutch, a B2B market research platform, […]Read more
There is many a legend about outsourcing which successfully keeps away entrepreneurs. Stories about software which never even existed, despite the fact that the developer had promised that everything was fine - even ahead of deadline. No communication with the developer for a long, long time and then it turns out that nobody has been working because it is Chinese New Year! These are telling examples and they are not isolated. I can only imagine the fear that grips some people when the subject of outsourcing steps out of the shadows! Let’s just deal with the most common fears of hiring outsourced developers.Read more
Recently Kotlin programming is really endorsed by Google and most of the developers. We are not an exception. We moved to Kotlin for Android development and it was worth it. Here are 8 reasons why we did it.Read more