Selenium Framework for Beginners 23 | TestNG Grouping | How to group tests

preview_player
Показать описание
Today we will learn What is Grouping in TestNG
Why to create Groups
How to create test Groups
How to run tests from groups
How to include / exclude groups

How to create MetaGroups
How to use regular expression
How to define groups at class level

What is Grouping

Grouping is a feature in TestNG where we can assign tests or classes to one or more group.

During execution, we can define what groups to include or exclude

This makes test management and execution very easy and efficient

PLAYLISTS

SELENIUM JAVA FRAMEWORK BEGINNERS

KATALON STUDIO

SELENIUM BEGINNERS

SELENIUM TIPS

SELENIUM PYTHON

SELENIUM BUILDER

JAVA

JAVA TIPS & TRICKS

JENKINS

JENKINS TIPS & TRICKS

JMETER BEGINNER

JMETER INTERMEDIATE

JMETER ADVANCED

JMETER TIPS & TRICKS

SOAPUI

POSTMAN

GIT & GITHUB

DOCKER

ROBOT FRAMEWORK

WEB SERVICES (API)

REDIS BEGINNER TUTORIALS

MAVEN

MISC

TOOLS & TIPS

QnA FRIDAY

SUNDAY SPECIAL

ALL PLAYLISTS

Like on FACEBOOK :

Follow on TWITTER:

Subscribe on YOUTUBE :

Like, Subscribe & Share
You can support my mission for education by sharing this knowledge and helping as many people as you can

________ ONLINE COURSES TO LEARN ________

Never Stop Learning
Raghav
Рекомендации по теме
Комментарии
Автор

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 :)

shafeekmuhammed
Автор

Very neat and crisp explanation.. Very good job.

prashantht.v
Автор

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..

ravikumarshallagi
Автор

This actually was useful ! Thank you very much for making this video and this playlist.

TahayariDan
Автор

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.

fezacell
Автор

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

ashesds
Автор

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.

dineshmohanty
Автор

Group tag comes between suite and test tag right ?

karnataka
Автор

Thank you. Q? How to execute test cases from multiple classes using group?

basirobaidi
Автор

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.

pujasaha
Автор

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?

philb
Автор

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 ?

hukamchand
Автор

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!

danieljesu
Автор

Hi Raghav. Thanks for the video.
Need help on this. I want to take group tags from my properties file. How to achieve that.

AmitKumar-pcwr
Автор

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.

Rahulsingh-wuni
Автор

i am not getting auto suggest in testng.xml file ..please suggest raghav.

jneeraj
Автор

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?

ankitathakur
Автор

Hello Raghav, thanks for the above,
clarification - can we club groups+parameters for parallel testing on testng.xml and run them

svpradeep
Автор

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???

divyangjani
Автор

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?

justforyou