Testing Mock interview - 6+ Years of Experience - Manual + Test Automation (UI + API)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this is navini welcome back to naveen automation app so today back to our mock interview series guys we have one very good candidate his name is ravi and uh i can see his resume with me he's having around six plus years of experience in testing and combination of different types of testing like we have uh web automation api automation using different tools like rest assured and web driver with java and good exposure on different ci cd pipeline jenkins qa strategies test case planning uh good resume looks really good uh four to five pages of resume and then he based out of uh chandigarh in india so ravi can you please uh start your cam now yeah how are you hobby how are you doing i'm good i'm doing good how are you i'm good i'm good so you are in chandigarh it must be very cold right it must be the temperature is really low yeah yeah i can see i can see the difference you are in jacket and i'm just in my t-shirt in bangalore that is the advantage of panga that's good yeah okay navi so uh uh let's start and um tell me about yourself what exactly you're doing in your current company and then what is your role's responsibility in terms of testing in terms of uh tools automation what exactly you are doing okay so yeah my name is ravi uh i have total of six years of experience in uh testing only this is including manual and automation testing i have started my career with manual testing and there i have about four years in manual testing and then i moved into automation team and from last two years i am in automation area and talking about automation i have used selenium web driver for a web automation and for api testing i have used rest stored with bdt approach and apart from that i have also worked in some cid ci cd tools like jenkins github and all and about some other areas i have worked in aws cloud computing as well where we are ingesting the data of the customer and later on we are validating whether the customer is queryable or not from the database so this is my overall experience and about my team right now i'm working in agile methodology so there are multiple scrum teams and i'm a part of a team where i am uh performing an individual contributor there and um like we are working on user storage and by this we are you know going ahead with our project okay so you're working as an individual contributor so i mean you are the only qa person and you are the only person who is doing automation so what do you mean by individual contributor so individual contributor is like we are responsible for the stories we are getting our user stories and from the script creation to execution and automation we are responsible for that okay from the point of view so we are responsible or you are responsible because individual contributor means you are the only person who is contributing like as we as uh like v testers they are as i told you that they are multiple from team and in every scrum team uh every el we have assigned one qa over there and we are so but yeah okay good good good so uh in terms of testing you guys are um uh what is the testing process over there can you please tell me like what kind of testing activities or are you designing any test cases so overall what are different testing practices you guys are following can you guys tell me so i'll start with manual test cases in the starting when i was working in the manual area uh we were creating the test cases we were creating the test plans uh and we were using al as a test management tool so there we were creating all test cases uh we were raising the defects and we were handling all the client call that is defect call uh all the review call walk through calls and uh talking about uh the automation uh yes we are creating the uh creating our test cases uh for web as i said that web applications we have used selenium webdriver and in selenium webdriver i have used maven with the page object model design pattern and we have created multiple layers over there that is page layer uh test layer and then test on a class that we are maintaining and apart from that uh there are multiple uh utilities classes we have created where we have you know which is useful so we can talk about your automation things maybe in some time but i'm more interested like what are other testing activities you guys are uh are doing for example you are saying uh managing the defects test cases what else in terms of testing you guys are doing in which area you are majorly involved only for ui testing you are doing it or maybe functional or other non-functional things also you are doing yeah we are responsible for functional testing as well all the ui testings as well and we are performing sanity regulation testing as well so these type of testing we have do you have any uh exposure on like performance testing or using any tool or okay okay but have you ever ever any tried to explore these kind of tools with respect to performance like j meter or low donor or something like this there which we can use for performance testing but i never worked on that area yeah okay so you are majorly with ui as well as you are testing your back end and apa testing also you're doing it okay can you tell me like five important apis in your current project these are that you are actually doing it and you are testing these five important apis okay so uh as of now for apa testing i have worked in two projects in in the first project uh the project was like we were creating the as we were creating the customers customer records let's say a new customer is coming on the bank and he wants that they want to use instagram banking api name just tell me the api name no need to explain about the api just tell and patch is there so these apis we have used no get post port is there but tell me the api name let's see for for example get account id or get account information or create account something like this uh we are searching the data from the web server we are sending uh one customer id with the request and from the server we are receiving the response and we are validating that reform whether we are receiving the correct response or not uh talking about the post request we are sending one body with the request and with some field mandatory fields and once we are sending the request we are receiving the response we are validating the status code we are validating the uh messages whatever the messages we want and uh for these apis we are using uh some type of um authentications as well that is uh oauth 2.0 so are you using authentication only sometimes or for all the apis you are using it for all the apis we are using so what kind of authentication you are using uh in the first project i have used a bearer token and in my current project we are using [Music] 2.0 what is or 2.0 what do you mean by this 1.0 and 2.0 hem do you have any idea because you are practically using it so i'm expecting that okay you know about 2.01.0 all the authorizations are part of open only token only so i think uh like earlier we use 1.0 but now a days 2.0 is highly used because in this uh the securities you know they have provided more security and it's like we are generating one token and it gets expired so it provides more security over there and to generate the token we are providing the client credentials over there one username and password and one key with the help of these we are generating one token and we are using that token as part of the as part of this point okay okay can you tell me some uh oauth 1.0 some important uh keys some important secret keys that you will be using right somewhere client id or secret key have you ever used that in 1.0 uh in one point actually i haven't used 1.0 i have used bearer token in my first project here they have provided us some of the apis and using those apis we were generating our mirror token and that bearer token we have uh you know provided we have created some environment variables to use these uh tokens and from there we were refreshing the apis after every four hours and then it gets refreshed automatically so your token is getting refreshed automatically after what is a ttl time for that what is the session expire time it can be anything in my last project it was four hours before uh like we were working on uh onshore and offshore timing so they were the only people you know who were generating these tokens uh and my in my current project it gets refreshed after every 10 minutes 10 minutes okay but don't you think so that four hours is too much on protection yeah well that's what i'm saying because at that time my also team was not available at offshore that's why they have kept this much of you know hours so that we can use in our okay okay okay so let's see your authentication got failed right you're passing your uh uh the token id got expired or maybe the wrong token id were passing it what is the response you will be getting from the server okay so in case uh my password get expired then we are getting 401 unauthorized user status code okay and let's see your server is down or maybe server could not understand your request or something like this in that case what will happen what is the response that you will be getting yeah if server is down then we'll be getting 500 internal server error okay so 500 is a very generic server error right have you ever heard about five zero one or five zero two five zero three i have heard about five zero one yeah there are five zero one two or three as well but uh most of the time i get this five zero five hundred internals error and these are the cyber error because uh like what happens when the server is not responding at that time we'll get this error apart from that i never okay no worries can you tell me the difference between the url and the uri you must be using it's a daily routine activities right that you are using some a service url and then you are having one api url and then you have on a uri also what is the difference between url and uri okay uh so uh url is like um it's an address to a webpage in the server and uri is a combination where we are providing the you know path parameter and query parameter we are providing the exact location in the server that is called uri using parameter are you sure yeah okay okay fine so let's see what is the difference between path parameter and query parameter okay so um path parameter is as i told you earlier that it is used to provide the exact location in the server and whereas query parameter is used to filter data basically suppose that there are multiple records in that web page and i want to fetch the record with customer id one so i can provide my query parameter as one and in that case it will uh fetch the report that that is having customer ids one so which character you will be using in your in your service url which character you will be using for query parameter we use question mark okay and for path parameter okay good so uh so let's see uh i'll give you one scenario so you're using you're saying rest assured a bdd that you are using it so let's see i want to send a request to the server with the with a post call and i want to send one payload also along with that that is a json payload and the request name is let's see create user which is a typical post call and then simple i'll give you one url so you have to first test it and you have to automate it so tell me the testing process for that what are different things you will be needing to test this particular api and then later on you have to automate that so what are the different things you will collect kind of information that you will collect from the developers to test this particular api so in order to test this api uh first any authorization of authorization or not if yes then we we are required that and uh what are the mandatory field that will be a part of this body for post request and the url any environment variable that we need that we need to use that we can that is required as part of test and once we'll send the response uh some header is information if it is required then again we'll see whether some of the header headers are required to test this type of apis and once we have all the and required information we'll send this request to the server and then after getting response we will validate the status code in uh the fields that should be a part of that response suppose that uh i have sent the sent one payload with customer details his name username or password or first name last name all these details i'm sending and in the response i should get customer id so that would be part of my validation okay so let's see the payload that you are passing that that to create the user right every time uh it's giving you a response that okay our customer got created successfully will you certify that api is working fine let's see i am the developer and i have done a hard-coded value whenever you are calling this particular ap and the server will always send a user created successfully how will you make sure that okay this api is working fine and then this user got created through the api so once we get the customer id once we send the post request we can use that customer id to fetch the record from the server for that we can use get request and when when and request we need to send the customer id as part of a parameter and it will search that customer id and its respective details from the server and it will provide us accordingly so let's see you don't have any get api for that developer they have not created any get api yet it means you cannot call get api what else you can check what are the other ways you can check where exactly the data is getting created in the server in the database so don't you think that you will go to the database and check it over there yeah definitely so what we can do is uh i can tell you one example uh whatever uh whatever the post we are sending over here in my project those details are getting you know recorded in dynamodb in aws s3 bucket and in that from dynamo tv we can search that particular customer id has been created or not okay so you will go to the database and uh hit your queries over there and then you will fetch the data that customer got created or not yes okay okay so can we create a data using put call yes i guess so yes okay why what is used for generally for uh for updating can you create can we add the data with the help of good call sorry can you please come again so can we create a data with the put call i guess yes we can create basically it is used to update a data but i think a put request is a part of post request only so basically one first post will come and you can say put is a part of post okay okay but no worries so you are saying that okay you are using postman also right obviously you are using it postman to hit the apis and everything yes okay okay can you tell me that in postman that how will you configure your environment variables okay so in order to configure the environment variable uh we need to click on new button and there is environment option in ah we need to once we click on this we need to provide one variable name and the uh path url some type of url or some type of values that we want to you know use every time we can provide and we will update these details and from the one but in order to use this environment variable there is an option in the right side environment option is there we will click on this and we will select the particular variable that we have created so what are different types of environment variable we can set in postpartum uh whatever the uh value that we are using again and again just like url so we can put url or we can uh put the authorization token as well so authorization token you will be setting in postman global environment variable or local environment variable there are two types of environment variables uh i have heard of current and initial so we should the the token in the current value not in the initial value because of the security purpose again uh just like suppose that we are working on a team and i just i want to use this token for my purpose right so in that case i have to use the current value because if we provide the url in the initial value as well it will be shown to everybody for security my question is that there are two types of environment variable current and initial values you're talking about for a specific variable i'm talking about what types of environment variable we can set let's see i have five apis and for all the five apis i want to use the same url or same api url or maybe same service or token i want to use that so you will be using authentication token as a global environment variable or local environment variable uh have you ever used this uh this uh this feature in postman so for every api we are providing the token separately so suppose that i am working in get request then i have to i need to refresh my token so in that case should be current uh local sorry okay fine no worries so do you like in postman we can write some test cases with the help of javascript have you ever used that no i never use it okay no worries so you are using rest assured for that why are you using rest assured any specific reason or because we have other apis also other dsl libraries also available like we have http client jersey client uh catalon sorry um other different other kinds are available not catalog sorry karate is available so why are you going with only with rest assured uh so when i joined this organization they were previously like they were already using uh that framework there was a framework they have created using a given so they were already using and i had no option at that time okay that's fine so also i was new to this aba testing and also uh yeah that was even for me it was learning okay okay good good good so arabi i'll do one thing that uh i really want to see that okay really want to check that are you comfortable with rest assured or not so i'm just sharing one url with you and just go to the chat box and then click on this particular ui yeah i can see your name can you see i am writing something okay great so uh for example let's see in rest assured that you have to use right and you are using uh one basic auth over here let's see you are using some username and you are using some password that should be part of your authentication right or it could be let's see authentication header you can pass over here we are not using any error token or something like this another thing is that it's a post it's a post call and then you have uh one service api url with that and the api url is something like this let's see abc.com whatever right and that is the account api and then api name is create account and as a payload i'm passing one json payload over here something like this i'm just writing a simple uh payload like that that you have to pass a name colon let's see you are creating ravi and then i'm writing something like this let's see a city you are using let's see whatever the city let's say you're using a delhi over here like that and some other information also that you are passing it right so this is the json payload that you have to pass so can you write the code over here in rest assured in bdf format and with the help of given when then i'm not expecting the exact syntax but i want to see that how exactly you will write your steps over there and rest assured and then how you validate it so when you hit this particular api right so this is a request payload and in the response what exactly you get in the response you get okay one user id you are getting it let's see user id is a one or whatever and then you are getting one message over here in the json that user created uh successfully like that okay this is the json again you are getting it so i'm not writing the exact json syntax over here but yeah let's see assume that okay this is the json that you are getting it how will you get this api how you validate and how do you write a simple automation test for that okay so uh for that he can provide the so you can directly start writing the method name yeah exactly you know you need to create the class name and all those things let's say you are using junit.testng so simple start writing from the a test annotation so you can write the short forms if you want so that we can save some time i'm not expecting the exact uh you know syntax that you have to write yes uh okay so let's see something yeah yeah okay there's something like that and then we can use a log okay fine so can you explain me like quickly what exactly the code that you have written so basically what happens is like uh in this approach we have to use this keyword given when then and in given uh section we need to provide all the you know prerequisite and the header uh that we need to provide and the map that we i want to send what is map here [Music] sorry how will you convert this json payload to the map actually uh what in before this test class before this method we have to create one map in this in that map we can provide the uh details of the customer as part of qn value pair and from there we can use this map as far as json payload yeah so but how will you convert that i got it that okay you have to convert your failure into map so what exactly you will write in that particular method yeah here i'm providing the content content type that it will be application and json that way it will go in the json format the data will go in the json format yeah yeah so the data is like that name equal to the vct equal to delhi phone number is equal to this country is equal to india let's say you have 15 attributes are there in your payload how do you convert this json payload to the hash map that you are using it which mechanism you will be using it that you have to convert your json failure to a java object like have you ever heard about like serialization or d serialization something like this i have heard about this but i never used it so i think serialization is something that we are converting our object data type to you know readable format to the server um okay okay and then you are uh writing at line number 30 status is equal to 200 so when you create the user so generally what exactly we get 200 or 201 yeah 201. when we create the customer we will 01 okay that's fine so how will you check that the user created successfully messages coming and user id is also coming and user id is not none how will you assert that is not null so uh for that in body we can assert the message first of all that a mess it will be like just like we have uh check this for city should be delhi and it would be like message okay whatever the message here okay yeah whatever successfully created okay fine so uh let me delete uh clear this so you're also working on selenium web driver right yes and you are using uh java for that so i'm giving you one scenario a simple scenario over here that what you have to do there is a window okay there is a window page and on that particular window there is a link is available then you click on this particular link and there is a window number two is coming right so from the first window you click on this link and window two is getting appeared on it may be in a new tab or there is a separate window is coming on this particular window you have to get the title of the a new window title the new window means title of the second window right and then you have to then you have to come back to the window number one can you quickly write the basic code in selenium how will you handle this use case and when you come back to the window number one then you have to get the title of title of the window one call it title of the window one you have to get it this is the question just quickly write the direct syntax you can watch method you will be using in selenium how will you handle this yeah so in order to get the window one session id we need to use get window handle method but you are already on window one right when you launch your driver.get let's see let me just just to clear it out uh this is the url that you are using it something like this let's see url which is um abc.com whatever that you are using it okay so when you write abc.com you are already on the window number one now write the code you keep explaining me also what exactly you are trying all right we'll use uh get window handle it will store current window session id into this string variable and we are printing this value windows session id uh window id okay so you don't need to print it that's fine you can ignore the printing part and then we can use set so uh suppose that uh when i went once i have clicked on this link so on this page uh when we click on this link that you are giving let's say driver.find element this is my element right and i'm clicking on this link so another window will get open in order to get the other windows which are getting opened in order to store this id we have to use a set because and we have to use get window handles method and get window handles method return type is set only because all the ids will be unique in this case okay so it would be um yeah okay yeah driver dot get window handles so what exactly it will return you are saying it will return one set and inside the set yeah what exactly it will store are you sure or id or both the window ids will be stored uh id will be stored so what is the difference between driver dot get window handle at line number seven and driver dot get window handles you have written it will it will store the id of the current window this get window handle and it for the list of other window except current window um are you sure yeah that's your written driver.get window handles if you're saying that okay it will store the child window or window number two you can simply use driver or get window handle also then why are you using driver autocad window handles because it will be my parent uh window right sideline number 13 you have created one set reference over here right child so this reference is having one object over here pointing to one object in this object how many window ids will be stored um so once we click on this link it will open one id right one window so it will store one window one child window except this parent window so it will not store the parent one no are you sure i'm not sure though but it should work like this one it should work like this but you should know what exactly it's list over right in the in that line number 13 whatever the set object reference that you are creating it is pointing to an object and it will store both the window ids window 1 and window 2. that's why we are storing inside right ok ok ok i get it now then after that what will you write um we need to use for each loop string and then can you use directly for each loop with a set set does not maintain any order right yes then can i use some uh let's see iterator over here iterator yes we can use that okay so let's see uh in order to get the title of the new window the second window how will you go there second window again uh i was trying to start a loop here and i was checking this child window id is not equal to the parent id because i want to move to the child window so here i am the like child window is not equal to parent then it will uh you know will use driver dot switch 2 and then window and in the brackets we need to provide the child window id in this case and it will navigate to particular child window and then there he wanted to get the uh get title right so once we move on to style window we will get the title using get title method and then again our job was to come back to the previous window again so in that case we can use default content method and once we move on to the parent window we can again get the title using uh why are you using default content and what will happen to window number two don't you think that you should close once get the title of the window child window we can close that particular window using driver.close and then we can use uh default content method and then it will navigate back to the parent child parent are you sure you have to use default content which will come back to the main window or window number one don't you think so that you have to switch back to the parent window by using uh driver dot switch to dot window instead of default content yeah i think default content will be used in frames right yeah for windows we have to use we need to switch again to the parent window that's why we have a fair preparing window why do we need to switch back to the main window you already close the second window after getting the title why do we need to switch back to the window number one what is the reason but because we want to come to again to the parent window so that the control will be there in the parent page okay so let's see if i'm saying window number two is getting closed where is the driver now have you ever thought about it where is the driver now driver is not back to window number one because you let's see you just you just close the window number two where is the driver now okay anyways no worries perfect no shoes okay so uh let me just uh stop sharing this one second okay so in selenium let's see there is a drop down and the drop down does not have any select tag how will you handle that without selecting tag okay so in selenium uh if we don't have any left tab tag then we can there must be any list over there let's see one so we can store all the web elements that are present in that web list we can store in one list and from there we can either read all we can go through the list we can traverse the list and whatever the value we want to get selected we can match the value and then we can use click button in order to click that option to select the top option okay okay good so uh tell me some at least five important methods available in actions class what are different user actions you can perform with the help of actions class okay so actions class uh we can mouse over to the element we can right click we can double click we can hold stop and hold we can hold the mouse to particular element we can select the value we can perform okay we can select what else what else what else some very important user actions you can perform right just like you said drag and drop or click and hold what else right click using context okay and which method you will be using yeah double click is also they are good so which method you will be using for right click uh context click context clip okay good so let's see in selenium can you tell me how exactly selenium works with respect to you know what is its server architecture how exactly it will send the request to the uh to the browser and clicking on a specific button can you tell me some important major components over here with respect to selenium architecture the web driver architecture okay so talking about a web driver architecture what is happening at the background or whatever they have provided us the selenium libraries right multiple languages just like uh ruby and then java is there uh multiple language support so we are you know writing the code into our language that is java so what happens is like it will create one payload basically these libraries are just apis only they are sending the request to the driver file and then from driver file uh it will perform the action to the actual uh browser so what is happening is like suppose that i am writing code into the java language and then it is creating that code into a json payload what is the driver file file every uh browser are you know they have created one driver file that is some uh using chrome driver firefox driver so every browser class have created their drivers and we are sending it's the json payload will go to that driver particular driver file uh in pro in case of chrome it will go to chrome driver file and from that file it will go perform the action into the actual browser in case of firefox it will be a firefox driver uh are you sure firefox driver we have a separate name for firefox right kiko driver gig gecko driver driver okay okay then from there it will perform the action into the actual browser and uh suppose that i have click send one request that i need to click on some particular element it will create one json payload it will send it to driver class and driver class will perform the actual action on the browser then again in order to receive the response the browser will send it also driver class and then driver class will again convert that dictation into our readable format that we are seeing in the controller so this is how it works in the background so let's say you have written 20 steps over there in your test scenario so what is the most important thing that for every request you have to send along with your json payload along with your request one important thing you are missing right the first and the moment you write webdriver driver equal to new chrome driver what exactly is happening at the server side it will set the property okay let's see the property is also set i'm talking about at the server side it will maintain one id right and that id you have to send with every request okay that i think i'm forgetting that part i'm talking about the session id right the first time it will create a session id and next time let's see yeah session id would be created and it will send so let's see you quit the browser you have written driver.quit what will happen to the session id after that can we use driver once again after using quit no because it will set that session id value as null okay and if i'm using driver.close or it will only close the current browser we can what will happen to the session id session id will be up and running i guess i'm not sure about it but it should be running and we can again uh open one url using get method i'm not sure my assumption i'm not sure okay you're you are correct about quit in case of quit your session id will be null in case of close what will happen id will be blocked our session will be expired it should expire and when again we'll open a new browser it will uh again gets refreshed according to the new url but to launch the new url again you have to write driver.get method and the moment you write driver.get server will refuse this request because the session id is expired maybe it will uh expire then okay sorry yeah okay that's okay perfectly fine so uh you are using the selenium page object model like framework part and designing the pattern over here so what do you mean by page object model can you quickly tell me some three important points in page object model that you will always take care of it okay so basically page object model is a design pattern where we can create our test cases and we can create our framework in more readable form so one would be more readable and reusability would be there in case of page object model and maintain we can maintain our food very easily so these are the main three that we can discuss as part of each of that model so these are the advantages i'm talking about how will you design it what are the three important things you will consider by creating the page object model okay so for creating the page object model uh what we can do is we can create the type of layer that is a page layer where we'll be having all page classes related to all pages to the web application and in these page classes we will be using uh by locator class or maybe we can use add direct find annotation um keep these uh locators and we'll provide the page actions respectively respective to these locators and once we create these page classes we'll start creating our test classes in test layer we will be creating multiple test classes and in these test classes we will be creating actual test method the test cases we can create over here using these page classes and if i ask you so let's see if i say that okay let's where we will write your assertion assertion you will be writing in your page class in your page action method or in your test class uh we will be using assertion in test methods only okay what if i'm writing in the paycheck in the page classes in the page actions i'm writing assertion what is the problem with that uh there's no problem we can do so but it's a good practice to use assertion in test methods because suppose that uh i'm working getting one uh test case and in that test case i use assert assertions over there because that will be part of that test case only and the page class will have been having actions only related to that those locators only okay so you are saying it's not a good practice to maintain the assertion in the page class yeah so there are some standards that we can follow in order to create test cases so that's why it's a good practice to use our assertions in test layer only okay so where will you manage your environment variables certain configurations that you have to maintain in your framework what are the best factors to maintain the environment variables uh for environment variables we can use properties files in all properties files we can uh store all the environment variable just like we can use we can keep our url over there username and password over there and then browser details should be there like all other details we can provide in the properties file and we can initialize this property files into our setup method okay okay so let's see i want to execute my test cases on the different environments for example your manager says okay execute sanity test cases on the qa environment regulation test cases on the stage environment and then again let's see start running your test cases on the dev or stage environment how will you set up this thing these environment concepts in your framework so uh as i said that we can maintain multiple urls over there in properties class so in properties class we can in all the urls that well that will be a part of sanity or regression on any other area right and from there in the runtime we just need to provide the name of the url so let's say i have created for sanity one url would be there and for uat one url would be there so in the runtime we just need to update our setup method with that particular environment variable name you don't need to hard code the value with the you know actual url okay so when you maintain somewhere in your properties file how many properties file but my question is that okay let's see on your username password and your other information is different on queue environment you cannot use the same username password in the dev environment or the stage environment so without changing any you know anything in your configuration or anything in your uh code your manager says okay simple execute the qa environment how will you do that what kind of configuration you will handle in your framework that i haven't used it in practice okay basically what i have done is you know there was we were just updating the property file whatever the environment files we want to use we were updating the url from the property file okay from the properties file okay okay fine nobody's so in uh same thing let's see in your framework what kind of reports you are using like and why are you using that what is the reason of using that particular report okay so for reporting part we can use a low 4j uh api and there is extend report is also there that that it's a good practice to use extent report because it's uh whenever we because it provides uh it provide the detail uh the report into very detailed manner that once we'll get a report you know all the pass and failed test cases into one section and there will be one pie chart section would be there where we can see the execution flow right and and whatever the test case got failed that would come under one section only so it would be in a very readable format so that we can send this file to our stakeholders like manager or po or va okay good so right now whatever the code lets you have written in your local in your laptop you are writing you have designed the entire test cases and framework and everything i want to set up one complete testing automation infrastructure right so you are the new person in the team and then if i say okay here we you have to set up the entire infrastructure so for infrastructure point of view for test case execution to test case management and everything what are the different tools technologies you will be using it so can you tell me like overall high level some tech stack over here with respect to uh infrastructure yeah so uh once we are done with the text test case uh creation and execution in in order to execute those test cases we can maintain our code into version control tools like github and we can use jenkin pipelines we can create one pipeline in jenkins and in when when we'll create our jenkins pipeline we can provide the actual github path where we have located our project we have placed our project and then we can provide the path in pipeline only from jenkins only we can uh run our test cases directly what else so you will be let's see i'll give you one server on aws or maybe somewhere hosted in my in our office premises and i say that okay you install jenkins over there will you run your test cases on the same machine or you will set up a separate execution infrastructure uh i didn't understand your question so let's see there's a jenkins machine is there you're saying that okay i'll set up my job on the jenkins you connect with the gate repositories and your browser is also launching on the same jenkins machine that is don't you think it's a wrong practice right you have a other 10 team members also there another five team projects are there and then they all are running they all are using the same jenkins machine and everybody is running the test cases on the same machine everybody is launching the browser on the same machine is it a good practice it's not like we have set the like we have set up jenkins in our system we are using one jenkins link that is like our organization has uh you know using one uh yeah so that's what i'm saying your organization has given one server and you are responsible uh to install jenkins set up jenkins on that particular machine on that particular server don't you think that okay everyone is using the same jenkins machine to run their test cases and browser is getting launched on the same machine because let's say you are using chrome 85 assume that and i am in a different team i am also using the same generating machine i also trigger my test cases on the same chrome 85 but your chrome 85 is already busy so don't you think there will be a conflict and then these are the problems you will see so how to solve these problems like what kind of other infrastructure you will set up like have you ever heard about selenium grid on docker machine docker containers i have heard about it but i don't know like i haven't learned about this in your company uh what exactly you guys are using it uh the approach that i have told you earlier that we have in our code and then from there uh in jenkins pipeline we are providing the github part so this is the setup i have done so far and in the near future they are you know planning to set up altogether a different infrastructure they're there maintaining these repositories a very in a very good manner but i haven't done it repositories you can manage any time right let's see repository just a source code management tool right and the jenkins is just picking the repository cloning the repository creating the workspace and launching the browser the problem will happen when you have a bigger team when you have multiple projects using the same champions to execute the test cases on the same machine that is don't you think it's a good practice or it's a wrong practice what what do you think about it uh yeah i don't think so it's a good practice so we should [Music] we should use the concept of parallel testing as well or maybe a premium grid we can use as part of this okay so do you understand selenium grid what is selenium grid if someone is asking you okay what do you mean by grid so i just know the definition of this that is uh we can run our test so okay so for example let's see if i ask you one thing that you are you are saying that okay you are using aws right you are using uh your api are hosted on aws server and dynamodb also you are using it over there like that so dynamodb is a sql database and those equal database sorry dynamodb is dynamodb is a sql database or no sql database that i am not sure but uh whatever we are doing is we are as i told you earlier that we are validating whether the data has been created so it will be in the tabular form we are we can filter the data as well so there are some ui they have provided to filter the data that we can provide we can sort our data we can provide the data there are there is one filter option is there and we can filter out the data accordingly my question is that uh dynamodb is sql database so what is the difference like between sql database or no sql database for example let's see a mongodb mongodb is no sql database but oracle is a sql database what is a basic difference between these two databases have you ever thought about it well database is where we are searching the data using sql queries here and in like other databases we don't use sql query just i have never used it other databases but yeah maybe it should be like that we don't need to use some sql queries in order to search the data but you're using dynamodb ring yes okay fine no worries so uh for the testing process point of view you are saying that okay you guys are using um a regression test cycle are you like are you doing any execution manually like running the test cases which are not automated do you have certain case or like you have hundred percent automation is there yeah we have uh multiple cases where we are uh executing our tests manually so what do you think like which test cases should be automated and which should not be automated or 100 automation is possible uh uh i would say that 100 automation is not possible because there are some cases where dependency would be there uh let's say one flow is there and uh next day i can test its further flow so depends dependent shouldn't be automated or we should always start with our happy path uh test cases whatever the you know normal uh normal which the application is working fine and the flow is working fine we can start should be automated what about some negative scenarios yeah negative also negative scenario uh should be there i am saying that the dependent test shouldn't be there dependent for example can you give me an example yeah so suppose that there is a flu that uh for one account number i am performing some transaction that i have deposited uh 200 in that account number and in the next day we need to check whether that 200 are reflecting in these transactions or not so this is the dependent to test cases that it depends on the first test case first it will appear so these are this is example of dependent test case and we shouldn't uh i'm not saying that we shouldn't automate but yeah we should ignore these type of dependent test cases but in this case i can simply create a data first and then i'll validate yeah and creating the data will be my precondition i'll be writing in my setup method just create a data and in my add the retest i'll be verifying the data it will take one day it will take one day to deflect because earlier i was in a banking project so there was a flow uh where i have some deposited two hundred dollars in one account number and it will take like there were some batch uh was going so you're saying between somewhere batch processing were there and it's taking some time okay yeah okay okay good no worries so uh tell me one thing that uh if i ask you to join this particular team and for initially 2-3 months you don't have any automation work well let's see for next six months you don't have any automation work but product is really good team is really good and we will start automation maybe after four five months or six months we really don't have time we really have a crucial releases are coming so in that case uh what will you do and you will get to know this thing when you join the team yeah so uh in these type of situations uh yeah definitely i would love to be a part of team uh where the team environment is good or like yeah automation will come in the future but before that i would get to know the application i can get familiar with the application how it works so that you know once automation come into the picture i'll start automation without you know because there without the knowledge of the product or implementation we cannot automate and we shouldn't basically it's a good practice to get familiar with the application first so yeah in the starting initial days i am ready to work without automation uh part yeah i can work and i i can execute test the cases manually so that i will get familiar with the application okay okay and in your resume i can see that okay you're using uh zera and uh such thing so can you tell me what exactly what are different things you're doing with respect to zeta so jira and rayleigh i have used as a you know we are maintaining our user stories over there and we are creating uh sub stories over there and in rally it's more of a uh jira kind of tool only and we are raising effects over there as well and we are we can cr we have i have created test cases over there in rally and i have just we have just used to maintain our user story in my previous previous projects uh i have used it as part of you know maintaining the stories and providing the hours and all okay but you're writing your test cases and ready yes okay but don't you think that it will be difficult that you have to let's see map your test cases with your user story then it will be difficult because you're writing the user's story in zera and writing a test case in jelly how will you create a traceability matrix over here no no it was like uh i told you that uh in my previous project we have used jira to maintain the user stories and to create the test cases we have used test rail and in my current yeah and in my current project we are not using any test management tools so we are maintaining our user stories in rally only and we are creating the defects and the cases in rally itself okay so you're saying you are using in your current project rally and then everything is available in rally only yes yes okay okay good okay so one our last question from my side okay so give me an example of something that you have tried in your job and then you were trying to do something and that could not work and how did you learn from it what exactly you learned from it and you totally miserably you failed in that particular job right so how will you come out of it and what will you what did you learn from that particular just give me one example what did you learn from that particular from that particular task okay so [Music] in any example any any example in your current company previous company anywhere where you'd try to do something and you miserably failed yeah so it was like uh i i don't know the actual coding part of visual basics and there was a project in which we were uploading the data into the database and before that we we have to maintain the excel sheets over there so you know there were some data that we needed to check first that it's in the correct format or not so i tried to make one macro using visual basic uh language that it should check the details so it's in the correct format or not so at that time i was not obviously if it will be sick even uh right now but yeah at that time i failed to do that and what did you learn from that incident from that situation yeah i learned that we should i should learn the basics first of all you know i should individual basic first and then i should start doing such type of automating the process okay okay one last thing from my side ruby that how exactly you are enhancing your uh testing knowledge are you like in your free time when you get time from where you are learning how exactly you are learning or or you are just waiting for a specific uh opportunity to to work on our testing activity or testing automation tool let's see from the project are you waiting for that opportunity or you're just like already i am not waiting for any opportunity in my project because it's been high time to learn new technologies so i am using youtube to learn new technologies and also as for so far i have learned bdt framework over there because i haven't used it i have used in ap testing and very soon i'm starting to learn apm as well for mobile testing okay okay good so i think that's all from my side so the interview is over do you have any question yeah definitely if what like how i have performed you can yeah that i'm gonna tell you but what do you think what do you think about it how was it i did not ask any tough question first of all yeah it's like whatever you have written in your resume i just wanted to check your practical knowledge so what do you think where exactly you are really strong and where exactly you think that okay you are missing something and you have to prepare and you are lacking yeah i think uh my concepts are good and i'm able to tell you the exact concept but when it comes to you know writing the code when about the session id i got confused and then there were some other things so i think i need to work more in these areas to clear the concepts more and yeah in apart from that that's it okay see i'll tell you the problem first i'll tell you the positive parts right yeah so your communication is good no doubt about it but i'll tell you the butt later but you know the concept you are absolutely right you know the concepts you know okay how exactly things are working and whatever you have written in your resume that you are not bluffing anything that okay you have written some big words and but it's not like that you don't know about it for example if i ask you about selenium or rest assured or something like this most of people they write research and they are not sure about how to write the coding rest assured or apa testing and postmen and everything so that is actually really good some questions uh uh answers that you have actually read are really good like reporting and then and what selenium concepts are really good no doubt about it i'll tell you what exactly the problem okay in some time your api is a very strong part that i felt that okay you whatever you are doing you know the things here and there some improvements are needed some answers can be uh you know uh fine-tuned or maybe you can polish those answers right and you are aware about your testing activities and uh you know the things it with your resume it reflects that okay this guy is not bluffing this guy is not it's not saying just for the sake of you know saying it so whatever it's written in your resume you are actually doing it uh whatever uh you know when you give the answer also it's reflecting over there that's a positive point that's a really good point now let's talk about the improvement areas see one overall high level thing i'll tell you that with your interview see we spend around 1 hour 15 minutes something like this and i did not ask much questions did you notice why i could not ask actually i really wanted to ask because what you tell me like what did you realize i was thinking more time good exactly you were taking more time you were like uh just take it in a positive way you are stretching sometimes you know questions you should be to the point you should not tell okay in my project in that particular module this is what account id got created or something like this if someone is saying that asking that then you can mention that this is just one of the examples otherwise also like some other other situations also you are stressed sometime and then i had to stop you i wanted to ask more and more good questions but i could not do it because in the real exam real-time uh interviews also people will be having only let's see 30 minutes or maybe 45 minutes nobody is going to spend time two hours with you right so this is the thing that you have to to the point cut to the point that uh you know to the point answer you have to give whatever they are asking just very polished answer that you have to give do not stretch unnecessary uh things okay with respect to uh you know the each and every detailed thing that okay you are explaining about your project about your modules and whatever okay you're getting a point right what exactly i'm trying to say that's why that was the main reason that we could not uh you know i could not ask much questions over there okay otherwise uh your answers were good but somewhere you have to prepare for example let's see for api you should know about the exact difference between one point zero two point zero because when you say this thing right definitely you have to you will expect these other questions tell me about 1.02.0 right what is the token id you are confused about url and the uri also so please prepare that you are sure about your path parameter but i ask you what kind of parameter you part parameter what is a symbol for that so let's see forward slash simple very straightforward answer some forward slash and i was right so query parameter you were good and then uh 404 500 and all those things those was actually really good there is no problem with that but improve that authentication part what is the behavior token you are using beer token which is coming under which authorization what types of different authorization are available like primitive authorization and basic authentication 2.0 1.0 right token id what is secret uh key what is client id what is client secret right so you tell you told one thing 2.0 is more secured as compared to 1.0 but why what are the different other factors other differences are there try to prepare this question if you are uh showing api uh experience people will definitely ask these kind of questions for sure right then your intro was good your intro was like with respect to what exactly things you are doing in terms of testing in terms of automation tools technologies what kind of process thing that you are using it you said that okay if you're using a sprint and all those things so i'll say that okay it was really nice answer that okay you have given that i really liked it okay you have a good attitude you listen to things and then you give the answer that is uh that is every candidate should have that you should not uh you know uh just running behind the answer to give the answer so just you have that uh you know hold and then then you give the answer that is really good part then uh testing ap i give you one scenario let's see how will you test it so i ask you one thing that okay from the developers what are the different things that you will get to test let's see create account as a post call so you gave all the pointers over here i'll ask for the authentication body url variable header and all those things some extra effect of that negative testing point of view what are the error codes they have defined yeah that is a very important testing right because one customer is using your api or your mobile device they are using your api what are the different error handlers they have handled over there right what kind of uh mandatory and non-mandatory fields that you have i think you already covered that particular part okay so just mention those things as well then you were confused about uh the moment we get the customer id and then yeah your test case is passed but how will you validate that in the database so that's fine you will call the get api but what if get api is not available that is what you have to be different from other candidates that you simply said okay i'll immediately go to the database i'll check ultimately the data is getting stored in the database you're fetching later from the database only so it's just a game between api and the database whatever database that you are using it so you every time you will either you are writing manual test or automation test you will test go to the system go to the database and check over there that data got created in the qa environment or not like that that is a complete a test same thing in restaurant also the data got inserted and then you will write one let's see jdbc odbc connectivity and then fetch the data and checking over there for full flesh uh you know a validation that okay yeah my get api is also giving the same data and the database is also giving the same data that let's see ravi got created with the customer id equal to one that is a perfect test case that you can write it over here right okay then post post when you are using it you know most of things about postman but uh confused about uh you know different environment variables like global and local environment variables we were having how to set up you were talking about current value and the initial value that is the column values for the environment variables but what type of environment variables right let's see for example for the qa environment that you want to set up over there in that case you want to maintain your tokens over there for all the aps the token will remain same for next three hours or four hours in the queue environment so i will set it over there with respect to a global environment over there like that and then please try to at least try to if you're not sure about it uh that's okay but uh try to at least hardly it will take one hour session you can check any youtube video in fact i have one video on how to write the basic javascript test in postman it will enhance your knowledge on postman although you are using restart but people might ask you so it's just a matter of one hour and half an hour and they just watch that practice once it's very straightforward exactly same thing that you are doing in research you can do it in postman also with respect to javascript you have to use watch our apis to uh you know try assertions and all those things that you have to use that and then and simply call the api get the response and validate that that also we can do that so you can simply say like that then your rest shot coding question i gave you that most of things were correct but i think slightly somewhere you were confused between uh you know the sequence over there that how will you validate that how will you pass the header and how will you pass the body and what kind of assertions that okay you will be doing it your sequence was absolutely almost everything was good so in your rest assured it reflects that okay yeah you haven't experienced so as such no worries about in the uk in the rest assured coding part but you have selenium good knowledge about selenium like actions classes select classes and all those things but window handler was not that up to the mug that answer was not up to the mark you were saying driver dot get window handles will capture the child window id no it will capture both the window ids or whatever the you know uh windows are open currently and then if you are let's see you have three windows one door one two and three the moment you write window handles it will capture all the three window ids that are stored inside the set object over there that that's why it's returning the set and it will be unique so your answer was right that okay it is unique that's why we are using it uh that's why we're using set not the list but if it is yuri it's a collection collection means it will collect multiple things multiple window id it will return so driver.get window handles will store both the window ids not only the child window id if you have only one window it will capture only one window id if you have multiple windows it will capture multiple window ids so please uh this is a very common question actually to handle the window you know handler so prepare that i'm not saying the exact syntax and one one more thing ravi that when you're writing the code right quick try to write quickly don't try it okay exact method and then if any typo is also there you are doing it right don't let's see message spelling don't need to correct it everyone will understand okay this guy has written message over there or driver let's you have it in driver but instead of returning the spelling mistake is there any typos there no need to correct that that person the individual will automatically understand that so with this you can actually quickly write the things and uh no need to you know you were doing a lot of backslash and then you know doing uh correcting your typos and all those things that's okay you can simply you know quickly uh improve that particular thing okay the context like actions classes and all those things were uh were good your web driver architecture knowledge was really good that was really good you were confused between firefox driver and eco driver so please it was just just a small mistake silly mistake but yeah and then the web driver architecture you were saying that okay we'll pass the json payload and all those things but you missed one important point that is a session id yes and you are coming from api testing background you have done a lot of api testing right and when how can you forget about the session id right the first thing session id will be created and the session id will be maintained throughout the session until driver.clone4driver.quit so please read about quit and close you after this interview after this session you just simply write the code after driver document you simply try to write driver.finderlimit.driver.get and check what is happening with the session id in the debug mode okay just try to do that you will get to know in close the session id will be expired into it section id will be null so that's why i told you that for quit your answer was right but for close the answer was not right the session id will be invalid or it will be expired but the moment you write driver.get it means you are passing the request to the server once again with the driver.get with the same old section id server will reject this information reject this particular request so what you have to do you have to launch the driver once again you have to initialize your driver once again we have to write driver driver equal to a new chrome driver once again you have to write it right so that's why when we write that framework uh test right uh driver dot quit in the ta down method again we will go to the initialize method in the setup method right and then again the setup method initialize method will be called and driver equal to new chrome driver we will be launching it that is the reason we will not write directly driver.get we need a browser once again okay got it same thing like i think this is good the page object model design pattern important points you told that okay in the page classes we should not write a test but in the test classes we should write the assertions and all those things that was good that was like i really wanted to check and environment variables also good but how will you handle on the multiple environment like qa dive and on so please try to uh you know people they really want to see your design knowledge how will you maintain the design in the current framework don't maintain everything inside the mains common properties why do you want to maintain the same common property i can maintain four qa dot config.properties dev.config.properties stage properties yeah like that and whenever it's required like somebody saying okay run it on the stage so from the maven i will write maven clear install minus d environment equal to stage so i will read as a property in my code and then i will initialize that particular object only which is pointing to the stage.properties it's a very common code you just you can check it on any blog or any channel you will find that particular answer for that question okay please prepare that it's something important then the reporting part was good but uh then i asked about the infrastructure see you are six plus you are showing six or six seven something like this you are showing right six seven years people might expect you the infrastructure infrastructure is not only about get repository or jenkins right people uh might expect some matured answer over here you simply say okay no we are using jenkins and everybody is using the jenkins on the same machine you are launching the browser it's a wrong practice we should never do that we have a setup environment center for selenium grid infrastructure or solenoid or selenium or any cloud you are using let's see on aws we have set up our selenium grid or maybe browser stack or maybe sauce labs that we are using it but but we will never run our way but we will never launch the test cases on the on the same jenkins machine jenkins will just expect the code from the gate repository from the master branch and then it will execute the test cases on the on the cloud or maybe on the docker container or something like that so please improve that particular part docker container selenium grid and don't say that okay i know only definition that grid is used to execute the parallel mode that's everybody knows that even one year experience guy also knows that part but we are expecting some matured you know proper answer for selenium bread because see just because of these small small things you you will never want that okay you are you are getting rejected you know the things so eighty percent think seventy percent thinks you know it already but twenty thirty percent that is the main the golden part you know that you have to fetch you have to improve that particular part okay so that is the thing and uh yeah so infrastructure means the docker grid containers and aws you can do that cloud machines browser stacks such things okay you will be doing that that is part the part of infrastructure and these days a lot of people are asking about the infrastructure and then you have clearly returned that okay dynamodb you're using s3 over there and for the storage services and all but you are not sure about the difference between a sql and no sql database right so it's not it's not like obviously in sql database you have to hit this sql queries but why you're using dynamodb what is the reason behind that right what do you mean by no sql database what do we meant so there are certain no sequel databases like dynamodb cassandra mongodb there are no sql database they store the data not in the form of rows and columns they've stored it in the form of collections or maybe documents like that they will store it right so try to understand why we using it because you have written in your resume the dynamodb people will definitely ask okay why are you using dynamodb why not oracle database like that okay so uh that is my observation overall it looks good you have on some other uh points uh some on some other uh area that you have some really good knowledge a really good attitude a nice uh you know uh cool and calm candidate i would say but somewhere you are a little confused that you need to improve that that is the thing from my side and please do not stretch the answers unnecessary come to the point that is what uh because other candidates are waiting if you're going for face-to-face or let's see walk-in interview or there's a telephone call so everyone wants to know everything about most of the things within 45 minutes until really amazingly going good and some discussions are really happening like super nicely done and then then people might extend but nobody is free for more than one hour so you have to explain everything as much as possible as good as possible within 45 minutes and one hour so try to do that okay okay cool ravi so i think anything you want to ask uh i don't want to ask but i would like to say thanks to you for having me here and your work is very very good and you are serving to our community that is very commendable so i would like to thank you for that give us thanks a lot for your kind words and then i'm really glad that okay my content is helping you and community and i wish you all the best you have couple of interviews this week and next week right so just like just go for it and if you need any kind of help just let me know okay okay thank you take care bye you
Info
Channel: Naveen AutomationLabs
Views: 74,421
Rating: 4.909472 out of 5
Keywords: testing mock interview, testing interview questions, how to crack testing interviews, testing interview questions and answers, test automation mock interview, naveen automationlabs, software testing mock interviews, manual testing interview questions, manual testing interview questions and answers for experienced, api testing interview questions, mock interview manual testing, manual testing interview questions sdet, software development life cycle, testing mock interview naveen
Id: LyN4Ttgc6X0
Channel Id: undefined
Length: 90min 52sec (5452 seconds)
Published: Sat Jan 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.