Forum Discussion

jyoti123rajaram's avatar
jyoti123rajaram
New Contributor
11 months ago

readyAPI with BDD Approach can someone help???

4 Replies

  • KarelHusa's avatar
    KarelHusa
    Champion Level 2

    jyoti123rajaram,

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

    https://community.smartbear.com/t5/ReadyAPI-Questions/BDD/td-p/177876

     

    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: https://community.smartbear.com/t5/ReadyAPI-Questions/Ready-API-integration-with-cucumber/td-p/229333

     

    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
      jyoti123rajaram
      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
      jyoti123rajaram
      New Contributor

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