
Architecture Tests: How to Enforce Architectural Rules Directly in Code
Architectural rules that exist only in documentation will sooner or later be broken. It's not a question of if, but when.
Go to content|Go to the main menu|Go to search
Robot Framework is a popular Python-based testing tool maintained by the community and available free of charge. This gives it a great price/performance ratio. Its syntax is based on keywords. But can Robot Framework handle BDD and Gherkin? Let’s take a closer look.
Gherkin syntax is widely used for writing test scenarios — and for good reason. Its simplicity makes it easy to understand even for non-technical stakeholders, which can be a real advantage. Gherkin uses the following keywords to define a test case:
Example scenario:
We use the Selenium library to control the browser. The core code for this scenario might look like this:

You can find the full source code on our GitHub.
Some keywords take variables. For example, in the keyword I enter "${search_string}" in the search field, the variable search_string can be replaced with any value.
The result of the test appears in the standard HTML output like this:

Although Robot Framework is primarily built for keyword-driven testing, it handles Gherkin easily without major hurdles. There is no need to install anything extra as Gherkin is supported natively in Robot Framework.

Architectural rules that exist only in documentation will sooner or later be broken. It's not a question of if, but when.

Software development is a dynamic field in which new tools and trends are constantly emerging. However, if we want to develop high-quality software, it is not enough to simply apply these tools and trends; we must truly understand how they work and what risks they may entail.
Thank you for your interest in subscribing to our newsletter! To complete your registration you need to confirm your subscription. We have just sent you a confirmation link to the email address you provided. Please click on this link to complete your registration. If you do not find the email, please check your spam or "Promotions" folder.
