Cucumber with and without Rest - Assured. What are the advantages?
Currently my team uses Cucumber as a testing framework.
We need to start testing REST web services. I understood that REST-Assured is one of the leading tools for that.
- Can these tools be used in coordination? An example or a link would be great.
- If yes, what are the advantages of using Rest-Assured together with Cucumber?
- Also I've heard about Serenity. What are its advantages over Cucumber, if any, and is it recommended to use?
1 - Sure.
Cucumber is a test runner. The goal of this kind of tool is only to execute a suite with certain structure is a certain way.
Cucumber manages the execution of certain methods according to the matches of .feature files.
Rest-assure is a library. It abstracts HTTP calls.
You can add anything under Cucumber step definition methods, including statements with Rest Assured.
More details here.
2 - You will be able to abstract HTTP calls due Rest Assured and define scenarios in a BDD fashion.
3 - Mostly opinion-based; both have a similar learning-curve and features.