Selenium with Cucumber 7.x - Java BDD Framework - Mini Project | Crash Course
Vložit
- čas přidán 27. 03. 2023
- Selenium with Cucumber 7.x - Java BDD Framework - Mini Project | Crash Course
Tools/Tech used:
1. Cucumber - Java Lib / Selenium 4.x
2. JDK 1.8
3. Maven
4. Cucumber-TestNG
5. Cucumber, Gherkin BDD Plugins in IntelliJ
6. IntelliJ - IDE
7. Gherkin
8. Feature Files
Schedule a meeting in case of any queries/guidance/counselling:
calendly.com/naveenautomation...
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
czcams.com/users/Naveen%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/9FrG-KzGlvxjNmQ1
Naveen AutomationLabs Paid Courses:
GIT Hub Course:
naveenautomationlabs.com/gitc...
Java & Selenium:
naveenautomationlabs.com/sele...
Java & API +POSTMAN + RestAssured + HttpClient:
naveenautomationlabs.com/manu... - Věda a technologie
Git Repo URL: github.com/naveenanimation20/Cucumber7.xTestNGLatestPOC
❤
❤❤🔥🔥
Hatsoff to you Naveen
❤ super Thala
Hitting like and posting the comment before even completly going through...that confidence it gives by this channel, thanks a ton naveen
Thank you Naveen, excellent resume to refresh some concepts and very helpful new hints!
Thank you Naveen. Crisp and to the point.! You are doing a great work by sharing this knowledge. 👍🏽
Great explanation as always. Thanks for all the efforts Naveen !
Thank you so much
thank you naveen you saved me ,i have created the framework for my project from the scratch from this ,its really helpfull,God bless you :)
Thank you Naveen. Pure 🔥as usual! 👊💥
Thanks a lot for this amazing project
you make the videos which are most important, m a fan now
Thank you so much naveen! And thanks for sharing GIT repo. ✨👍
Thanks Naveen. Much awaited
Thanks for the video. It's helped me to setup the cucumber selenium automation in my project. I have few queries:
Actually I have put some assert statement in step definitions, when one assert statement fails, my script stops execution. I have tried soft assertion as well. Not sure how to use it in cucumber framework.could you please advise?
Thank you so much Naveen 🙏🙏
Lots of doubt cleared
Request you to please create one video with spring boot integration on this project
Thanks Naveen. Great video.
Really helpful
Great bhaiya J!i!!
Thank you so much❤🥰🙌
Please make one video on Smoke testing in existing automation scenario
Amazing stuff . So easy way to create the bdd cucumber project using Java .
Thanks Naveen for this crash course .❤❤❤
is it working if we create same project using eclipse?
@@Raviteja_Maskani yes you can clone this project and import the same in Eclipse.
Hi Naveen
Thank you for the video
I got 2 questions:
1) this is already asked above - how can we control the threads of parallel execution if I have more then 30 scenarios in all the feature files
2) can we instilase the chrome webdriver in a until Java class and extend that in the pages
To avoid creating constructor in every page
Is this good idea
thx Naveen, where you add wait for element? o use only wait implicit?
Awesomeeeee
Thank you Naveen. Please make one crash course on mobile testing with appium and java
Hi, when you with 5 threads.Do all scenarios run in 5 browsers? What the level of the parallels?
Thank you Naveen, but where is the chrome driver ?
Thank you❤
thanks Naveen its a g8 video , i liked that runner vs testng,xml vs parallel execution explanation
Is there a way to achieve Cross brower parallel exeution with this?
@naveen where we have setup the chromedriver , it been a long day i haven't work with selenium can you please explain me
Can I use paraneters in TestNG xnl for the case ?
Excellent video Naveen. Please Post similar video for Rest Assured framework from scratch also
Hi Suresh, Note that latest versions of TestNG and Rest Assured in Maven repositories are having vulnerabilities. You will need to decide accordingly.
ctrl + click in feature file steps does not navigate to step def in eclipse. Is there any specific plugin for it ?
If we run the script multiple times report should not overwrite, how to implement in cucumber @Naveen pls help me with that
Hi Naveen, Thank you for the explanation. With this I have developed a framework. Can you please help me with the error, cucmberException: Failed to instantiate stepdefintions.loginPageStep. Not able to proceed because of the error.
Hi Naveen. One question. Is there any specific formate to give method name in stepdef java class or I can write anything ? Like you mentioned public void "i_click_on_the_login_button" in LoginPageStepDef?
yes in any format you can write. There is compulsion to write method name like : "i_click_on_the_login_button"
hello @naveen can u plz make videos on serenity with restassured and appium
Hi Naveen,
Can you send IntelliJ - IDE version
Thanks
@Naveen Sir , How we can pass the test case Id and update the test result in Rally
Running OS Win10 I ran into issue using JDK 8, but works fine using JDK 11.
Hi Naveen...i face the issue in controlling the thread count. Consider there are more than 20 feature files, and in testng.xml, thread count is configured as 5, but on running, it is still running all 20 feature files at once, could u suggest me, how to resolve it
Hi @umamaheswari4267,I'm also facing the same. Were you able to control the thread count for execution?
Hi Naveen , it was a good informative video . one question regarding cucumber reports uploaded to cloud . is it safe to use that if we are having sensitive information like credentials in feature file ? Can we disable report uploading to cloud ?
yes you can
Thank a bunch... But you could have cover windows also 😢as most of the people are not afford for apple Mac Naveen...
Hi naveen,
Which cucumber version should i use with Jdk 18 as it is throwing error when executed with latest cucumber version ..
Plz suggest
Best to use jdk 11
Thanks for response 🙏
Even though I created the stepdefs i still get error as undefined step defs. Unable to proceed
not able to execute in parallel, getting no feature files available
Awesome video Naveen, how did you resolve that @Override redline, I cant seem to solve it or at least see how you did.
Change method name from scenario to scenarios
I've followed the same process, but driver is not picking the page objects locator methods, how to solve it?
I keep getting Symbol not found in TestRunner Class.
Cannot resolve symbol 'testng' , Cannot resolve symbol 'junit'.
Can anyone help ?
Tried restarting and invalidate cache but no luck.
The import cucumber cannot be resolved Getting this error
Hi Naveen, I am getting the below compilation error when I implemented the code. Even though I copied the same code from your repo but still has the same exception. Can you please help me solve this?
"....../src/test/java/runner/TestRunner.java:[5,30] cannot access org.testng.annotations.DataProvider
bad class file: C:\Users\Zarina\.m2
epository\org\testng\testng\7.7.1\testng-7.7.1.jar(org/testng/annotations/DataProvider.class)
class file has the wrong version 55.0, should be 52.0"
The error message indicates that TestNG-7.7.1.jar contains a class file (org.testng.annotations.DataProvider) that was compiled with Java version 11 (version 55.0), but the Java compiler that you are using is version 8 (version 52.0).
To resolve this issue, you have two options:
Upgrade your Java version to Java 11 or later. This will allow you to compile and run your code with the latest version of TestNG.
Downgrade your TestNG version to a version that is compatible with the Java version you are using. For example, you could downgrade to TestNG-6.14.3, which was compiled with Java version 8 (version 52.0).
Once you have made the necessary changes, rebuild your project and try running your tests again.
@@sayantan033 same issued I faced ,thanks for his suggestion. its saved my time
@@sayantan033 That helped me as well! Thanks!!!
Latest Cucumber 7.x - Java BDD Framework - Mini Project | Crash Course
Tools/Tech used:
1. Cucumber - Java Lib / Selenium 4.x
2. JDK 1.8
3. Maven
4. Cucumber-TestNG
5. Cucumber, Gherkin BDD Plugins in IntelliJ
6. IntelliJ - IDE
7. Gherkin
8. Feature Files
Why you use Maven Archetype quick start every time while creating Maven Project. Pls explain the logic behind same @naveenautomationlabs
I think it have inbuilt features in maven
@naveen, how did you get rid of the error on @Override at 37:09?
change function name from scenario to scenarios
Good catch! Thanks
@@Aj21093 Thanks
@@sysybaba420 thanks for asking this question
Hello, I am new to cucumber. Is it true, we can have max 10 scenarios is a feature file ? I tried it, but was able to create more than 10 scenarios in a feature file. Am, I doing something wrong, or my understanding is incorrect? Can somebody please help me to clear the doubt?
You can create N number of scenarios in feature file ...there is no limit .
can we do same project using Eclipse
Yea you can but intellij is having better cucumber plugins.
I got this error: Step undefined
You can implement this step and 3 other step(s) using the snippet(s) below:
Latest Cucumber 7.x - Java BDD Framework - Mini Project | Crash Course
Tech Stack:
1. Cucumber 7.x - Java Lib
2. JDK 1.8
3. Maven Build tool
4. Cucumber-TestNG for test runner and parallel execution
5. Cucumber, Gherkin BDD Plugins in IntelliJ for writing gherkin based feature file and mapping with step definitions
6. IntelliJ - IDE
7. Gherkin language
8. Feature Files
Wonderful explanation as always👌 could you please share some example for junit5 instead of testng in this scenario..
How to avoid hard coding data in feature file???
Hi Naveen, in the previous framework series, you have also used various files such as - hooks.java, config.properties, driverfactory.java, configreader.java,etc. which are not used in this video. Can you plz shed light on whether we should follow that approach or not? Thanks for all your amazing videos
This is just a crash course video on bdd not the full series.
@@naveenautomationlabs can we use those hooks driver factory and configreader to this testng runner?
where is testng & its concepts used in the code?????? Annotations, Grouping, Priority, etc
You don't need these Testng features in cucumber
Hi Naveen, first of all thanks for this amazing crash course but I have a big doubt over here regarding Hooks. I was expecting this doubt would be clear in this tutorial but wasn't that lucky.
Right now you have used Hooks annotations in one of your step definition class file[LoginPageStepDef.java] where you are initializing the driver and the same driver is then passed to Login Page Object.
Now if i create a Hooks class inside stepdefs package and put @Before and @After using methods in this class, How will the initialized driver value be passed to [LoginPageStepDef.java] as we cannot inherit Hooks.
So can you please tell me how to handle this. How to pass the same driver instance intialized in Hooks to other StepDefinition class files.
Thanks a lot for your wonderfull work and commitment
Can you please upload a video explaining the integration of allure reports with cucumber7 and junit5. Please include screenshot on failure as well as the folder structure and bundling this with jenkins.
What is fix protocol used in testing field can you explain it?
[RemoteTestNG] detected TestNG version 7.7.1
log4j:WARN No appenders could be found for logger (org.testng.TestNG).
log4j:WARN Please initialize the log4j system properly.
How to fix this?