During a customer project, front-end developers of our Leipzig office created jambit's first open source library with Gherkin. With the library, the creation of automated end-to-end tests is simplified. With the open source principle, people share software privately or professionally. They ensure more exchange and higher quality. But companies and organizations are also getting more and more involved. This saves development costs and at the same time makes it possible to make findings and solutions accessible to a larger mass.
The challenge of the jambit Leipzig team: end-to-end tests should be written in a language that even non-developers can understand. For a customer project with an industrial company, a front-end developer team led by jambitee Santo Pfingsten provided 46 generally valid sentences. These can be used to map almost any test scenario in front-end projects. As a basis, the jambitees used the official "Cucumber Boiler Plate" of the Webdriver.io project and made various improvements and additions. The CSS selectors to identify the elements were stored in separate files. This makes it not only easier to understand Gherkin files, but also to maintain them. In addition to the optimized documentation, the code quality increases, because customer and developers can detect bugs faster and fix them early in a resource-saving way.
"Satisfaction is improving when customers understand our work better, " says jambitee Santo Pfingsten. jambit's front-end developers and DevOps engineers sometimes work with customers who do not necessarily have programming experience. In an agile Scrum project, this could be the product owner, who may have a background in economics or psychology. jambit's developers are committed to making the project open source available on NPM. This means that in the future, not only jambit projects but also the open source community can profit from it. A further advantage: project improvements can be quickly implemented by updating the package and collaborative development is simplified.
Creating test scenarios faster with Gherkin and Cucumber
The library is based on Gherkin. Gherkin is a domain specific language used to describe functionalities in Cucumber. It is a so-called behavior driven development tool and specifies requirements for software textually. Gherkin helps to describe the behavior of the user without having to understand the underlying code. Processes are described in natural sentences. For example, the procedure: "Given I click on the button, subscribe". For every possible sentence, however, there must be an implementation in the code that translates it into browser actions. So before you can write tests, many sentences have to be defined and implemented. This is where jambit's new open source library helps with 46 general-purpose sentences that can be used directly to write tests without any additional work.
Better communication in front-end projects
While the customer often deals with questions of the business case in front-end projects, the developer is concerned with the translation into a software concept. In many cases, this results in a dichotomy: good software often requires complex solutions. However, the user story must not be missed out. It is not for nothing that jambit has been working with user centered design for many years. Gherkin files help to translate user stories into optimal software. But they also require a high level of understanding the customer's perspective and a high quality of test writing. Not considering this, might result in high costs.
Returning know-how to the open source community
jambit has been involved in the open source community for some time now. It all started with prototypes, such as an open source based traffic light showing the project status.
There are already plans for the further development of the open source library. The next step is to identify React elements by their component names and properties. The library is installed directly via NPM and on GitHub you can find the documentation and a sample project. jambitee Santo Pfingsten finds this important to give everyone access to a wide range of know-how.