The letter S in a light blue, stylized speech bubble followed by SpeakBits
SpeakBitsThe letter S in a light blue, stylized speech bubble followed by SpeakBits
Trending
Top
New
Controversial
Search
Groups

Enjoying SpeakBits?

Support the development of it by donating to Patreon or Ko-Fi.
About
Rules
Terms
Privacy
EULA
Cookies
Blog
Have feedback? We'd love to hear it!

Effective Java Application Testing with Cucumber and BDD

mydeveloperplanet.com
submitted
a year ago
byjosephtoprogramming

Summary

Cucumber is a tool that supports Behaviour-Driven Development (BDD) This guide provides steps for project setup, scenario writing, step implementation, and reporting. Increase your testing efficiency by utilizing Cucumber for Java application testing. The sources used in this blog, can be found at GitHub.

The steps are: Add an employee to the employee list, add an employee, add another employee, and add an additional employee. The final step is to add an extra employee to a list of employees. The steps are to be followed by a test to see if the tests work.

An employee can be added to an employees list which is just a map of employees. The list of employees can be retrieved and the list can be cleared. The employee is a basic record. It is rather straightforward, you create the service and invoke the methods for the Given-When implementations.

Cucumber has great support for BDD. It is quite easy to use and you can make use of JUnit and Assertions. The steps can be implemented by means of Java. No need to learn a new language when your application is built in Java.

 cucumber cuke ear spike capitulum zucchini courgette corn-0
10

1 Comments

3
throwschen
a year ago
Every time I look at java code I just can't help think of all the boilerplate we could remove!