Hello Raghav, Your videos helped me a lot to get a JOB in Accenture as "Test Automation lead" 7 months before . and am so happy in my work . If i have some doubts on any area I come back and refer your video again :)
@RaghavPal2 жыл бұрын
All the best Shafeek
@ashesds14 жыл бұрын
One interesting point. If you have methods annotated with BeforeTest,BeforeSuite etc they will not be run automatically if they are not included in the groups also. If we want the setup and tear down methods to run irrespective of your group classifications we could use alwayrun=true for the Before and after methods
@RaghavPal4 жыл бұрын
Thanks for the inputs Ashes
@luv966 Жыл бұрын
Thank you !!! i don't even want to know how long i would be trying to find out, whats wrong .. again... 🤬😅
@ravikumarshallagi97555 жыл бұрын
There is a typo in d test for Regression vs xml not sure if exclude worked correctly. vl hv to check ourselves to see.. You r doing good job.. Thanks for d content..
@RaghavPal5 жыл бұрын
Hi Ravi, will check it. Thanks for your message
@aakash39403 жыл бұрын
@@RaghavPal It got excluded.
@prashantht.v82895 жыл бұрын
Very neat and crisp explanation.. Very good job.
@RaghavPal5 жыл бұрын
Thanks for watching Prashanth
@RaghavPal5 жыл бұрын
Thanks for watching Prashanth
@TahayariDan5 жыл бұрын
This actually was useful ! Thank you very much for making this video and this playlist.
@RaghavPal5 жыл бұрын
You're welcome Tahayari
@akhildas63932 жыл бұрын
Very good👍
@RaghavPal2 жыл бұрын
Thank you very much
@nagalakshmikothuru6603 Жыл бұрын
really wonderfull series...very much seful to me...thank u
@RaghavPal Жыл бұрын
You are most welcome
@AC-vt1nq2 жыл бұрын
Excellent!!
@RaghavPal2 жыл бұрын
thanks
@smitavharavadekar75783 жыл бұрын
Thank you for in detail explained.
@RaghavPal3 жыл бұрын
You are welcome Smita
@shafeekmuhammed11753 жыл бұрын
Thank you
@RaghavPal3 жыл бұрын
You're welcome Shafeek
@fezacell24265 жыл бұрын
There is a type on the multiple group example. If a test method belongs to both included and excluded group, the excluded group takes the priority and the test method will be excluded from the test execution.
@RaghavPal5 жыл бұрын
Thanks for info addition
@ChandraShekar-nu8yq5 жыл бұрын
very nice and clear thanks a lot...
@RaghavPal5 жыл бұрын
You're welcome Chandra
@EasyWayLearn4 жыл бұрын
great explaination
@RaghavPal4 жыл бұрын
Thanks Mahendra
@kishore76dhaka4 жыл бұрын
God Bless you my friend
@RaghavPal4 жыл бұрын
Thanks for the wishes Towhid
@dipankarnag95375 жыл бұрын
Nice Explanation sir
@RaghavPal5 жыл бұрын
Thanks Dipankar
@dineshmohanty49662 жыл бұрын
Hello Raghav, I was wondering if its possible to execute certain tests only when the combination of groups match. For example, if one test has groups as "app" and "sanity" And There are other test methods present as well in the project/class. I want to executive tests which have "app" And "sanity" tags only and tests which have only app or sanity tags shouldn't run, is this possible? If so could you share some reference please? Thank you in advance.
@RaghavPal2 жыл бұрын
Hi Dinesh, you can create a separate testng.xml file and in that include the groups you need, So when you run this file, only the included groups will execute This link has good examples - www.javatpoint.com/testng-groups
@virenkumar38484 жыл бұрын
love u bro thanx thanx..
@RaghavPal4 жыл бұрын
You're welcome Biren
@divyangjani76005 жыл бұрын
excellent
@RaghavPal5 жыл бұрын
Thanks for watching Divyang
@hukamchand3304 жыл бұрын
Hi Raghav, Very good explanation. I have one question, something like this we can using "Batch" in testNG. What is the difference between batch and groups and when to use which one ?
@RaghavPal4 жыл бұрын
Hi Hukam, can you show me some example or link where batch is used, so I can refer and check
@svpradeep4 жыл бұрын
Hello Raghav, thanks for the above, clarification - can we club groups+parameters for parallel testing on testng.xml and run them
@RaghavPal4 жыл бұрын
Hi Pradeep, you should be able to do that. Pls try
@pujasaha54522 жыл бұрын
Hi Raghav..Thank u for the amazing content. Is it possible to control test case execution from datasheet instead of groups. Like can we provide in the datasheet with a column named"Execution Required" with value"Y/N" for each test case name.
@RaghavPal2 жыл бұрын
Yes, Puja you can do, will have to add script for that
@karnataka8863 Жыл бұрын
Group tag comes between suite and test tag right ?
@RaghavPal Жыл бұрын
Hi, In TestNG, the tag can be used at both the level and the level to group test methods together. At the level, the tag can be used to specify which groups of test methods should be included or excluded from the entire suite of tests. e.g. ... At the level, the tag can be used to specify which groups of test methods should be included or excluded from a specific test. e.g. In short, The tag can be used at both the level and the level in testng.xml file
@karnataka8863 Жыл бұрын
@@RaghavPal tq
@philb446211 ай бұрын
Thanks for another great video. There's something I'm stuck on. I have a class with multiple tests in it as per your example here. The results that get reported on the HTML report say the number of tests run is 1. It equates running one class with running one test when it reports. Is it possible to get it to report three tests run when I run one class with three tests in it, as per your example?
@RaghavPal11 ай бұрын
Phil Yes, it is possible to get your test report to report three tests run when you run one class with three tests in it. To do this, you need to use a different test reporting tool. The default test reporting tool in Selenium Java is the JUnit test runner. The JUnit test runner only reports the number of test classes that were executed, not the number of test methods. To get a more detailed test report, you can use a different test reporting tool, such as TestNG or Allure Report. TestNG and Allure Report can both report the number of test methods that were executed, as well as the number of test classes. To use TestNG or Allure Report with Selenium Java, you need to add the appropriate dependency to your project. You can do this using Maven or Gradle. Once you have added the TestNG or Allure Report dependency to your project, you need to configure your test classes to use the appropriate test runner. To do this, you can use the `@Test` annotation. Here is an example of how to configure a test class to use the TestNG test runner: ```java import org.testng.annotations.Test; public class MyTestClass { @Test public void test1() { // ... } @Test public void test2() { // ... } @Test public void test3() { // ... } } ``` To run your test class using TestNG, you can use the following command: ``` testng MyTestClass.java ``` To run your test class using Allure Report, you can use the following command: ``` allure generate allure-results --clean -o allure-report ``` Once you have run your test class, you can view the test report in your web browser. The test report will show you the number of test methods that were executed, as well as the number of test classes. I hope this helps
@philb446211 ай бұрын
@@RaghavPal Thank you so much for your detailed reply. What you wrote is what you showed in your video. That uses TestNG and so did I. When I open the html report it says 1 test was run despite it being 3 tests in 1 class. It reports class numbers and calls them tests while not reporting actual test numbers. That is TestNG doing that. I think it's because in the .xml file that class sits in a single tag. I need multiple such tags with different classes in them to show I want multiple tests reported. By doing that, I get multiple browser windows opening which is slower and potentially overloads the computer if I have hundreds of tests. My guess it what I'm hoping for is just not how TestNG works. I don't know why though. It seems fairly obvious to me that a class is not the same thing as a test, yet that's how it's categorised in the html report.
@RaghavPal11 ай бұрын
may be the case, if I get to know more on this will share
@philb446211 ай бұрын
@@RaghavPal Thank you. I really appreciate your fantastic channel. 👍
@basirobaidi6675 жыл бұрын
Thank you. Q? How to execute test cases from multiple classes using group?
@RaghavPal5 жыл бұрын
Hi Basir, you should be able to run them using testng.xml file. There are some videos to help - kzbin.info/aero/PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
@danieljesu87263 жыл бұрын
What is the difference by adding groups in test level vs suite level...Even though you explained in words ...I am not getting that part. Please explain with some example while reply .Thanks!
@RaghavPal3 жыл бұрын
Hi Daniel, sure, I will plan to add more examples
@Rahulsingh-wu4ni4 жыл бұрын
Sir, I have created a TestNG class or XML file but out is coming not correct. And I also use include in XML is still not working.
@RaghavPal4 жыл бұрын
Hi Rahul, will need to check the setup and logs
@ankitathakur19304 жыл бұрын
Hi Raghav, Here you have all @test annotation in a single class file. My question is if there are... lets say 100 class files, then does all need to be included in class tag ...can we have groups for classes?
@RaghavPal4 жыл бұрын
Hi Ankita, yes, we can create groups as we like and also do tagging
@RaghavPal4 жыл бұрын
Hi Ankita, yes, we can create groups as we like and also do tagging
@somanagurthisusmita6648 Жыл бұрын
@raghavpal I have the same question . do we need to include multiple class names in the testng.xml?
@divyangjani76004 жыл бұрын
what if there one group defined at class level . but one of method inside that class we are excluding it from testng.xml now if we run class will it run that method too? because method we are excluding but it is still under that class???
@RaghavPal4 жыл бұрын
Hi Divyang, I will need to try this. Can you try and check what happens
@AmitKumar-pc8wr4 жыл бұрын
Hi Raghav. Thanks for the video. Need help on this. I want to take group tags from my properties file. How to achieve that.
@RaghavPal4 жыл бұрын
Hi Amit, are you talking about parameterising the tags. Will need to check online
@justforyou96304 жыл бұрын
Hello sir, my groups does not work if we have before annotation , non of the before annotation execute if we do grouping . any solution other than Always = true?
@RaghavPal4 жыл бұрын
Hi, I checked online and looks like enabling the attribute alwaysRun=true is the solution for this. I will check more and update if I find anything on this stackoverflow.com/questions/46405840/before-suite-and-beforetest-methods-are-not-called-if-groups-are-executed-in-t
@jneeraj20115 жыл бұрын
i am not getting auto suggest in testng.xml file ..please suggest raghav.
@RaghavPal5 жыл бұрын
Hi Neeraj, can try to restart eclipse
@agreeamerica76205 жыл бұрын
@@RaghavPal I have the same issue on my Mac and tried to restart eclipse but didn't work.