Listen to this blog |
Radish BDD Framework
Radish BDD Framework is fully compatible with cucumber’s Gherkin language. As a Software Testing Company, sharing our working experience about a new tool/framework to the automation testing community gives immense happiness.
Automation testers already know about BDD and its tool Cucumber. The testers who automate their test cases using Python go with Behave or Lettuce framework. Radish BDD Framework is also another choice for Python BDD Testing and it has its own features. Let’s see a few important features one by one.
Scenario Looping In Cucumber, you can iterate a scenario using Examples. However, in Radish BDD Framework, you can additionally use Loop keyword to run a scenario multiple times. If you see the below scenario, it runs the same scenario twice.
Feature: Mobile App Self-Service Narrative Description: As a XYZ Mobile Network Customer, I want a self-service app, so that I can make re-charge and make payment. Scenario Loop 2: As a mobile app user, I want make a payment Given I login into the app When I make a payment Then I should see the payment successful message
Scenario Precondition Radish has Background feature which will run the steps before each scenario in a feature file. If you want to run a scenario from another feature file as a prerequisite, you can easily accomplish this using Radish Precondition tag. Please see the below example for more clarity.
@precondition(Sample.feature: Pre-steps) Scenario: As a mobile app user, I want make a payment Given I login into the app When I make a payment Then I should see the payment successful message
Constants at Feature Level Constants are specific Tags which define a constant which can be used in the Steps. This could be useful when you have values which are used in several points in a Feature and which should be named instead of appear as magic numbers.
@constant(base_temperature: 70) Feature: Test heater In order to test my heater system I write the following scenarios. Scenario: Test increasing the temperature Given I have the room temperature ${base_temperature} When I increase the temperature about 5 degrees Then I expect the temperature to be ${base_temperature} + 5
Conclusion Radish BDD Framework has other notable features. We will update this article in the subsequent days.
Comments(0)