No video

@Parameters in TestNg: How to pass parameter from testing.xml

  Рет қаралды 177,027

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Passing Parameters from testNg.xml (using @Parameters Annotation for Environment Variables):
• How to pass parameter from testing.xml to Test Cases
• What is @Parameters annotation in TestNG
• How to configure testing.xml file with Parameters tag
• How to define Environment Variables in testng.xml
• Run your test cases with testing.xml file
======================================================
***Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
/ naveenautomationlabs
Follow my Facebook Page:
/ naveenqtpexpert
~-~~-~~~-~~-~
Follow my Site/Blog: www.naveenautom...
========================================================
Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
• Selenium & Automation ...
~-~~-~~~-~~-~ Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
www.youtube.co...
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/...
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautom...
API Course: www.naveenautom... ➡️Get Our Courses✔️
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautom...
API Course: www.naveenautom...
-------------------------------
✔️SOCIAL NETWORKS
Facebook: / naveenqtpexpert
Twitter: / naveenkhunteta
Blog: www.naveenautom...
--------------------------------
Support My Channel✔️Or Buy Me A Coffee
Paypal: paypal.me/nave...
Google Pay: naveenanimation20@gmail.com
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة

Пікірлер: 83
@ragavendravignesh1028
@ragavendravignesh1028 6 жыл бұрын
I watched many videos for parameters in TestNg but you are the only who made it crystal clear. thanks....
@FitnessForAll
@FitnessForAll 4 жыл бұрын
I am following you for the past 1.5 years and I still remember once I checked your Subscribers because your content was really awesome. The subscriber's count was 503. Well the count has increased to 84K today.
@bestcricketbowling9947
@bestcricketbowling9947 2 жыл бұрын
245k now😍
@mithaleepardeshi
@mithaleepardeshi 4 жыл бұрын
To the point and completely understood the importance of Parameters. Thank you Naveen Sir.
@shrutitiwari8921
@shrutitiwari8921 2 жыл бұрын
I imported jcommander's package instead of testng as eclips gave me option and I chose it without observing. I tried to solved error last couple of hour ..Finally jumped here and got solutions as usual...Thanks naveen
@PreetiGupta-qz1nw
@PreetiGupta-qz1nw 5 жыл бұрын
Naveen, Your way of teaching is too awesome. Keep it up. Excellent Job.
@saitejaithagoni1168
@saitejaithagoni1168 3 жыл бұрын
Very underrated channel for all career defining concepts taught. Here. Should me in millions subscribers group.
@rakeshjaiswal4675
@rakeshjaiswal4675 4 жыл бұрын
6:15 testNG xml start. 16:28 using Browser in testNG.xml 23:55 Data Driven Approach.
@Praveenkumar-gy7wt
@Praveenkumar-gy7wt 4 жыл бұрын
awesome 501 users to 101k uses... awesome explanation.. thanks
@richadubey5939
@richadubey5939 4 жыл бұрын
It's 4 in the night oh wait its morning already :) and I can't stop learning on a roll, Thanks to awesome content and really helpful Thanks a Ton. Bud
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
Keep learning :)
@ssworks6149
@ssworks6149 2 жыл бұрын
tq naveen for uploade all the videos now i got the job because of you .and all the credit goes to you only
@aihaitipaziliti2655
@aihaitipaziliti2655 5 жыл бұрын
You are awesome, Naveen. Big tumps up ....💯👍👍👍👍 thank you.
@omkarpotdar2763
@omkarpotdar2763 Жыл бұрын
Thanks a lot Naveen for covering an extremely helpful and intresting topic.
@adepaliwal34
@adepaliwal34 Ай бұрын
You are simply amazing.
@poojadolly1262
@poojadolly1262 3 жыл бұрын
just wow.thanks for wonderful video
@Star-vg7ix
@Star-vg7ix Жыл бұрын
very simple and to the point! Very well done. Just hoping that you can zoom in on your screens in the future.
@user-rk1gi7oj9q
@user-rk1gi7oj9q 6 жыл бұрын
Thank you, Naveen! Great explanation from very beginning to the end point.
@KavithaManu2374
@KavithaManu2374 2 жыл бұрын
super sir nice explanationa i liked it
@KavithaManu2374
@KavithaManu2374 2 жыл бұрын
Sir can you take my mock interview please sir
@KavithaManu2374
@KavithaManu2374 2 жыл бұрын
Sir i have attended the interviews got rejected sir can you please tell me how can i prepare
@sheiksabreen1963
@sheiksabreen1963 2 жыл бұрын
Awesome...... amazing sir
@derrukumar3545
@derrukumar3545 Жыл бұрын
Thank You Naveen Sir
@priyankapradhan7106
@priyankapradhan7106 4 жыл бұрын
Thanks Naveen...U r Amazing...Love ur teaching styl.
@naveenautomationlabs
@naveenautomationlabs 4 жыл бұрын
Thanks for watching Priyanka
@nimrahussain7738
@nimrahussain7738 2 жыл бұрын
Thank you sir
@saumyamahapatra1749
@saumyamahapatra1749 2 ай бұрын
Hi @Naveen. Thanks for the tutorials. It really helps. Is there any tutorial which will tell when to use @Beforesuite / @BeforeTest /@BeforeClass together with practical examples ?
@prakashpandey2292
@prakashpandey2292 6 жыл бұрын
nice sir.. awesome knowledge u have and way of explaining is adorable...
@chandanmukherjee157
@chandanmukherjee157 5 жыл бұрын
Thank you very much Naveen Sir , this tutorial is awesome
@shivangichandra5362
@shivangichandra5362 3 жыл бұрын
Can we give parameters name in method body different from @Parameters Annotation name?
@sanjaykumar-wx1wt
@sanjaykumar-wx1wt 4 жыл бұрын
Hi Naveen, Thank you for the videos it is really helpful. Can you please make a video on HOW TO DEBUG related task. Thanks in Advance.
@Ramkishorepodugu
@Ramkishorepodugu 2 жыл бұрын
so nyc sir
@rahinisinghgoyat
@rahinisinghgoyat 5 жыл бұрын
why it gives an error like -- FAILED: loginAmazon org.testng.TestNGException: Parameter 'email' is required by @Test on method loginAmazon but has not been marked @Optional or defined when we run the test class as TestNG Test? but it runs successfully when running testng.xml file
@snehakulkarni149
@snehakulkarni149 3 жыл бұрын
What is difference between Environment Variables and Test data ?
@andadana799
@andadana799 6 жыл бұрын
Did you know how can add dynamically the parameters in a xml configuration? and add the value for atribut value dynamically?
@mounikakasulawada9491
@mounikakasulawada9491 4 жыл бұрын
Thank you naveen
@swapnaparamathma3904
@swapnaparamathma3904 5 жыл бұрын
Hi Naveen tried this example getting the following error when i run testng.xml [RemoteTestNG] detected TestNG version 6.14.3 [Utils] [ERROR] [Error] org.testng.TestNGException: Parameter 'browser' is required by @Test on method yahooLoginTest but has not been marked @Optional or defined Can you please guide
@akulabhaskar3797
@akulabhaskar3797 6 жыл бұрын
Hello Naveen we can use Assertion instead of if else ? And Assertion or if else which is best practice in real time when it comes to TestNG .
@MishaS-wo4yx
@MishaS-wo4yx Жыл бұрын
thank you!!!
@SachinKumar-lu3mw
@SachinKumar-lu3mw Жыл бұрын
Nice
@anushaanoops7287
@anushaanoops7287 2 жыл бұрын
I copied the same script to mine. sending value1 and value2 from Xml to perform an addition in an class. It says "[Utils] [ERROR] [Error] org.testng.TestNGException: Parameter 'val1' is required by @Test on method Sum but has not been marked @Optional or defined". Not reading from XML. Kindly please help.
@virginia.faustino4935
@virginia.faustino4935 5 жыл бұрын
Thank you so much! U r great!
@sainiranjan40
@sainiranjan40 3 жыл бұрын
We're using Azure DevOps for CI/CD and my manager explicitly defined environment variables as input that should take while run time. In that scenario what should I write under "values" inside testng ?
@RajeshVerma-rs9rp
@RajeshVerma-rs9rp 4 жыл бұрын
Thanks Naveen. Can i please ask an easy question here. ParameterTest.java has only one method yahooLoginTest (annoted @Test). Do you write all your methods in one .java file or segregate them into as many .java fies? Won't your .java file get huge and difficult to manage if you are write all your test in one .java file? I can understand a tester writes BeforeTest and AfterTest methods in one .java file but is having many @Test in one .java a common practice? Many thanks.
@poongodiarasu8079
@poongodiarasu8079 5 жыл бұрын
Nice... Thank you...
@sridevireddy1371
@sridevireddy1371 6 жыл бұрын
Thank you Naveen
@meghasandesam
@meghasandesam 3 жыл бұрын
at that time 501 Subscribers...!!!
@meghasandesam
@meghasandesam 6 жыл бұрын
Nice explanation. Naveen i have one inerview question: 1. What is the use of @Test annotation in TestNG in Realtime? 2.If any problem occured in this annotation will code execute other annotations or just stop to execute? 3. If it stop to execute the code, do we raise the bug/issue? I not answered for this question. :(
@akulabhaskar3797
@akulabhaskar3797 6 жыл бұрын
If there is a show stopper in @Test annotation then it will fail ,But we have the option to keep priority also we can create Dependecies.
@purnimamohapatra2759
@purnimamohapatra2759 3 жыл бұрын
@Naveen As we usually write the browser launch code inside Before Method, so can it be possible to parameterize the browser condition inside Before Method ?? As the parameter annotation is under @test annotation.
@career_qa2670
@career_qa2670 4 жыл бұрын
hi naveen, in this video you not mentioned , how to create suit file .
@bhuvanashreevenkatesan8076
@bhuvanashreevenkatesan8076 6 жыл бұрын
Very well explained .thank you so much. Pls may I know what are topics in TestNG is important for interview purpose
@dhruvsharma7646
@dhruvsharma7646 4 жыл бұрын
@Naveen...For different environments if we don't want to change value on every execution then there is any way ??
@Familyfoods45
@Familyfoods45 Жыл бұрын
0:01
@kennethmoeketsi9382
@kennethmoeketsi9382 4 жыл бұрын
hI Naveen, Thank you for your videos. Quick question, is it possible to use testNG XML config with parameters to pass to our methods in CUCUMBER? What i am trying to achieve is to setup my different environment e.g. dev, Int, qa and preprod so that i can specify the environment when i am running mvn test command e.g. mvn test -p preprod.. How can i achieve that flexibility of changing environment using maven and cucumber?
@priyankachakrabarty456
@priyankachakrabarty456 Жыл бұрын
hello Naveen, can u plz provide the general content in testng.xml file?
@himshwetasinha6529
@himshwetasinha6529 6 жыл бұрын
Hi NAVEEN, I am very new to coding and learning selenium through your videos. I have Step definition file in which I am calling gettitle() and gettext() method again and again. I want to put these method in another class called Utility and call them whenever required. Please help me with this scenario.
@rohitgrover5556
@rohitgrover5556 4 жыл бұрын
First of all very nice video, Now my qus: If i am running from testng.xml then its working fine but if i run from parametertest class then its showing url parameter is not marked or defined in the testng-customsuite.xml. i tried to keep tetng.xml in the project and in the test folder but not working from class :(
@ajeetpatel3533
@ajeetpatel3533 3 жыл бұрын
Hi naveen I am giving 10 testclass name in my TestNg xml file and i am doing run parllel testing but in the run time only 5test class are run parllely why ?i am not using Include and exclude method please tell me
@AdnanAli-zm6oy
@AdnanAli-zm6oy 5 жыл бұрын
In which video you discussed regarding config.properties
@falgunipatel6536
@falgunipatel6536 2 жыл бұрын
How we can use testng.xml in Apache netbean?
@bhushanshet7329
@bhushanshet7329 5 жыл бұрын
Can we pass value from one test as input to another test?
@chandrakanthvs4949
@chandrakanthvs4949 Жыл бұрын
Hi Naveen where do I get that TestNG.xml format file ?
@niyatiprakash1221
@niyatiprakash1221 5 жыл бұрын
Hi Naveen How to print the values of parameter declared in Testng.xml , By writing code in Test class. pls help with the proper line of code.
@hemasaini847
@hemasaini847 4 жыл бұрын
Hi , I am facing an annoying issue in Testng script, not able to fix this, the issue is that, i have created different test annotations which did not worked separately, but worked when i merged the code of 2 different test into one. I hope some one suggests me the solution
@sunny_sunny28
@sunny_sunny28 5 жыл бұрын
how can we automate recapthca pls upload a video tutorial on that
@ramakrishan3650
@ramakrishan3650 5 жыл бұрын
Hi Sir , Do you have any video on Robot Frame Work Training with Eclipse + Python + Selenium ?
@purnachandrapatra2552
@purnachandrapatra2552 6 жыл бұрын
Hello sir ...i have gone through this video...here , you have passed environment as parameter having value "QA" ,May i know where we use this parameter inside the test method? Your replay will be highly appreciated
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
PURNA CHANDRA PATRA hi this env variable is used when you are running test suite on different environments like dev,QA,stg. Inside the test method u can write one if else condition on the basis of env value coming from testng XML file and Launch the respective url. If it's dev then launch dev url. Else if QA then launch QA url.
@purnachandrapatra2552
@purnachandrapatra2552 6 жыл бұрын
it means that, for the same application ,we have different url in real time which depends on QA or DEV server
@purnachandrapatra2552
@purnachandrapatra2552 6 жыл бұрын
And one suggestion(i do not know how much it is important),please make a video which shows how to use your channel like what are the syllabus(topic ) you are going to cover..from which playlist one should start and go on.Another thing i have noticed that your play list is mix of all topic kzbin.info/aero/PLFGoYjJG_fqo4oVsa6l_V-_7-tzBnlulT which is very confusing for a beginner like me..for example inside testng play list you have part 3 of datadriven framework....hope this comment have some +ve value :)
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
+PURNA CHANDRA PATRA thanks for the genuine feedback buddy. I'll surely create a vdo for the same. Even I relaized the same.
@RajuDas-zn3gx
@RajuDas-zn3gx 6 жыл бұрын
Naveen, if I run the testng.xml file then the test run perfectly but when I run from ParameterTest it throws this following error -- Parameter 'url' is required by @Test on method googleTitleTest but has not been marked @Optional or defined Can you please help to fix this problem?
@MrDocenrico
@MrDocenrico 5 жыл бұрын
you have to run the xml file not the class
@mysweetworld1814
@mysweetworld1814 3 жыл бұрын
who is watching video in 2020...plz comment
@22Shoyab
@22Shoyab 5 жыл бұрын
can any body share video link of how to read from properties files i was not able to find video
@poojabagga5206
@poojabagga5206 4 жыл бұрын
try{ prop = new Properties(); FileInputStream ip = new FileInputStream("C:/Users/OneStop/eclipse-workspace/AP_Shop_Automation2/src/main/java/com/intershop/APShop/config/config.properties"); prop.load(ip); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } //Initialization method public static void initialization(){ String browserName = prop.getProperty("browser");
@nehachaudhary2765
@nehachaudhary2765 2 жыл бұрын
i m confused ????
@Familyfoods45
@Familyfoods45 Жыл бұрын
Hey
@rajatjain1653
@rajatjain1653 5 жыл бұрын
it's not sweet, it's Suite
@naveenautomationlabs
@naveenautomationlabs 5 жыл бұрын
Go and check, how to pronounce it. It's pronounced as sweet. Learn some English first buddy.
DataProvider In TestNG - Data Driven Framework in Selenium - Part 3
41:03
Naveen AutomationLabs
Рет қаралды 273 М.
TestNG Interview Questions and Answers || TestNG Framework Interview Questions
48:57
Алексей Щербаков разнес ВДВшников
00:47
Doing This Instead Of Studying.. 😳
00:12
Jojo Sim
Рет қаралды 35 МЛН
Magic trick 🪄😁
00:13
Andrey Grechka
Рет қаралды 45 МЛН
TestNG Tutorial #14 - How to Pass Parameter from TestNG.xml File
10:13
Software Testing Mentor
Рет қаралды 21 М.
P8 - Parameters in TestNG | TestNG | Testing Framework |
26:30
H Y R Tutorials
Рет қаралды 49 М.
GIT Basics - My First Repo In GIT || PUSH & PULL In GIT
53:37
Naveen AutomationLabs
Рет қаралды 164 М.
Playwright - How to work with Multiple Environments!
8:57
CommitQuality
Рет қаралды 13 М.
How to Become Genius in XPath in Selenium  - Session -18
39:48
Naveen AutomationLabs
Рет қаралды 716 М.
Explain Page Object Model - POM Architecture in Selenium - Interview Question
46:44
Write WebTable values into Excel Sheet in Selenium with Apache POI API
44:28
Naveen AutomationLabs
Рет қаралды 60 М.
Roles & Responsibilities of Automation Tester - Selenium | RD Automation Learning
17:05
Алексей Щербаков разнес ВДВшников
00:47