Behavior Driven Development (BDD)

by:

Uncategorized

Cucumber finds a match between scenario steps and steps definitions by looking for a match between text in Scenario and Steps Definitions, using regular expression API. After the match is found, when Cucumber detects Regular Expression specific syntax in the string provided in current Step Definition, it “extracts” the part of the string under which expression stands for and passes it to the method under Step Definition.

Few words about @CucumberOptions annotation. This annotation is also used to configure the directory that contains the feature (scenario) files. It is important to note that @CucumberOptions annotation has features and glue among its parameters. The value of features parameter is an array of Strings, each element pointing to the location of feature (scenario) files; the value of glue parameter is also an array of Strings, with its elements pointing to the directories containing Step Definition classes.

Citrus

Citrus is an Open Source integration test framework which focuses on messaging in distributed software systems. Citrus performs an automated interface tests. For that Citrus offers Ready-to-use endpoint components for message exchange, so Citrus is ready to send and receive messages to different message transports as a client and a server as well. Citrus works and integrates with well-known libraries, such as TestNG and JUnit. Test in Citrus is a normal unit test with added capabilities of sending and receiving different message transports on top of it and to validate incoming messages. Citrus is also compatible with Apache Camel, Spring, Docker, Arquillian. Citrus helps to eliminate writing boilerplate code to emulate (mock) the behavior of the service (HTTP Server, for instance).

Previous

Leave a Reply

Your email address will not be published. Required fields are marked *