Behavior-driven development (BDD) is a software development method that focuses on creating tests using concrete, real-life examples. These examples use natural language constructs to express the behavior and the expected outcomes. It’s especially helpful when you’re working with a cross-functional team. By involving both technical and non-technical team members in defining how your software should behave, you can gain a lot of benefits.
In today’s dynamic business, one of the basic requirements of software is its maintainability. There are always requests for change. Software teams must make these changes continuously. The only factor that guarantees the correctness of the software when making changes is the existence of testing. BDD and TDD are two main practices which implemented at Tiba to make right software and software right.
For this reason, in Tiba, certain mechanisms have been established for software testing. Software testing strategies in Tiba are divided into the following three groups:
- Unit tests are written by programmers according to Test Driven Development (TDD) practices. Unit tests are performed once per Commit. To ensure the accuracy of the implemented code. Unit tests are the fastest type of test in terms of execution and their frequency of execution is higher.
- Service tests are API driven testing which bypass user interface and directly test behavior developed at software backend. Service tests are performed during the working day upon request and the result is provided to the applicant. In addition, service tests are performed every night, and the results of the tests performed at the beginning of the next day are provided to the team to ensure the accuracy of the team’s work during the working day.
- Acceptance testing generates user interface events such as keystrokes and mouse clicks, and observes the changes that result in the user interface, to validate that the observable behavior of the program is correct. Acceptance tests for newly developed functions are performed, but at the time of each new release all acceptance tests will be performed. A
All above mentioned tests are automatic. Service and acceptance tests are written using Gherkin syntax based on Behavior Driven Development (BDD) practices. The software analysis team develop all required models to analyze software requirements such as user stories, business rules, prototypes and finally deliver acceptance criteria to the development team through Gherkin scripts. Domain model and state machine diagrams also provided to development team. In construction process, Unit tests will be written to define the functionality before the production code is written. Development team unit tests using service tests scenarios.
According to agile software development practices especially Extreme Programming (XP), code in Tiba is refactoring continuously, code refactoring is safer when unit testing is used and feedback is provided to programmer immediately. In this manner, changes will be done more reliable and less costly than the code is tested with human exploration.