#7 - What is

Ғылым және технология

In this video, I have explained what is background keyword in #Cucumber BDD framework.
Full Cucumber 6 latest 2020 videos - playlist: • Cucumber BDD Framework...
As per cucumber official documentation:
Background:
Occasionally you’ll find yourself repeating the same Given steps in all of the scenarios in a Feature.
Since it is repeated in every scenario, this is an indication that those steps are not essential to describe the scenarios; they are incidental details. You can literally move such Given steps to the background, by grouping them under a Background section.
A Background allows you to add some context to the scenarios that follow it. It can contain one or more Given steps, which are run before each scenario, but after any Before hooks.
A Background is placed before the first Scenario/Example, at the same level of indentation.
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
kzread.info%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/COJqZUPB02r5sB7...
Paid courses (Recorded) videos:
naveenautomationlabs.com/reco...
For Java & Selenium - naveenautomationlabs.com/selen...
For API (Manual + Automation) - naveenautomationlabs.com/manua...

Пікірлер: 42

  • @jeyhunaliyev1765
    @jeyhunaliyev17653 жыл бұрын

    always learning something new in Naveens Channel. this guy is not only teaching us tools, programming, framework and so on he is sending us a message on the background how to be a passionate about what we are trying to achieve

  • @neslinkaragoz
    @neslinkaragoz2 жыл бұрын

    so grateful to have your channel! Thank you for all your efforts Naveen :)

  • @Poornima_K03
    @Poornima_K033 жыл бұрын

    Thank you for showing about the "Background" Keyword.Easy to understand.

  • @naveenautomationlabs

    @naveenautomationlabs

    3 жыл бұрын

    You are welcome!

  • @SumitKarmakar
    @SumitKarmakar3 жыл бұрын

    Thanks for putting so much effort into educating us.

  • @subhashreesahoo2233
    @subhashreesahoo22333 жыл бұрын

    Thank u... For your help.. Understand cucumber easily.. Just no words

  • @naveenautomationlabs

    @naveenautomationlabs

    3 жыл бұрын

    Most welcome 😊

  • @kiransingh8239
    @kiransingh82392 жыл бұрын

    Too good explanation ,thanks a lot for this Naveen

  • @user-yb2fc1ur6g
    @user-yb2fc1ur6g3 жыл бұрын

    Continuously watching playlist...thanq for easy explanation 🙏

  • @naveenautomationlabs

    @naveenautomationlabs

    3 жыл бұрын

    Most welcome 😊

  • @jinijose8733
    @jinijose87333 жыл бұрын

    Hi Sir, Thank you so much for your wonderful teachings.

  • @naveenautomationlabs

    @naveenautomationlabs

    3 жыл бұрын

    You are most welcome

  • @KuldeepKumar-et2vc
    @KuldeepKumar-et2vc3 жыл бұрын

    Thanks for sharing the Background concept, I have one query that how 'Maven' identifies which 'TestRunner' file it needs to execute (in case there are more than one files present)

  • @ptharunkumar2509
    @ptharunkumar25093 жыл бұрын

    It was nice and clear explanation makes me to watch further 👌

  • @naveenautomationlabs

    @naveenautomationlabs

    3 жыл бұрын

    Glad it was helpful!

  • @danabawar5372
    @danabawar53723 жыл бұрын

    Naveen your really good, but when you explain an issue and before the explanation, you give us real Exp it is super good like in this video. I know most of your topics have real Exp but some of them not, please start with Exp then jump to the technology. I really Appreciated you Naveen for the hard work you do.

  • @govardhanreddy5949
    @govardhanreddy59493 жыл бұрын

    Can we run the background steps with the combination of tags ?If we can run it then the the tags should be written before background keyword?

  • @yashuy3279
    @yashuy32792 жыл бұрын

    Thank you Sir 🙂

  • @reikoxan
    @reikoxan2 жыл бұрын

    Trying to figure out how to write Gherkin tests at work and looking at the best practices for gherkin. This was confusing because i didnt see how their examples would fit into automation code. It would always be Given user is on the product page When ... Then... I was thinking how does the user get to the product page when they have to login and do some navigating which was contradicting cucumber implementaion where you have a method that would be re-used over and over but in this example you would have to write out a new method for the user to login and navigate to the product page. Now i can use background to call methods @Given @When @Then to get me to the product page re-using previous code. This tutorial cleared all that up for me thank you.

  • @automationtesting1332
    @automationtesting13323 жыл бұрын

    I dont want to create multiple runner classes for each and every Feature. Can I directly run my Feature file through Maven commands without creating Runner class?

  • @sanjaysabane2683
    @sanjaysabane2683 Жыл бұрын

    nice thank you 👍😊

  • @sathishyadav6517
    @sathishyadav65172 жыл бұрын

    Thank you

  • @ahmettemel8245
    @ahmettemel82452 жыл бұрын

    thank you

  • @socialmedia434
    @socialmedia4343 жыл бұрын

    hi Naveen, @Naveen AutomationLabs in the above background there is "Given When And Then", in the scenario there is "When and Then". So in the final scenario we have "Given When Then And When Then" , my question is can "When" come after "Then"?

  • @rutujaubhate6902
    @rutujaubhate69022 жыл бұрын

    Thank you sir for wonderful teaching....have one doubt,I have multiple environments on which I need to perform some tests. Each environment has its own set of urls and credentials to log in. Can we do that in background concept??

  • @sridhar6358
    @sridhar63582 жыл бұрын

    test-output folder is not getting generated for me in my cucumber project can you tell me what could be the reason for it

  • @socialmedia434
    @socialmedia4343 жыл бұрын

    Hi Naveen, should we maintain a separate TestRunner file for each feature file? or can we use one TestRunner file for multiple feature files?

  • @pranitachikorde603
    @pranitachikorde6033 жыл бұрын

    What if I want to call background only for some scenarios? Could you please help

  • @RohitTater
    @RohitTater3 ай бұрын

    Should we use cucumber feature file or excel file to save testing data??

  • @venkig4052
    @venkig40523 жыл бұрын

    How to ignore Background logic to one of the scenario in feature file?

  • @NsquareRvideos

    @NsquareRvideos

    Жыл бұрын

    did you got the answer

  • @waahresindhiyon4689
    @waahresindhiyon46893 жыл бұрын

    Thanks Naveen for this beautiful content but I have a small question? Suppose I write background steps for a particular feature file will they also be applicable for other feature files if same goes for step definitions as well? Can you please help me with this

  • @user-pq2wk2tx5j
    @user-pq2wk2tx5j10 ай бұрын

    Hi Naveen, On using the background feature, the basic steps are executing fine but when the actual step of the scenario comes, the browser opens twice. So pls suggest how to overcome it.

  • @satyaguddu508
    @satyaguddu5083 жыл бұрын

    Hello Naveen, is there way to skip background for specific scenario inside a feature file which contains 5 scenarios. for 4 scenarios I need background and for one i don't need it. First of all is this possible or not. If possible is it best practices or not?

  • @sweetthirty2
    @sweetthirty22 жыл бұрын

    Hi naveen what happens if our background fails?? Do we get any error for this

  • @jainshilpi3
    @jainshilpi32 жыл бұрын

    Hi naveen,could you please share link of this git repository

  • @garimachauhan2822
    @garimachauhan28223 жыл бұрын

    How to make Background data driven

  • @ashwinisadhu2946
    @ashwinisadhu29463 жыл бұрын

    Waiting for selenium with java

  • @panipraneeth7774
    @panipraneeth77743 жыл бұрын

    Hi Naveen Sir, I have one doubt Suppose my project consists of 5 feature files and in each feature file 2 scenarios created. In Background section i have added my Login steps in all the 5 features files.It is not the good practice to do.Kindly provide me the solution to run login steps at once against each feature

  • @amruta_pawar

    @amruta_pawar

    3 жыл бұрын

    You can use cucumber hooks. Write your login implementation in @Before tag.

  • @naveenautomationlabs

    @naveenautomationlabs

    3 жыл бұрын

    will cover this part in hooks.

  • @prosperg186
    @prosperg1863 жыл бұрын

    I am amazed at the creator of this programming language. Instead of using the keyword 'background', a keyword of perhaps 'repeat' could have been used instead? It's hard to remember these keywords! So foolish.

Келесі