How to create BDD Cucumber tests in Katalon Studio

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 108

  • @shehankuku
    @shehankuku 3 года назад +1

    My dear friend, or I should say my teacher. This is a very simple tutorial and from the beginning to the end I understood everything. I used your JMeter tutorial and I did some KPI's and did some load tests. It made a huge impact for my carrier and I am trying to automate our applications and thank you very much for sharing your knowledge and help people like us to conquer the world. Wishing you all the best and Thank you very much.

    • @RaghavPal
      @RaghavPal  3 года назад

      So happy to read this, You're very welcome Shehan

  • @ashrafhussain6569
    @ashrafhussain6569 4 года назад +2

    Excellent presentation of BDD test with Katalon, Thank you so much! Keep up the good work.

    • @RaghavPal
      @RaghavPal  4 года назад

      Thanks for watching Ashraf

  • @sumitsaha9782
    @sumitsaha9782 4 года назад

    Thanks sir for the tutorial. I heard of BDD and GHERKINS language before, but practiced for the first time with the help of this tutorial. Details are well explained

    • @RaghavPal
      @RaghavPal  4 года назад

      Glad it helped Sumit

  • @tinadatta7641
    @tinadatta7641 4 года назад

    Thanks for the tutorial
    I am new to gherkin language, I noticed in gherkin language we can pass test data in different ways
    1. Given I am learning "gherkin" ---- Here test data is hard coded
    2. Given I am learning "language" -----Here test data is passed as a parameter
    Example:
    |language|
    |gherkin|
    3. Given I am learning language ----- Step definition file has utilities to read excel file where language variable is stored as "gherkin"
    It will a great help, if you guide me in knowing which way is better to pass data or pros and cons of each way with respect to form size (bigger/smaller), data visibility on feature file, data driven testing etc.

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Tina, I will need to read more on this and will plan a session

  • @ranjiutube
    @ranjiutube 2 года назад +1

    This video is very helpful.
    One question I have is,
    How can we pass empty strings to the step definitions?

    • @RaghavPal
      @RaghavPal  Год назад

      Hi Ranjith, check if this helps -
      www.anycodings.com/1questions/4684452/cucumber-scenario-giving-an-empty-string-as-value-of-parameter-in-a-scenario-step
      groups.google.com/g/specflow/c/b-Vrah1GK0g

  • @carloseduardodealbuquerque9524
    @carloseduardodealbuquerque9524 3 года назад

    Excellent presentation of BDD test with Katalon, Thanks!!!

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Glad you liked it Carlos

  • @srikanthbolisetty1417
    @srikanthbolisetty1417 4 года назад

    Easy to understand and really powerfull tool and as usual very good session Raghav! Thanks a lot

    • @RaghavPal
      @RaghavPal  4 года назад

      Most welcome Srikanth

  • @sanishmr
    @sanishmr 5 лет назад +2

    Thanks Raghav, could you please do a video on jbehave + assertj as well ?

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      I will do in some time Sanish

    • @sanishmr
      @sanishmr 5 лет назад +1

      Automation Step by Step - Raghav Pal thanks 😊

  • @pradipathennarasu7294
    @pradipathennarasu7294 4 года назад

    Thanks Raghav for such a clear presentation & it helped a lot. Also could you please help with the steps of implementing data files in BDD,if it is possible?

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Pradipa, I will check, Although you can also take reference from cucumber videos here - automationstepbystep.com/

  • @ksmitan
    @ksmitan 4 года назад +1

    Hi Raghav ,I am using Katalon STudio 7.2 and I dont see the Warning about no glue code when I author feature file and save it .

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi, From ver 7 many features have gone commercial, I will request you to check if the feature is available for free. This video will help - ruclips.net/video/6OzLz0x4E8s/видео.html

  • @rizkiakbar3758
    @rizkiakbar3758 4 года назад +1

    Hi Raghav, thank you for your vids. I have a question. What if we want to make precondition for another feature? Example, I have done creating Login feature. But I want to edit my profile, which is require to login first. Is that any ways to make login be a precondition? So I don't need to make login step again bcs I already make login feature. Thank you!

    • @RaghavPal
      @RaghavPal  4 года назад

      Yes, you can just add a statement in feature file and in its step definition call the required test case. YOu can get the code when you add a test case in keyword Call Test and goto the script mode. Check this - ruclips.net/video/FU7XmeFH1u4/видео.html

  • @beautyna1
    @beautyna1 Год назад

    Hi Do you have a video with katalon and object
    spy ? This was a great video as well.

    • @RaghavPal
      @RaghavPal  Год назад

      Yes, can check Katalon Studio playlists here - automationstepbystep.com/

  • @sunainasharma6640
    @sunainasharma6640 5 лет назад +1

    Great work, Thanks alot.

    • @RaghavPal
      @RaghavPal  5 лет назад

      You're welcome Sunaina

  • @jamseenaaa9028
    @jamseenaaa9028 2 года назад

    For training purpose we have taken zomato and run test in that case we dont have module link... So which test can use so for

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Jamseena, you can try

  • @hajersassi5317
    @hajersassi5317 3 года назад

    Hello Raghav,
    Thank you very much for all your videos.
    Is it possible to use other Regex? Instead of (.*)
    If yes , are they any pre setup or pre definition to put in place?

    • @RaghavPal
      @RaghavPal  3 года назад

      Yes, you can try Hajer

  • @victoralfonsoramos3734
    @victoralfonsoramos3734 4 года назад

    Hi raghav, excellent video, I am implementing Katalon with cucumber and it helped me a lot. but I have a problem. Duplicate step definitions, how can I correct this? thanks.

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Victor, I believe some of your step definition code matches more than one statements of the feature file. Check this - stackoverflow.com/questions/44111353/duplicate-step-definition-in-cucumber

  • @tangeokgeok9096
    @tangeokgeok9096 4 года назад

    Hi, may i check how we do assertions, i was able to do a normal assertequals using testng in normal test cases, however, when comes to BDD test definition grovvy script, i am getting this error. Keyword runFeatureFile was failed (Root cause: java.lang.NoClassDefFoundError: org/junit/runner/Result
    at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy:78)
    at com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords$_runFeatureFile_closure1.doCall(CucumberBuiltinKeywords.groovy)

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Tan, you will need to add required libraries

  • @RizkySyaiful
    @RizkySyaiful 5 лет назад

    Thanks for the video! Really clear & helpful.
    Can we create a Cucumber without do any web recording?
    Sure we need that in order to do first-test development (creating the runnable testing script before doing any development---including creating the static html first )

    • @RaghavPal
      @RaghavPal  5 лет назад

      Yes you can, On cucumber runner, you can check the next video of this playlist

  • @jayeshdalal7
    @jayeshdalal7 5 лет назад +1

    Hi Raghav,
    How you set run configuration , to run feature file is there any classpath we have to set ?
    please let me know ,i am unable to run feature file .

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      Will post a video tomorrow on this Jayesh

  • @anavazquez893
    @anavazquez893 4 года назад

    Thanks for the tutorial, it was really helpful!

  • @victoralfonsoramos3734
    @victoralfonsoramos3734 4 года назад

    hello Raghav, excellent video, thanks for sharing the knowledge. could you please give me a hint how i can implement an excel data instead of having all the data in the "Example:"

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Victor, I will try to add a session, You can try online help till then

    • @victoralfonsoramos3734
      @victoralfonsoramos3734 4 года назад

      @@RaghavPal thanks.
      I'll be waiting.

  • @chetansubhas
    @chetansubhas 4 года назад

    Thanks for the vid. I have a question. How can we pull the variable parameters in the BDD feature file from the Excel sheet? TIA

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Chetan, you can run this in a test suite and rest of the process will be same as shown here - ruclips.net/video/tu5Zc89w6oQ/видео.html

  • @mohamedzahid8280
    @mohamedzahid8280 4 года назад

    Hi Raghav,
    I tried executing the feature file but getting an error as below
    020-04-08 12:57:36.278 ERROR c.k.k.core.main.WSVerificationExecutor - ❌ Verification FAILED.
    Reason:
    com.kms.katalon.core.exception.StepFailedException: Feature file 'Include/features/Login.feature' was failed
    at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:50)
    at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy)
    Please help me out in this.

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Zaid, just check if you have added some scripts/verification in the step definition that has failed. You can try to debug like this - ruclips.net/video/ew7NSJeK53w/видео.html

  • @victoralfonsoramos3734
    @victoralfonsoramos3734 4 года назад

    hello, how are the features related to their steps ?, if you have more than one feature and many scripts as they relate to each other. since I have this error:
    cucumber.runtime.AmbiguousStepDefinitionsException: "The user navigates to the application page through the URL" matches more than one step definition:
    "The user navigates to the application page through the (. *)" In loginsteeps.navegar_URL (String)
    "The user navigates to the application page through the URL" in excelSteps.navegar_URL ()

    • @RaghavPal
      @RaghavPal  4 года назад

      Here you will need to add unique steps and step definition, you can also see how to use cucumber runner ruclips.net/video/7l_k2SJeBs4/видео.html

  • @falihh8838
    @falihh8838 3 года назад

    Nice content sir!!
    I have a questions, how to get data example from table csv/excel?
    Thank you before

    • @falihh8838
      @falihh8838 3 года назад

      Ex:
      When user input
      Example:|username|
      |admin123|
      Can i get data from excel like:
      @Source:resources/namefile.xlsx
      Example :
      |username|

    • @RaghavPal
      @RaghavPal  3 года назад

      You can, you will have to parameterize the values in the test case and in a test suite do mapping. You can take example from this - ruclips.net/video/tu5Zc89w6oQ/видео.html

  • @ianroyfuentes8308
    @ianroyfuentes8308 3 года назад

    Its possible to use profile global variables for the test data using BDD? i mean replace the examples to global variables ?

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Ian, I am not too sure on this, How exactly you are using BDD with Postman

    • @ianroyfuentes8308
      @ianroyfuentes8308 3 года назад

      @@RaghavPal sorry for the late reply. Many thanks for your reply I just want to use the examples data on include to be global variables.
      Is it possible?
      Scenario Outline: Title of your scenario outline
      Given I want to write a step with
      When I check for the in step
      Then I verify the in step
      Examples:
      | name | value | status |
      | name1 | 5 | success | - this value to be global variables on the project
      | name2 | 7 | Fail | - this value to be global variables on the project

    • @RaghavPal
      @RaghavPal  3 года назад

      Yes you can do that you will need to do it in scripts

  • @tiendungngo4747
    @tiendungngo4747 4 года назад

    Could you give some comparation between Robot framework and Katalon. Which one do you prefer?

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi, In robot framework you can add libraries and then write your scripts. In Katalon you will have a lot of things in-built.
      RF is Free, KS is commercial

    • @tiendungngo4747
      @tiendungngo4747 4 года назад

      ​@@RaghavPal So which one do you prefer? As I know that, many features were moved from Katalon free version to Katalon to paid version.

    • @RaghavPal
      @RaghavPal  4 года назад

      If you are looking for a complete free option and are ready to do setup yourself go with RF. Else Katalon is good

  • @Jay_Rodrigo
    @Jay_Rodrigo 3 года назад

    Hello, when i execute a test suit, it doesn't upload to TestOps.
    The testcases were built by "run with tags"
    But the manual tests are uploading normally.
    Do you know what the problem might be? Thank you.. amazing Tutorial! It's helping me a lot!

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Hi Rodrigo, i will do a hands-on and check, meanwhile also get in touch with katalon support

  • @BrunoUthman
    @BrunoUthman 4 года назад

    Hey Raghav, just a update,
    currently the bdd feature file is validating the "Example" statement, I got this issue.
    so, if you want create a bdd with no parameters you must create like this (empty examples):
    Feature: Title of your feature
    Scenario Outline: Title of your scenario outline
    Given I want to write a step
    When I check for the step
    Then I verify the in step
    Examples:
    | |
    | |

    • @BrunoUthman
      @BrunoUthman 4 года назад

      pin this comment if you don't mind =)

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Thanks Bruno, will add in Description

  • @rahmandrm21
    @rahmandrm21 3 года назад

    how to use custom keyword in step definition ?
    import Customkeyword but not works

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Rahman, pls check this forum.katalon.com/t/bdd-testing-step-definition-files-is-not-able-to-recognize-the-custom-keywords-from-plugin/40449

  • @Joint_Soundz
    @Joint_Soundz 3 года назад

    thanks for your video, it was helpful

    • @RaghavPal
      @RaghavPal  3 года назад

      You're welcome Andrew

  • @swapnaswaps9715
    @swapnaswaps9715 4 года назад

    Hi raghav, can we implement the same using java language instead of groovy.If so can u please upload the video using java language,it will help me a lot.Thanks in advance!!

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Swapna, Although there is option to create a Java class in Scripts folder, I believe for Step Definition the option is Groovy

  • @cameronmasterton5605
    @cameronmasterton5605 3 года назад

    Thanks for the tutorial, I think it will help me get started on using BDD and Katalon.
    One question "Why does the password '456' not get added into the password field when you execute the script?"

    • @RaghavPal
      @RaghavPal  3 года назад

      Pls tell me the time in the video

    • @cameronmasterton5605
      @cameronmasterton5605 3 года назад

      @@RaghavPal 25:20- it enter 456 on the automation test but returns validation field can't be empty.

    • @RaghavPal
      @RaghavPal  3 года назад

      Okay that is application behaviour, when you enter wrong credentials, it shows message and clears the password field

  • @pb6096
    @pb6096 5 лет назад

    Hi Raghav how can I create test in katalon with dynamic fields eg: when you create enquiry which generates new enquiry Id , so how can I point my test case to the newly generated Id .
    Thanks

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi in case you need random number. Check this - forum.katalon.com/t/how-do-i-set-a-random-number-in-a-text-field/10598/4

  • @chevinpratama3571
    @chevinpratama3571 4 года назад

    hi Raghav
    why in my catalon, I cant see selection generic when i creat project? WEB,API/Service and Mobile. Im sorry my english its not good. Nice to meet you and thank you hehe

    • @RaghavPal
      @RaghavPal  4 года назад

      Hi Chevin, What ver are you using.

    • @chevinpratama3571
      @chevinpratama3571 4 года назад

      @@RaghavPal katalon hehe
      Raghav,do you know script negatif testting ? Where I use script like that ? Test suite ? Please Made video like that :) I hope example username, password and login in form login hehehe

    • @chevinpratama3571
      @chevinpratama3571 4 года назад

      @@RaghavPal 7.2.1 katalon studio, not enterprise

    • @RaghavPal
      @RaghavPal  4 года назад

      Okay, the generic option is not there now, I will do the session on the topic

  • @MKKC1234
    @MKKC1234 3 года назад

    hi Raghav, i'm trying to import BDD test cases from jira into katalon studio, but the feature file created is always empty, can u assist please

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Mariana, I have not tried JIRA integration, pls check if you get any message, Do setup again

    • @MKKC1234
      @MKKC1234 3 года назад

      @@RaghavPal by doing the setup again, you mean of the jira integration?

    • @RaghavPal
      @RaghavPal  3 года назад

      Yes, and check if anything was missed. I am not very sure on the JIRA part

  • @BajajShikhar
    @BajajShikhar 5 лет назад

    Can we do BDD approach for API testing from katalon . I am trying but its giving me errors

    • @RaghavPal
      @RaghavPal  5 лет назад

      Hi Bajaj, we can, will need to see your details of setup and logs

  • @zakariajanah5735
    @zakariajanah5735 3 года назад

    Hello sir, I don't get the result like you
    here is my console ,I don't get cucumber Reports
    I am inside navigateToLoginPage
    I am inside enterCredentials
    I am inside clickLogin
    I am inside Homepage

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Hi Zakaria, I will need to check your setup. Pls check again with the video step by step

    • @zakariajanah5735
      @zakariajanah5735 3 года назад

      @@RaghavPal Thank you for replying, I followed every step in the video, only one that I don't have available since I am using the free version, I can't choose generic project, I don't know if that is what made the difference.

    • @RaghavPal
      @RaghavPal  3 года назад

      The project type should not be an issue, and as I know from here - www.katalon.com/pricing/ the BDD feature is available in Free ver.

  • @mounicapapisetti3050
    @mounicapapisetti3050 5 лет назад

    Tq so........much sir.

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      You're welcome Mounica

  • @shashanksrivastava9181
    @shashanksrivastava9181 4 года назад

    can you please guide how to remove SLF4J errors in katalon studio.

    • @RaghavPal
      @RaghavPal  4 года назад

      Will need to be specific to troubleshoot. Can also check in katalon forum

  • @DJ-ll4zb
    @DJ-ll4zb 4 года назад

    Sir, I face a problem, can you help me to solve it?

    • @RaghavPal
      @RaghavPal  4 года назад

      Pls tell me

    • @DJ-ll4zb
      @DJ-ll4zb 4 года назад

      @@RaghavPal I want to compare the data in a test case with same script. The data stored in excel file. If I run 3 times with different data, I want to verify whether the data that I test ia same with the existing data. If I change the data from excel file, it will show data not matched message in the report. I have no idea what command should I need to add

    • @RaghavPal
      @RaghavPal  4 года назад

      Use Checkpoints - ruclips.net/video/e26Dp8Jnwzg/видео.html

  • @shahbazshiekh9001
    @shahbazshiekh9001 2 года назад

    Hi Raghav, thank you so much for this tutorial and the runner tuturial really helped out. If you could please help me with this issue - I have made two step definitions and two feature files, i am trying to reuse the method from A to B step files - but i keep getting errors .. i tried calling the instance and then added the method from the previous stepfile still no luck ---> class AMPVerifyAllUIElementsStep {
    def AMPChapterOverviewStep = new AMPChapterOverviewStep ();
    @Given("Test user navigates to software solutions page and enters (.*) and password to login to portal page")
    AMPChapterOverviewStep.LoginPage_TestUserLogin()
    I also tried --> LoginPage_TestUserLogin()
    please help thanks :)

    • @RaghavPal
      @RaghavPal  2 года назад

      Hi Shahbaz, will need to see the setup, Can try again on a fresh setup and follow all the steps

  • @ishan23786
    @ishan23786 3 года назад

    Hi Raghav...Thanks for the wonderful tutorial...Just one query.... When I am using the Run Feature Folder command it is not giving the feature file code as the output along with the groovy code(below)...Why is it so? Also it is not readable....Please let me know how to include the pretty parameter at folder level to generate readable output and is it expected that the Given When Then statements will be printed when we run the feature folder....
    Scenario Outline: Title of your scenario outline # /Users/ishandhaliwal/Katalon Studio/BDDCucumberDemo/Include/features/Login.feature:3
    Given User navigates to login page
    When User enters and 
    And Click on login button
    Then User is navgated to homepage
    Examples:
    Scenario Outline: Title of your scenario outline # /Users/ishandhaliwal/Katalon Studio/BDDCucumberDemo/Include/features/Login.feature:12
    ......I am in TC1.......
    Given User navigates to login page # LoginSteps.user_navigates_to_login_page()
    ......I am in TC2.......
    Username is: ABC
    Password is: 123
    When User enters ABC and 123 # LoginSteps.user_enters_username_and_password(String,String)
    .....I am in TC3.........
    And Click on login button # LoginSteps.click_on_login_button()
    .....I am in TC4.........
    Then User is navgated to homepage # LoginSteps.user_is_navgated_to_homepage()
    1 Scenarios (1 passed)
    4 Steps (4 passed)
    0m0.015s

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Ishan, pls check if you have followed all the steps, Can also check some examples online

    • @ishan23786
      @ishan23786 3 года назад

      @@RaghavPal Hi Raghav... I did exactly like the steps and also matched it with Katalon documentation... I am getting this result when I run Feature folder only... And not when I run Feature File..

    • @RaghavPal
      @RaghavPal  3 года назад +1

      I will share if I get any information on this

    • @ishan23786
      @ishan23786 3 года назад

      @@RaghavPal thanks for the effort Raghav...😅