Forum Discussion

jyoti123rajaram's avatar
New Contributor
11 months ago

readyAPI with BDD Approach can someone help???

4 Replies

  • KarelHusa's avatar
    Champion Level 2


    there has already been a discussion on how to implement BDD with ReadyAPI:


    In my opinion, there is no straightforward support for BDD in ReadyAPI.


    BDD drives the test execution according to the scenarios (Given-When-Then), usually defined in a Gherkin script. 


    ReadyAPI has its own test execution management:

    • Entering a test Case
    • Test setup (like Given)
    • Running the Test steps (like When)
    • Evaluating the results with assertions (like Then)
    • Entering another test case...


    In ReadyAPI, the setup, steps and the assertions are part of the same test case (or even test step). 


    Though, it's possible to create a test case for each part (Given-When-Then) of the scenario, so that you would have three ReadyAPI test cases for each scenario. Then you could link the test cases and execute them from Cucumber, or another BDD tool.


    An example would be:

    • Test case - Create an account and set balance to 1000 EUR (Given)
    • Test case - Pay 300 EUR (When)
    • Test case - The transaction has been created and new balance is 700 EUR (Then)

    Another approach is to simulate BDD naming convention in the ReadyAPI tests, like richie mentioned:


    I think there's no easy solution here. You need to evaluate whether using ReadyAPI helps you, or rather brings an overhead.


    • jyoti123rajaram's avatar
      New Contributor

      I was browsing some article for ReadyAPI using testServer we can achieve BDD using testserver if yes then how? do u have nay idea?? 

    • jyoti123rajaram's avatar
      New Contributor

      If you have worked on ReadyAPI with BDD approach could you please connect me via email( or LinkedIn, it has been asked us to create a project in ReadyAPI using BDD approach