Search code examples
apirestautomated-testscucumber-jvmrest-assured

How to automate Rest APIs which does not have UI (purely backend testing) using rest assured?


I am using rest assured to test my rest APIs but I need to find an easier way to automate instead of writing similar code base for each test case. Has anyone previously worked with such project. Any inputs will be useful.

P.S. I will be using cucumber-java as well.


Solution

  • To answer your question. You need to create framework that reduce duplication your code and provide strong testing of application. I think you are using BDD framework for API and It is good approach for testing. I am using similar approach and we have strong framework design that can help you to reduce duplicate code.

    Framework should answer following question.

    • Framework must reduce duplicate code
    • Everyone in team should contribute in framework when required
    • Easy to maintain and Enhance
    • Provide testing converge idea to management and team.

    Now technology point.

    You are using rest assured and you can use Jackson and jersey test framework too.