Selenium Framework for Beginners 25 | TestNG How to create Dependencies

preview_player
Показать описание
Today we will learn
1 How to create test dependencies

2 What happens when tests have priority set

3 How to create dependencies on multiple tests

4 How to create group dependencies

5 Using regular expressions

------------ UI TESTING ------------

------------ API TESTING ------------

------------ MOBILE TESTING ------------

------------ CI | CD | DEVOPS ------------

------------ VERSION CONTROL SYSTEM ------------

------------ PERFORMANCE TESTING ------------

------------ PROGRAMMING ------------

------------ IDE ------------

------------ MAVEN ------------

------------ OTHERS ------------

Keep Learning,
Raghav

----------- Connect with Raghav ------------

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

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

Hi Raghav, Thanks for the tutorials.They are really helpful. One query - I have a test method B that is dependent on other test A and both have their own data providers.For each of these test methods there are two sets of data to achieve data driven testing. I need them to be invoked in such a way that TestA runs for it’s 1st data set ; Test B runs for it’s first data set and then again Test A runs for it’s 2nd data set ; Test B runs for it’s 2nd data set. But If I use dependency on Test B, it gets executed only after Test A gets invoked for all of it’s data set. Can you guide me how this can be realised please using grouping and dependency together ?!

shrikanthn
Автор

this is nice tutorial naveen
but i want know that
in first test case I move to the review page of easemytrip flight module
how can i open the traveller page
in the second test case of same easemytrip flight module

socialmediahappy
Автор

Hi Raghav... Dependsonmethods is only applicable when all @Test methods are in same class and if dependencies are in different class then dependsongroups is applicable??

pramitaghosh
Автор

Hi Raghav, when we are executing the script with bunch of classes, some of the testcases are skipping in the testclass there is no dependencies, it happens only when we run all the testclasses At a time, where as if I run individual testclasse it works fine and all are passing

KkB
Автор

What is the syntax for depends on group and depends on methods while writing TestNG.xml

danieljesu
Автор

Hi Sir, dependsOnGroups and dependsOnMethods not working properly when methods have in different classes. I have so many dependent TCs in my Application, if I run single TC then its working fine if I run class (Ex. Class1>Method 1 dependent on> class2>Method 2 ) then all TCs in other class (Class2 All TCs) executing first.

asifshaik
Автор

HI Raghav, How this will work for method/groups mentioned in different classes, please explain.

suresh
Автор

Hi,

When we created grouping/dependancy on class 2, why it’s running as class 2, 3 and 1 and not 2, 1 and 3??

ishitashah
Автор

Hello Raghav, I've Login Test in Different Package.
I need to call Login Test from other packages.
Do you know how can I achieve this?
Thank you.

shraddhagore
Автор

We have multiple test cases but all test cases are not in same class each test case is in another class but all are depends on each other how to call text1 in text2. If the testcases are in same class we can use priority accordingly we can run if the text cases are in another class how to connect each cases

wasimakram-nzgq
Автор

Hi sir I have login test in one class and next test case in another class without executing login test iam not able to do next case i.e, next class is depend on login class but both the test cases are not in same class, how to use login text case in next case which is in another class can you please help me on this

wasimakram-nzgq
Автор

Sir @7:25, it run test 2 then test 3 then test 1.
but test 1 depends upon test 2, so why not it run as test 2 then test 1 then test 3...🤔

aloksharma
Автор

Hi Raghav. Thank you for lesson. But for last regular expression I got >>"depends on nonexistent group "sanity.*""

BogemiaRegent