TestNG Interview Questions and Answers || TestNG Framework Interview Questions

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Holloway's this is Lavinia welcome back so guys so far we have seen selenium interview questions and the project related questions and everything now the most important thing is that test in G interview questions and if you are going with the I mean fake going for interview for selenium and if you are using selenium with Java so definitely they are going to ask a test energy question they are going to check 99% of the companies in the industry they are working upon test engine so obviously that you have to make sure that you are very good in testing G and if you can clear test in G interviews and everything then I think you are good to go ok so the there is a different levels of interviews guys the first is like tell me about yourself and your experience and project somebody and everything then they will start with basics of selenium right that the basics of selenium in advanced selenium that we have covered and then the third level is test changing so definitely they will ask test Angley interview questions if you have worked up on BDD frameworks like cucumber and all they will be asking questions on cucumber also but today we will be discussing about a top 30 questions I think these are the best one of the best questions I have seen and I prepared a different content accordingly on the interview questions as well as the answers I'll share this document with you on but guys if you can cover these 30 questions I think then you are good to go you can crack easily okay idea unless they are not asking some out-of-the-box or test in equations okay cool so the first question is guy is that what is test in G so they will ask like what do you mean by test in G and what is test in G exactly so first of all test in G is a testing framework okay test next generation the full form is test next generation it is a framework which is used by developers to write their unit level test cases as well as integration level test cases so that's where we are using silly I mean the Trevor using in selenium also because in selenium we are using Java and it's dedicatedly designed for Java Java unit testing framework okay I cannot use test in g4 dotnet or Ruby or something and don't need to be here M unit in PHP bf PHP unit but in Java we have either j unit and test in G so test in G is a Java testing framework which is used to variety or a unit level test cases now you can use your in function in selenium also to write the functional test cases right so you can write and you can design the test cases in a very systematic way you can achieve so many things that parameterization and lot of features are available but what is test changing simple it's a framework and it's available in the form of geography how will you set up test changing everything that I have already covered these things in the test in G tutorial and everything so you guys you can use this you can go to my channel and go to my go to this playlist this is my channel name go to the playlist and this is the five tutorials are available the test change' framework with selenium just click on it and then you will see all these five tutorials are available step by step I have given all the you know all the examples and how to setup and install test ang in Eclipse and everything I have given right the second question is that what are the advantages of test ng I mean evergreen question that definitely they are going to ask ok what are the different advantages with testing G so the first test in G advantage is that it provides first of all parallel execution of test methods okay in testing G dot XML file you can define one parallel attribute is equal to methods or class and you can define that thread count also so we can do a parallel execution let's say you have thousand test cases in you can execute with the three different process or four different browsers right so that you can reduce the time the execution time so parallel execution we can do it allows a different defined a dependency of one test method over other method case again I am a login method I have one homepage method if long getting failed there is no point to execute your homepage that's it right so there is no point to execute homepage method and registration method and search method if login is self grading field right so we can create a dependency between these two methods these two test methods okay so we have I have already covered all these okay test Jen V depends on method and everything in this part 1 and part 2 both ways please refer these two tutorials because today I'm not going to cover because these are just interview questions so I can give you the references how to provide the answers and everything you can do that it allows to assign priority of the test cases obviously variety of the test methods we can define priority keyword so they will ask you how to define the priorities impropriety keyword is their priority equal to one two three you can define the priority with at the rate test annotation so you have to write like this at the rate test and inside the bracket you have to write priority keyword parity is equal to one till it mean the first priority will be given to this particular test case like this okay it allows grouping of test methods into test groups yes it's one of the best feature that let's see I am 100 test cases aren't where I want ok these 10 test cases are related to search feature next 10 test cases are related registration feature 5 test cases are related to login feature so you can define the grouping also okay so one groups keyword is there you can define like like this comma groups is equal to okay in double quotes likely this is related to login something like this so with the help of groups keyword you can define the grouping also it supports the parameterization test case is using at the rate parameters annotation yes and the rate parameters annotation is already there way so I have already covered at how to use at the rate parameters annotation in this particular session so you can use at the rate parameters annotation in your test cases as well as you can define the parameters in your testing you do not examine file also so this is one of the important feature now the most important feature that you can perform data-driven testing with the help of add the rate data provider so they will ask you how what is the of data to provider or how will you what do you mean by data provider or how will you perform the data-driven okay we will fetch the data from excel file and with the help of data provider we will execute that same test case again and again with the different set of data okay that is called parameterization so we can achieve parameterization we can achieve the data-driven testing with the help of a great data provider I have already covered this thing okay this topic over here in part two I have already covered base so please have a look sorry this part three data provider in a very systematic way I have explained so most of the data provider question will be covered over here okay and it has different assertions yes amazing feature that it provides lot of a lot of assertions I can give you some assert because we have our assert classes available you can see that this is our third class which is provided by a test in G a Sardar Saadi equals a sword or to a sword or assert not null okay there are a lot of assertions are available to validate it provides soft assertion as well as hard assertion also right so assertion library provided by test in G detail HTML reports obviously this is a very good feature that it it gives you index dot HTML file as well as proper failure XML file also our HTML file also it will give you okay index dot HTML file and for failure - cases also you can generate a separate HTML file right and it can be easily integrated with Jenkins which will give you the proper report in end up in the form of HTML you can generate your customized report also with the help of test engine listeners okay so test ng listeners is also one of the important feature I would write test ng listeners ok - to generate the custom logs to generate to create the custom reports and everything ok so these are the very good test ng advantages and features you have to explain like that only guys ok now what are the annotations are available in destined G very important question and very simple just please explain like this so we had different annotations prerequisite is a notation as well as post condition animations so these are prerequisite ease like the annotations which is starting with before it means these are pre requisite ease added before test ended before class enter it before method entered before sweet and post condition means add the rate after post means later after at the rate after test at the rate after class at the rate after sweet and and read after groups and we have one enter a test annotation which is two trying to test cases we have another annotation that is called at the rate data provider okay what data driven point of view we have advocated provided also we have at the rate parameters also okay to define the parameters in a XML file and we can take those parameters with the help of enter it parameters so you can refer these all the annotations I have covered in these tutorials I am NOT going to cover as of now obviously it will take time so you can see all these examples over there next question is can you arrange the below test in G XML text from parent to child although it's not very important but they might ask you at a time of NW that what is the structure of test changer dot XML file so the corrective structure is that first it will start with a suite then test then we have classes then we have inside the classes we have class and then we have different methods so I can give you the practical example over here that you can take any example of testing you dot XML file this is a test in you dot XML file then we have sweet level but make sure sometimes they might ask you that before the seat well what exactly the things you have to define we have to define the eczema XML schema that this is the XML version is equal to 1.0 and what exactly the doctype okay these two lines are important if you don't write these two lines it will give you a XML parsing exception okay examine exception it will give you so make sure that sometime they might ask this question also okay just above the sweet level what are the different things you have to define so you have to define the XML schema that is your exam illusion and doctype suite also we have to define okay after that to be a suite level if you want to define any listener you can define listeners like this so I just comment it and then we have okay we have to give the test name and then we have classes and then we have class and inside that class if you do if you want to define any method you can define the method also so this is the proper sequence although not very important interview question but they might ask you at a time of interview the format of XML file how to create a change in order XML file simple right click on your main resources package or any package right click to go to new and click on file and give the file name is test changer dot XML file okay you just need to write test in G dot XML file and define all these attribute over here over here simple this is how we create the senior or XML file and how to execute how to run through Eclipse simple right click and run as okay text change is sweet it provided option test changes we make sure that okay you have added sng liability in your project and the test NJ plugin also that we have downloaded from eclipse marketplace so how to do these two things I have already covered in part one guys okay make sure that okay this is your project and test in G library is added to right click go to properties Java build path project libraries and add library make sure this test in July Bri that you have added over here like this okay if you are using maven project make sure that inform that XML file you have added a dependency of test in G dot XML file okay so this is how we execute and create exchange e dot XML file now what is the importance of test in G dot XML file so test change e dot XML file is the heart of the execution this is also called another class okay so in any project either it is your selenium project or any API automation project if you are using test changes so test change e is the main the configuration pipe okay for the complete test automation treat so different kind of configuration that okay what is your suite name okay what are the different listeners you want to define what or a different test case name is there and what are the different classes you want to include the package wise in the class wise and the method wise so it's a complete configuration file is there and the suite level water different if you want to do in any parallel testing okay at the test level okay so I okay all the parameters if you want to define so this is the heart of the test energy framework in which you define all the configuration with respect to your execution you will define over there okay as I told you that test energy XML file allows you to exclude the execution of the test methods if you don't want to execute an in test method or test case you can ignore it from a test in G class it allows the passed parameter to the test cases you can pass a parameter you can define the parameters over here okay and allow ad groups of dependencies also you can define priorities also sometimes you can define generally we don't prefer to use a coyote in testing your dot XML okay parallel execution as I told you that thread count we have to give for parallel execution and we have to give for parallel parallel attribute also being able to find over there okay parameter is a test cases also with the help of add the rate parameter test case I mean at that parameter annotation we can define in tests change you dot X image so these are the importance of features of test changer dot XML file okay how to pass parameter to test and u dot XML file so in test change it or XML file simple we have to define the parameter like this that simple you have to use this attribute at the rate parameter name equal to browser let's say I want to define browser to equal to Firefox so either you can define this browser attribute in config dot properties file or you can define it test change you dot XML file also like this at the rate parameter name equal to browser value equal to Firefox let me check I have already covered this thing in in this tutorial I'll share with you guys in just a minute let me check the latest in the code itself so we have created this project and in just a minute let me show you the example directly okay so see if you see if I will maximize it see so this is a parameter I have defined two parameters I have define this parameter a URL and email ID and browser name also you can define so if you see for the like immediately after sweet we have test and then two parameters I have defined URL and email ID and you can define parameter name is equal to browser also you can define so please go through this video it's very very simple ways right now I am NOT able to explain because it's very lengthy topic but you can use like this okay and once you go into the code see this is the at the rate parameter annotation you have to define any other defined water a different parameters are coming from testing t dot xml file at the rate parameters URL comma email ID and this is the format base so ways why I am focusing so much on this particular tutor on this particular thing because it's a very famous interview equation they will ask you what do you mean by enter it parameters what do you how to define parameters in test range you dot XML file and it's very simple hardly two lines of things you have to remember at the rate parameter and intention to dot XML parameter attribute you have to remember that's it very simple but how to do that these guys you have to go through it okay so this is how we define what is test genji assert and list out test changing assertions what do you mean the test in GL solutions to test change your session is is a verification point is a validation point that if it will check the test case is getting passed or not it is getting passed or failed okay so we can put assertion anywhere inside that see I can put a certain if you check this home page test I have put one assertion over here at the end of the test case and in the middle of the test cases case also I can write like let's see login login method is their login test method is there and I have written that okay username password and click on login button and after that I'm putting one assertion that I am able to login successfully or not right so assertion is the validation point without assertion we should not write any test case otherwise every time it will be passed otherwise right or every time it will enter user name password and clicking on sign in button but how will you verify that user has logged in successfully or not in that case we have to put assertion ways okay so there are different types of assertion you know methods are available in assert class always remember see this is the assert okay this is also at class you can see that this CC means assert class test changer dot assert it provide different assertion methods if you see a third dot and press control space these are the different assertions are available assert equals right case assert not equals okay a certain all okay assert true assert not same so these are the different assertions are available I have listed out assert equals assert through assert false a certain I'll assert Norton and these are the assertions are available in test in G okay what is soft or certain test in G I have already explained right what do you mean by softer softer so it means it will just collect all the errors okay so let's see I have I'll give you one very squeak example you have to explain like that let's see I have this test case T 1 right place and this - Keys is starting here and ending here I have different lines line number 1 2 3 4 5 6 lines are there in this particular test case let's see first line is getting passed okay second line I put 1 assertion that is called hard assertion I write say H a in the third line I write software solution essay and then in the fourth line also I'll write essay and then essay and then soft assertion essay now if I execute this test case first it will say that okay line number one and bring something that you doing some sendees okay sendkeys option but okay actually I'm performing over here then it will do some hard assertion that simple assault or sought equal so what exactly it will do if hard assertion is getting passed then only it will jump to line number three if hard assertion is getting passed then only go to line number three else what exactly do else terminate the test case else terminate a test case and test case will be filled immediately a test case will be filled okay so this is the property of harder solution what do you mean by soft assertion now let's see hard assertion got passed it will jump to line number three now if it is getting passed fine it will jump to line number four if it is getting failed doesn't matter it will estate it will jump to line number line number five now it will let's see passed fine it will jump to line number six and let's see this is getting failed well then the program is over now what will happen okay after that what exactly we have to write we have to write like this soft assert dot assert all this is a method that please assert all the sock assertions what are a different errors are there so the property of soft assertion is that if soft recession is getting passed fine it will jump to next line that is fine but if soft assertion is getting filled is still it will jump to next line okay but the property of hard assertion is that if the hard assertion is getting failed it will not jump to next line immediately it will be terminated okay if hard assertion is getting failed immediately it will be terminated ways it will not jump to line number three or four or next line right but in soft assertion if all the soft assertions were getting filled it will collect all the softer solution and then it will mark it fail and then it will give you the error that okay these are the difference of assertion three four or five assertions got filled so that is a property of soft assertion okay so this is like that we have to explain at a time of interview and hundred percent they will ask you what do you mean by soft assertion what is a difference between hard assertion and softer solution okay how will you put softer how will you put soft assertion right like that what is hard assertion I have already explained what is hard decision what is exception test in test ng now they some time what happens that okay what do you mean by exception test test change he gives an option that if any exceptions are coming that automatically test change you will will say that okay that any exception is coming we have to tell that we are expecting this particular exception okay so we have an attribute that expected exceptions so we know that we have one at the rate test annotation and we have on this test p1 and we know that okay this in t1 we are expecting sometimes that let's see in t1 we are expecting element not found exception so this is expected expect a you know exception from this method t1 method so we have already defined that we are expecting this exception if any this kind of exception is coming please ignore don't make your test case filled please ignore it we know that sometimes this exception comes or maybe everytime this exception comes so please ignore we are not bothered about it please don't mark your test case field we are expecting this expect exception so this is the expected exception feature is available in testing G if you because if you don't write this line expected accept session exception is equal to element not found exception or element not so non-phone exception is coming then immediately your test case will be failed but if you want l me you know that I am getting this kind of and it can be anything it can be nullpointerexception array index out of bounds exception is tail element reference exception it can be anything so if any exception is coming and if you have defined that yes we are expecting this then it will not mark your test a judge field okay guys the station gives little tricky and technical so if your first time if you're seeing this video and then you are not aware about exchange and you haven't watched these three four videos then you cannot understand these interview question so that's why I would advise you first please go through these videos and then jump to interview questions otherwise it will be a totally bouncer for you you won't be able to understand that what is assertion what is a dread annotations and all those stuff right so please go through it each and everything I have written over here okay each and everything I have explained in my videos with the help of proper coding proper examples and everything it's very simple coding don't worry about it okay how to set priority parity so many times I have told you that inside the at the rate test annotation will be able to define the priority keyword right so this is at the tee at the rate this is a test case at the rate parity equal to zero and this is your second test case enter it try it equal to one so the first it will execute this one and then it will execute this one right like this so the sequence will be this it will print test case one and then it will print test case two okay what is parametrized testing in tests in G so we can do two types of parameterization in tests in G first is with the help of at the rate parameters okay annotation that we have already I have already explained just I explain like this this is at the rate parameter parameters we have to use and we are parameterised this particular test case second thing is that we can use data provider rates okay so what do you mean by data provider data provider is an annotation at the rate data provider and data provider will do will provide the parameterization it will pick the data from any source and then it will transfer the data into the into that particular test case and then even execute that particular test case and number of things okay so same test case can be executed and give you the best example the T log in test and username password I have 10 username 10 password so no need to create 10 login methods and login test cases no single log in test case having username password then we can pass you can maintain this username password in excel file and then you can pass all these ten username password okay to this test case with the help of data provider so how to use data provider if we have a we have enter a data provider a notation is available and I have already explained over here so please guys go through this video and it's really really important video ace so please go through it and I'm pretty much sure that okay you will understand what is data provider and everything okay so data provider in the annotation see I have I'm passing all these values from excel file and to my code like this okay to go to my code like this I have written one and the rate method over there and then okay so data providers the written type of object array and everything I have explained properly I cannot explain riser as of now so you will understand this proper answer once you see this video okay once you watch this video then only you will be able to understand but for theoretical point of view there are two types of parameterization we can do well first and the rate parameters and second one is at the rate data provider how can we achieve data driven testing again with the help of at the rate data provider we can use simple okay so data driven approach with test in G we have to use enter a data provider annotation is the most important annotation is in intestine G and for interview point of view 100% they will ask okay how will you run a group of test cases using tests ng although this not very important question because generally we don't use a grouping concept most a type but you can write like this that practical example I will give you that at the rate test group equal to a smoke test and functional test okay and then these are the different tags I define inside a test in G dot XML file so I have already explained in my videos please go through it if you want to ignore this question you can ignore it also it's not very important okay grouping and everything you just need to know how we define the grouping but how to execute multiple groups altogether okay you just need to have a look at the wise you can ignore this also how to create a group in test ng simple very simple that simple group interchange adore XML file this is a format you have to use groups ok you can write like group name is defined name is a smoke test and a functional test like this ok and over here also you can define like this that group at the other a test group equal to a smoke test in functional test ok like that also you can define ok so define the grouping is very simple they might ask that tell me how to define the group a simple at the rate eight groups equal to like this ok yes now the important question very important that how to run test cases in parallel using test chain G very straightforward answer that you have to use parallel attributed ok guys we have to use parallel attribute like this I will show you in touch and you wrote examine this is a sweet level and then you have to use parallel attribute base what exactly the parallel attribute value will be there I want that all the method should be executed in parallel mode you can define parallel equal to class also a parallel equal to methods also you can write ok it means whatever the methods I have written it will be executed in parallel mode and one more thing we have to define race that is called so what is the value of parallel parallel it can be methods it can be test also ok it can be test also it can be classes also it can be methods also it can be instances also ok so these 4 values we can give with the parallel attribute generally we give parallel equal to methods ok and how many browser lets you want to launch so we have to use like this thread count equal to 5 it means I want to generate five threads it means at a time you can execute you can launch five different browsers five chrome browsers also you can use ok let's see I have five test cases so simple five test cases and if you're given a thread count equal to five at a time five browsers will be launched test one will be executed on first browser test two will be executed in second browser three on third fourth on fourth and fifth one is on fifth browser it means all the test cases are running parallely right so this is parallel testing although I haven't created this video I know I'd miss that video definitely I will create this video that parallel testing once we cover the selenium grid definitely I will cover that part ways how to exclude particular test method from a test case execution yes how to exclude so simple let's see inside this particular home home page test or context home page test I have this particular test three test cases are there right I wanted okay I don't want to execute this verify contact link test so what I'll do I'll go to this particular thing okay let me uncomment this thing first right and this is the class level and I know that homepage test I want to so simple you have to use this particular thing guys inside the class name like this in homepage test I know there are some methods three methods are there okay but I want to exclude this particular method where if I context links test method I want to exclude so simple exclude tag you have to use exclude name equal to this okay so what exactly it s change we will do first it will execute this particular test case login page test all the classes or all the methods of this particular class will be executed then it will try to execute home page it will go to home page test now it will check three methods are there it will be executed this will be executed but this will be excluded it will be ignored why because we have written like this excluded like this okay so you can write like this also exclude how to exclude a particular test group from a test case execution okay same thing but to be a group also if you want to exist if you want to exclude now you have to define in the form of groups like this group run and group exclude method is this okay so this particular test case from that particular group will be ignored okay how to disable a test case in destiny very simple you just go to let's see I don't want to execute this particular method I want to skip or I want to exclude this like extra or how to disable so what you have to do is comma we have one property enabled is equal to false so now if you run this program this particular test case will be ignored I have already covered this topic in part one okay this feature in part one I have already covered so please have a look so um think that enabled equal to false we have to tell at the type of interview they might ask you at a time of interview that how to ignore or how could disable simple enabled equal to false okay straight dependencies yes we have one depends on method and depends on groups okay these two keywords are available okay let's see I want that okay this particular test case let me remove this enabled equal to so we have this depends on methods is equal to which method let's see this particular test case is dependent on this so I can write like this okay depends on method is equal to vary if I username if it is getting failed it will be ignored it will not be executed if it is getting passed then only it will be executed right very very important ways okay they will ask you at a time of interview that this particular test case having one property depends on method equal to this it means this method is totally dependent on this if it is getting failed then test changer will not execute it okay very straightforward it will ignore it if this particular test case is getting passed okay then this particular test case will be executed okay so this is the feature of depends on method and same thing you can use it for depends on groups also okay now what are the different ways to produce reports for test change a result so simple different ways that first of all we have index dot HTML file is available in tests in G that is if you go to test output folder okay here it is test output folder you will see that index dot HTML file is there okay testing a report to change a result or XML file is also available okay and now what our different listeners are available the one of the very famous listener is that that is I reported listener and I test listener with the help of these listeners you can generate very good report you can customize your report also ok all that you all together to different topic but they won't ask you how will you generate and what is what are the different customization you have to do but we have to tell these two interfaces in the base ie test listener okay and I reporter listener with the help of these two listeners we can generate very good HTML report ok in test ng ok what is the use of at the rate listener annotation in testing G again very famous interview question that what is a year what is the purpose of listener so the purpose of listener is mainly that to generate the reports and to generate the logs ok so with the help of listeners we can do that let's see I want that ok once the test case is start or test case success or test case failure or test you'll get skipped what kind of report you want to generate extend report remember exchange report there internally using the this particular listener ok this particular I test listener interface only they are using on top of that they have created okay they are libraries and they have given to us ok so these days we generally we don't use these things because a lot of other thick options are available like we have extend report and these things are available but what is the purpose of listener at the ready listener innovation that listeners are used especially for reporter a report generation and logging point of view okay so you have to create your own class which is having these listeners interface okay and you have to implement this a listener interface and inside the class Champy use at the rate listeners okay annotation that you have to use simple that is what you have to tell okay how to write regular expression you can ignore this like dot star smoke start so all the class says all the methods which is having smoke in it ah sanity okay let's see I have one method that login smoke test search a smoke test so we just need to write a star smoke dot star so how many methods are there let's see hundred methods are there and fifty method having word that is smoke all those cases will be all those test cases will be executed on you okay they might ask at a time of interview what is a unit we specify in the test suite and test cases the time unit obviously in milliseconds okay the time unit didn't leave it to find that in milliseconds only that how much time it should take in milliseconds so we take if you see the report also in testing G we see that okay these are things are coming in milliseconds only okay point zero four four four second means these are the milliseconds okay let's start various ways in which station G can be invoked so it's not a great question that invoke means how will you execute s ng so either we can execute a Shinji's through eclipse or through some maven or and also through maven also how to do that okay through maven also I have already explained in page object model tutorial guys so please refer page object model tutorial how to do that in pom road XML file we have to pass in short by a plugin we have to pass tests you need order examine I can give you one example over here very quickly that in Pond Road XML file go to that where is very spawn word XML file yeah here it is form dot XML file and through maven also you can execute test changer dot XML a file like this you have to go to the shore Fyre plugin oh I haven't written over here maybe not in this example but in the tutorial guys you can refer that in shower fire plugin in boundary XML file you have to give the configuration that is the test ng dot XML configuration that you have to pass okay so through maven and eclipse from command line also an IntelliJ IDEA also you can trigger your test ng classes and everything how to run test changes using command prompt simple it's a very simple interview question that how to run tests ng using command prompt so simple that we have to use test and a jar file that we need in which class you want to execute and you have to go to that particular directory okay and let's see my test in G dot Java class is available in or maybe test or Java class available in C it right so I will go to see try first and then I will write testing so it will be like this so I'll first end my command prompt I'll go to my C Drive right ways in C Drive what exactly I'll do in in the command prompt and then I will go to whatever the let see library like let's see my in C Drive my folder name is nest folder so that is a test folder let's see in test folder I am inside a test folder what exactly I will do simple write Java and whatever that the lab tests in G dot jar file is available let's see my test changes or da jar file is available in C trying to simple I will write it as change e dot jar and what is you find them let's see my file name is test dot Java like this you have to execute okay like this you have to execute generally we don't use these things but they might ask you a type of interview not that I'm very famous or great question but they might ask you what is invocation count ok intestine G invocation count 10 I'll give you a practical example ways very simple let's see I have this particular test case homepage title test I want that okay the same test case should be executed ten times so simple what I will do and simple do like this in variation count is equal to 10 it means the same test case will be executed 10 tanks single test case will be executed 10 times if I write 100 it will be executed 100 times so this is the purpose of invocation count I have already explained this scenario over here in part 2 okay sometimes we have to let the same test case we want to execute again in the game so we can give invocation count is equal to 5 10 or whatever okay so that is invocation count okay what is thread pool size thread pool size means to generate the threads so if you have given that again at the red test thread put side is equal to 10 or 3 so it means 3 threads will be generated okay 1 pool will be generated having three threads but the thread pool size will only work if okay invocation count is given so generally we don't use this configuration this configuration generally used by a developers okay at the time of their unit level test cases but you can say that thread pool sizes to generate the threats and will work only with invocation account okay what do you mean by timeout in test changing okay guys time mouth means so I have covered thread pool size invocation account and timeout is equal to let's see I have given 10,000 millisecond it means 10 seconds so maximum time I'm giving the for this particular test case 10 so let's see some time what happens that okay you have written some code and it's taking lot of lot of time because of page issues or page what is stuck somewhere and test case got stuck somewhere or maybe infinite loop is coming so obviously it's taking a longer time for this particular test case so we can define a limit that boss this particular test case should be executed within 10 seconds if it is going beyond 10 second then terminated simple okay simple terminated it will not be invoked okay so this is a property of time out we never use time out property in selenium case because you never know because selenium is taking a lot of time to execute a particular test case and it's our responsibility to make sure that okay test all the test cases are getting executed but for developers point of view generally they might use okay but enter the point of view it's somewhere important they might ask you what are the at the rate factory and at the rate data provider so enter a data provider annotation I have already told you to define the to face the test data for myself I in or you know to provide a test data to the test cases okay in that case we have to use at the rate data provider a notation I've already explained at the factory I haven't explained only we don't use at the rate factory but Android factory will execute all the test methods okay which are available inside a particular test class using a separate instance of the respective class with different set of data so at the refectory means I have created let's see a class having different set of data and one test class is available having one test method so we can define that at the rate factory annotation in which we can define okay this is the class which is giving the data to you so that class is taking the data maybe somewhere from excel file or whatever doesn't matter and a droid factory annotation will fetch the data from that particular class and then it will provide it to you for your test cases so a droid factory generally we don't use but at the data provider obviously android data provider method will be given will be configured to the test cases and then test case will get the data from at the rate data provider okay it's a very simple at the data provider i have already explained so many times okay guys so please go through the enter data provider over here this okay so case this is really really useful you have to cover these top five I mean top four I would say one two three four okay these four tutorials at least if you really want to clear tests and interviews hardly it will take guys two hours okay one plus two I think yeah maybe three hours okay three hours of tutorials are there please go through it all the interview questions 99% doubts will be cleared immediately still if you have any doubts please feel free to contact me in the comment section definitely and reply you guys okay and I will share this this document also with you guys so these are the top 33 33 questions I have covered in this tutorial so these are the most important testing in testing G interview questions if you are good in these things you can clear now selenium is done test in G is done project description everything is done okay so most of the things you have covered now the small small things that your manual testing or maybe Java concepts are pending so if you can cover those things then I think you can clear the interviews but if you are really good in testing G guys definitely they know that they will consider you that this guy is good in testing G is a framework and this guy can write the framework with the help of testing G if they are using existing framework bit test change e easily you can understand test in G framework you can debug the code right if you don't know what is a notation what is data provider what is actor it before at the rate after write the rate test and all then obviously you cannot work so don't go without s ng at a time of interview if you know selenium fine but without test ng obviously you cannot clear interview okay so tests ng guys is the most important thing and again please refer this okay test ng framework with selenium tutorial when I mean automation labs so how to go to that particular video location I mean the playlist location go to this playlist okay and this playlist five videos are there tests in the framework bit selenium tutorials so in this playlist guys I have created all the videos so if you want to cover 15 videos of speed in Java you can start with that then 42 videos are there in selenium okay page object model around 10 videos are there okay complete page object model four to five videos are there in testing G data-driven approach for videos out there okay and then web services and maven and selenium into equations are there so everything is combined okay in the form of sorry the former playlist so you guys you can refer all these playlists and I'm pretty much sure that you will become genius in in selenium okay no one can be do in the market okay so peace go through all those things I have done a lot of hard work to create these videos most of the things I tried my best to cover okay and if you really like this video please share with others and you know and if you have any questions write down in the comments and then subscribe to the channel guys thank you so much
Info
Channel: Naveen AutomationLabs
Views: 195,920
Rating: 4.8922868 out of 5
Keywords: testng, selenium, selenium interview questions, testng interview questions, interview questions on selenium testing, testng interview questions and answers for experienced, automation framework interview questions and answers, testing interview questions and answers for experienced, selenium automation framework interview questions and answers, TestNG Testing Framework Interview Questions and Answers, TestNG Interview Questions and Answers
Id: _RwrCqh0hBk
Channel Id: undefined
Length: 48min 56sec (2936 seconds)
Published: Wed Nov 08 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.