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

Ғылым және технология

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.naveenautomationlabs.com
========================================================
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:
kzread.info%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/COJqZUPB02r5sB7...
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p... ➡️Get Our Courses✔️
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p...
-------------------------------
✔️SOCIAL NETWORKS
Facebook: / naveenqtpexpert
Twitter: / naveenkhunteta
Blog: www.naveenautomationlabs.com
--------------------------------
Support My Channel✔️Or Buy Me A Coffee
Paypal: paypal.me/naveenkhunteta
Google Pay: naveenanimation20@gmail.com
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة

Пікірлер: 81

  • @ragavendravignesh1028
    @ragavendravignesh10285 жыл бұрын

    I watched many videos for parameters in TestNg but you are the only who made it crystal clear. thanks....

  • @mithaleepardeshi4893
    @mithaleepardeshi48934 жыл бұрын

    To the point and completely understood the importance of Parameters. Thank you Naveen Sir.

  • @FitnessForAll
    @FitnessForAll4 жыл бұрын

    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😍

  • @user-rk1gi7oj9q
    @user-rk1gi7oj9q5 жыл бұрын

    Thank you, Naveen! Great explanation from very beginning to the end point.

  • @PreetiGupta-qz1nw
    @PreetiGupta-qz1nw5 жыл бұрын

    Naveen, Your way of teaching is too awesome. Keep it up. Excellent Job.

  • @aihaitipaziliti2655
    @aihaitipaziliti26555 жыл бұрын

    You are awesome, Naveen. Big tumps up ....💯👍👍👍👍 thank you.

  • @saitejaithagoni1168
    @saitejaithagoni11682 жыл бұрын

    Very underrated channel for all career defining concepts taught. Here. Should me in millions subscribers group.

  • @shrutitiwari8921
    @shrutitiwari89212 жыл бұрын

    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

  • @Praveenkumar-gy7wt
    @Praveenkumar-gy7wt4 жыл бұрын

    awesome 501 users to 101k uses... awesome explanation.. thanks

  • @richadubey5939
    @richadubey59393 жыл бұрын

    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

    3 жыл бұрын

    Keep learning :)

  • @ssworks6149
    @ssworks6149 Жыл бұрын

    tq naveen for uploade all the videos now i got the job because of you .and all the credit goes to you only

  • @prakashpandey2292
    @prakashpandey22926 жыл бұрын

    nice sir.. awesome knowledge u have and way of explaining is adorable...

  • @omkarpotdar2763
    @omkarpotdar2763 Жыл бұрын

    Thanks a lot Naveen for covering an extremely helpful and intresting topic.

  • @chandanmukherjee157
    @chandanmukherjee1575 жыл бұрын

    Thank you very much Naveen Sir , this tutorial is awesome

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

  • @poojadolly1262
    @poojadolly12623 жыл бұрын

    just wow.thanks for wonderful video

  • @virginia.faustino4935
    @virginia.faustino49354 жыл бұрын

    Thank you so much! U r great!

  • @sainiranjan40
    @sainiranjan403 жыл бұрын

    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 ?

  • @priyankapradhan7106
    @priyankapradhan71064 жыл бұрын

    Thanks Naveen...U r Amazing...Love ur teaching styl.

  • @naveenautomationlabs

    @naveenautomationlabs

    4 жыл бұрын

    Thanks for watching Priyanka

  • @akulabhaskar3797
    @akulabhaskar37976 жыл бұрын

    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 .

  • @kennethmoeketsi9382
    @kennethmoeketsi93824 жыл бұрын

    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?

  • @sheiksabreen1963
    @sheiksabreen19632 жыл бұрын

    Awesome...... amazing sir

  • @sridevireddy1371
    @sridevireddy13716 жыл бұрын

    Thank you Naveen

  • @RajeshVerma-rs9rp
    @RajeshVerma-rs9rp4 жыл бұрын

    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.

  • @derrukumar3545
    @derrukumar3545 Жыл бұрын

    Thank You Naveen Sir

  • @sanjaykumar-wx1wt
    @sanjaykumar-wx1wt4 жыл бұрын

    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.

  • @andadana799
    @andadana7996 жыл бұрын

    Did you know how can add dynamically the parameters in a xml configuration? and add the value for atribut value dynamically?

  • @poongodiarasu8079
    @poongodiarasu80795 жыл бұрын

    Nice... Thank you...

  • @himshwetasinha6529
    @himshwetasinha65296 жыл бұрын

    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.

  • @meghasandesam
    @meghasandesam6 жыл бұрын

    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.

  • @mounikakasulawada9491
    @mounikakasulawada94913 жыл бұрын

    Thank you naveen

  • @purnimamohapatra2759
    @purnimamohapatra27593 жыл бұрын

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

  • @rakeshjaiswal4675
    @rakeshjaiswal46754 жыл бұрын

    6:15 testNG xml start. 16:28 using Browser in testNG.xml 23:55 Data Driven Approach.

  • @KavithaManu2374
    @KavithaManu23742 жыл бұрын

    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

  • @bhuvanashreevenkatesan8076
    @bhuvanashreevenkatesan80766 жыл бұрын

    Very well explained .thank you so much. Pls may I know what are topics in TestNG is important for interview purpose

  • @dhruvsharma7646
    @dhruvsharma76463 жыл бұрын

    @Naveen...For different environments if we don't want to change value on every execution then there is any way ??

  • @swapnaparamathma3904
    @swapnaparamathma39045 жыл бұрын

    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

  • @rohitgrover5556
    @rohitgrover55564 жыл бұрын

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

  • @nimrahussain7738
    @nimrahussain77382 жыл бұрын

    Thank you sir

  • @MishaS-wo4yx
    @MishaS-wo4yx Жыл бұрын

    thank you!!!

  • @ramakrishan3650
    @ramakrishan36505 жыл бұрын

    Hi Sir , Do you have any video on Robot Frame Work Training with Eclipse + Python + Selenium ?

  • @bhushanshet7329
    @bhushanshet73295 жыл бұрын

    Can we pass value from one test as input to another test?

  • @rahinisinghgoyat
    @rahinisinghgoyat4 жыл бұрын

    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

  • @anushaanoops7287
    @anushaanoops72872 жыл бұрын

    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.

  • @niyatiprakash1221
    @niyatiprakash12215 жыл бұрын

    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.

  • @shivangichandra5362
    @shivangichandra53623 жыл бұрын

    Can we give parameters name in method body different from @Parameters Annotation name?

  • @sunny_sunny28
    @sunny_sunny285 жыл бұрын

    how can we automate recapthca pls upload a video tutorial on that

  • @career_qa2670
    @career_qa26704 жыл бұрын

    hi naveen, in this video you not mentioned , how to create suit file .

  • @RajuDas-zn3gx
    @RajuDas-zn3gx5 жыл бұрын

    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

  • @priyankachakrabarty456
    @priyankachakrabarty45610 ай бұрын

    hello Naveen, can u plz provide the general content in testng.xml file?

  • @Ramkishorepodugu
    @Ramkishorepodugu2 жыл бұрын

    so nyc sir

  • @meghasandesam
    @meghasandesam3 жыл бұрын

    at that time 501 Subscribers...!!!

  • @hemasaini847
    @hemasaini8474 жыл бұрын

    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

  • @chandrakanthvs4949
    @chandrakanthvs4949 Жыл бұрын

    Hi Naveen where do I get that TestNG.xml format file ?

  • @SachinKumar-lu3mw
    @SachinKumar-lu3mw Жыл бұрын

    Nice

  • @ajeetpatel3533
    @ajeetpatel35332 жыл бұрын

    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

  • @snehakulkarni149
    @snehakulkarni1492 жыл бұрын

    What is difference between Environment Variables and Test data ?

  • @falgunipatel6536
    @falgunipatel65362 жыл бұрын

    How we can use testng.xml in Apache netbean?

  • @purnachandrapatra2552
    @purnachandrapatra25526 жыл бұрын

    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 kzread.info/head/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.

  • @AdnanAli-zm6oy
    @AdnanAli-zm6oy4 жыл бұрын

    In which video you discussed regarding config.properties

  • @22Shoyab
    @22Shoyab5 жыл бұрын

    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");

  • @Familyfoods45
    @Familyfoods45 Жыл бұрын

    0:01

  • @mysweetworld1814
    @mysweetworld18143 жыл бұрын

    who is watching video in 2020...plz comment

  • @nehachaudhary2765
    @nehachaudhary27652 жыл бұрын

    i m confused ????

  • @Familyfoods45
    @Familyfoods45 Жыл бұрын

    Hey

  • @rajatjain1653
    @rajatjain16535 жыл бұрын

    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.

Келесі