Transcript for:
Overview of Software Testing Experience

hi Vian how are you I'm good sir so can you tell me something about yourself how many years of experience you have in the field of software testing yes sir so I have 3.4 years of relevant experience in the field of software testing I have joined uh I joined in Feb 2021 uh in in Accenture and I was uh at that time application development analyst and soon I was alloted a project like within a one Within a month and I was been given automation testing role and parall I was being uh trained in automation testing as well and mostly uh i' I've been alloted to a single project now my project is hardford newco and it's an insurance uh and banking domain and basically it's an insurance uh PL PL Pline Insurance uh giving domain M okay okay great now which is the automation framework that you are using so from the start itself sir we are using selenium protractor with uh with typescript okay recently sir we have been thinking of I mean the the project has been thinking of shifting from selenium to [Music] playright okay okay so what is your contribution to this automation framework sir so whatever requirements we are getting from the client we try to automate them to the max of course if it is too complex we try not to automate it because the maintenance of the scripts gets harder but we try to automate up to the max we try to uh as much as possible we try to include the coverage and uh we we do uh automate step by step in ins Sprint and also we do the ENT testing of it so we try to automate uh the scripts but at the same time sir the scripts which we think should not be automated we do the manual testing of it parall okay okay fine see whenever you get this kind of a question in a real time interview so basically you have to come up with a storyline so let me share my screen see there would be challenges in all the automation Frameworks whether it is manual testing project or it's an automation testing project challenges would be there so when they are asking you what is your your contribution to this test automation framework then in that case you have to tell that about the challenges and the resolution so one of the challenge that you can tell is about flaky test so there are some test which are flaky enough which are having some intermittent failures so let's say on Monday they got passed on Tuesday they will fail on Wednesday Thursday again they might work fine on Friday it might fail again on weekends they might fail on Monday again they might pass so these are flicky test so as a part of the automation team what you can do do is you can tell that you have identified the root cause of such kind of test maybe it is unstable environments maybe the order or the sequence of the test scripts that you have used or maybe the application issue or maybe some particular test the the way they have been written in that module those things so you identified the root cause you implemented R retry mechanism so what is retry mechanism so that is you had a kind of a try catch and then you ask those particular test to run again maybe in a repeat mode they might passed so those kind of things you have to and you can use Smart weights soft delays to make sure that the test are running properly the second challenge that most of the projects fa face is the maintenance overhead what is maintenance overhead so at times the applications are so big there are so many modules in that applications that it becomes difficult to automate each and everything and even if you have automated then how will will you go for a modularized approach so let's take an example example you are having an insurance domain kind of a website so you might be having a different functionality flow for the vendors or for some agents or some routine customers so how you will modularize them so you can go for this kind of things so you will you came up with a suggestion of going for a modular approach and then you segregated the pages the test scripts and the module wise feature files you kept and then you went for the approach in in the modular approach obviously the dependencies would get reduced because when you have to change the scripts for some particular module you'll just focus on that module right so there are less chances of regression issues to come up in the automation framework as well so those are the few of the things that you can tell so this is one of the challenge Second Challenge covered here flicky test maintenance overhead apart from this you can also tell about the collaboration thing now one simple example with respect to collaboration which you can give is H so in the companies at times the manual testing team will be different and there will be different team members who would be doing automation so let's say you identify the few of your manual testing team members they are repeatedly doing one of the task for example they have to upload some particular files they are creating the test data every day and then they are starting the testing work actual testing work so you as a part of automation team you identified that is a mundane work that is a repetitive to work for them and then you automated it and you handed over those scripts for them to them so that they can run and they can create the test data in an automation manner this way their time is getting saved and they are able to focus on other productive task so this is also one of the collaboration that you did within the team outside the team also you can say if there is any other project in which the automation was required and they were stuck in implementing one of the technical thing related to Proctor or typescript so you assisted them there and you made them life made their life easier so this is how you can tell collaboration team impact okay at the end you can tell as a results of this what happened so maybe percentage was increased this much amount of time was reduced so such kind of answers would assist you in clearing the interviews 50 to 60% you are done if you are able to speak even one or two points out of these three points you are done there right the interviewer would be happy to see what kind of answers you are giving okay sure sir okay now let me share my screen so I have my use case okay um so I have a data in an Excel file so I have to read that particular data from an Excel file and and I have to pass it into my website so how will you pass this data in the post request how will you read the data from the Excel F so can you write a code for this uh no sir I have actually not used an Excel format but we do use Json format so so I'm I'm not sure about the ex request now let me change this thing so you have to read the data from a Json file and you have to pass this data in the poost request so how would you do it now this is similar to what you are doing right so whichever files you are using for reading the data it might be CSV it might be XLS it might be xlsx it might be Json file it might be a notepad file right so how will you read the data from those files so sir in our project automation framework what we have seen is uh that before uh in scenario this uh is written how to a second yeah just a second yeah yeah so yeah please go ahead um sir I think I'm I'm not aware of this okay no worries so let this be an open question for the people who are watching this video there is a data in a Json file how do you pass this data in the post request how will you read the data from the Json file okay so you can answer in the comment section of the video itself so meanwhile what I'll do is I'll assist you with with how you can integrate reading of an Excel file and a post request in the protector test so let me assist you with that answer okay so if you have to write this particular script so with respect to protector you will be first creating the utils class what is utils so that will uh be a common class from which you will be performing the Excel operations when I say Excel operations or Json file operations you are reading the data you are retrieving the data from that particular file or you are setting the data to that file so those are Excel reader kind of a utilities you'll create then you'll import the browser so this is the protector okay then you'll describe the protector test with Excel data and the post request so what you have to pass so first of all the URL so let it be an any URL that you take and the file path the file where it has been located so that file might be at any particular location so you have to take care when it is triggered by devops or when it is running in another machine then that file path should be there so accordingly you'll keep that file path then the next step is you'll be reading the data from an Excel file so how you will read the data so you'll create this constant Excel data equal to excel reader. read Exel file and the file path that you had mentioned here file. xlsx so this is for an example you taking one of the file and then this is the log that we are generating then you'll Loop through all the data so imagine you have in that in that particular Excel file you have two columns and 10 rows okay so 10 by two and it's a kind of a data that you have to read so you'll be traversing through all the elements all the cells values that are there in that Excel file okay and then you have the protector test logic so your browser. getet your URL and then the title get title what you are expecting so that should be equal to your application title so this is how you be reading the data from an Excel file so what we have done here is we are reading we are launching the URL and we are we can also keep the title of those URLs so imagine you have 10 URLs from the client and the respective titles of those URLs so that you can keep in an Excel file and you can read or you can keep in a Json file and you can read from them right simple yes sir yeah easy okay so this is with respect to this question now let me ask you one more thing okay do you know about bdd framework yes sir we have been using cucumber bdd framework okay so what are hooks in bdd framework sorry so s the in in hooks uh file we generally Define the before after uh before all after all methods sir here in before the test script runs what all actions do we need to perform after the test scripts run what are what are all the uh methods that we or actions that we need to perform we Define here sir for example that for example after a test script has been executed where are we storing the report sir we can we can mention it in uh after or after all hook sir M correct so can you describe any use case where you have used hooks or where you can we can use hooks in normal automation projects uh sir in cucumber bdd framework we generally use the page object model right so our our feature file name our page file name and the model file name are in a similar fashion so we we write this in before hook files that whichever feature file we are trying to run similar name page file similar name model file and similar name Json file we are trying to fetch and that's how uh test script runs and the data has been fetched from Json so we Define it in uh before so reading the Json data you know uh launching the URL from the environment URL Json so that we that kind of code we write in the scenario hooks perfect perfect right so when you have to read the URL you might have to run the automation script in different environments let's say staging environment then you have test environment you have environment at times you have to run on that at times you might have to run on the production environment so you might be specifying the URLs in the before so before and after hooks they will run before and after each scenario and if you have before all and after all hooks they'll run once before and after all scenarios okay so hooks in protector with cucumber you are using and they will allow you to run setup and you can also run your tier down code at different different levels right so that is the significance on hooks so this was good you were able to answer this question so great now let me go to the next question okay now uh this is one of the scenario that you have to answer so you let me share my screen so you are automating a web application okay it's a normal web application which is related to e-commerce website or Healthcare domain and you are getting a string so let's say you are clicking on one button so let me add here you click on one button let's say pay okay pay option is there and there is an alert that is coming up there's an alert po popup coming up and you you are you are supposed to get the string from that alert popup okay you have to validate whether that string this welcome is coming from that alert popup is not or not right so this let it be a string like this welcome to uh let's say flipcart.com okay this is your entire spring that you are getting from an alert popup okay and you have to validate using assertion so using soft assertion or using any assertion that whether welcome is a part of your string or not so how would you do this uh yeah yeah are you sharing the screen uh do I need to share the screen sir I I have I I I can tell you the methods which we use to do that so generally when we we have this alert uh alert class and methods which we can use so many of the methods like for example example if you're switching from window we can use switch to alert for getting the text we can use get text method yes I believe and uh we can put asserts uh maybe on the get text methods what we are getting and then what is the expected value so I think we can we can try that way M so see you have to get welcome you have to check for welcome when you say get text it will fetch you entire thing welcome to flipcart.com but you have to just check for welcome whether welcome is coming in that string or not in that case what you will do um so are you aware about contains kind of a method can use yes sir contains yes we can use contains correct contains with equal ignore case also you can go for okay you can ignore because sometimes okay now if there is a requirement that W should be in upper case e LC o m can me lower case then you have to you cannot go for equal in lower case but if you are going for a requirement where irrespective of whether it is uppercase or lower case it should come so then you will go for an equaling no case check for contains yes sir contains we we use when uh you know if this is one of the case where in the The Case of the letter are not matching or which are we are not sure on the value of the case and also sir if we if there's some Dynamic text appending to the to that text so we just try to include the the static text which we are trying to validate so contains yes sir we can use there contains you can use right okay now coming to the next question so how many test cases do you automate every day so sir it actually based it is totally based on the requirement which you are getting from the client so if the requirement is uh simple requirement wherein the the requirement itself is a is containing regression part more so we try to automate that so if if the requirement is a bit complex and we have timelines to deliver it sir we try to go manual way so so and we get some time to automate so I feel so two to three test cases uh we are good we can automate per day but not more than that okay so whenever you get this kind of a question a real time interview so don't tell this number directly okay what you should do is you should tell you should give a diplomatic answer so it depends on the complexity of the application so it is if your complexity of the application it's is a low medium or high complexity application so if it's a low complexity application and you are going for a bdd so in that bdd you would be going for a feature file in a feature file you will be writing the keywords and if the keywords are available with you so that means code also might be available with you in the step definition file so then what you will do is you can if it's a low complex keywords are available code is ailable you can automate up to 6 to 12 test cases per day how how I have calculated this so consider you are working for 8 hours in a day in 8 hours you might be having some meetings also you might be having some calls you might be interacting with the client you might be having a word with your manager's leads or sometimes you have to have a word with a development team so let's reduce two hours from that now you're left with six hours okay and then again when you say six hours not every moment of time you would be doing the automation at times you might get some Junior member who is coming to you and he might tell uh Vian I'm unable to find the locator can you please assist me or your code is getting reviewed by your leads and managers and you are connecting with them so out of 6 hours again you can take it 4 hours of your actual automation code thing when you will be doing more than 4 hours it will be difficult for you to do code as well even some people they can do 2 hours or 3 hours at the max So within that particular time limit you can tell yeah 6 to 12 test cases because I'm taking three test cases in an hour that two when keywords code everything is available okay now if keywords and codes is not available then it might take more time for you okay because you have to define the keywords you'll have to search in the keyword Library whether that keyword is a ailable or not if it is not available then you'll create that key you'll write a corresponding code in the step definition file you'll check in the test Runner whether it is running everything file or not so those kind of things you'll create a poll request you'll identify the test cases so that is there if it's a medium then with with respect to four hours you might be able to automate four to six test cases okay and if it's a high complexity thing so it might take two to three test cases end to end I'm see end it everything you design the code you run that code on your local machine and you perform unit testing and then you integrate your code with a devops pipeline and you run that Pipeline and you check it so end to end it might take this so give answers diplomatically because if you'll give the answers like this number this there are chances of cross questions okay two or three T cases okay how many T cases how many test steps are there in that test cases again right that is also important because test cases is single entity within that you might have multiple test steps also yes sir that also is one of the criteria that we can add here that one test case but that might have two test steps or that might have 10 test steps also okay now going coming to the next question here okay so what is the difference between page object model and Page Factory sir I'm aware about page object model but yeah I'm not aware about page Factory no worries no worries you can give the answer what is Page object model first sir p page object model with this is uh nothing but uh let's call it um kind of framework which we try to implement uh while we are using uh while we are doing automation so page object model is in in in any web application for example there are many pages that we need to navigate and visit and and uh have assertions performed on so we try to create uh Pages page files for each of the pages and uh we again try to create a model file for those pages so model file we write generally the experts and all the the locators so we try to use page object model in this manner sir depending on the web application and the pages okay see uh when you say page object model so page object model is a design pattern it's not a framework okay page object model is a design pattern then what is Page Factory so page Factory is a class itself that will implement the page object model design pattern So within page object model you will have finding web elements using by and there in the page Factory you will be using annotation find by okay so page object model is you you'll have to initialize every page object individually you have to create the objects then you'll be able to access them whereas in the page Factory all the object elements are initialized by using the init elements math me okay so this is the difference between the two page object model and Page Factory okay now let me give you one scenario so this is actually one of the requirement that has been given to you from your stakeholder um the the scenario is that uh let's say you have to open fine so let me share my screen so you have this scenario so when the payment is successful suppose it's a healthcare domain application and you're doing some transaction if the payment is successful then logs should not be generated okay but if the payment is unsuccessful then logs should have a date time stamp with an error message that this particular error came at this functionality date time stamp those kind of details so how will you do this in automation only when there is an error okay when there is an error at that time only you have to go for logs otherwise you don't have to go for logs okay so how will you achieve this uh sir so first thing we do is we put an assertion right these are all kind of assertions which we are taking so I feel uh we can also use i' I've seen switch cases as well using so for example if you use switch case and uh we have a keyword of successful and unsuccessful in the cases so in the case which says unsuccessful we can log an errors giving throw keyword and we can include the date stamp and you know date with the date class we can get the date stamp using get current date method and we can throw an error message depending on what uh we are trying to uh inform uh as why the this is failed so I believe uh throw can be one of the keyword that we can use to uh give uh throw error messages and so in asserts we can always use uh the string message which we are trying to use so assert we can use assert not equal assert strict equal assert equal where we can put if else statements if if the payment is successful we can give no asserts there if the payment is not successful we generally if there is a Boolean keyword which we are trying to validate true false then in case of false we can give a specific assert messages with the date date time stamp using date class okay okay yeah yeah that's the correct approach so using Boolean so Boolean will return you true or false okay so using false you'll go for a logs yes sir so for example here in payment successful if you're getting some message on the screen that yeah and we are trying to validate that we should get this page with the successful message so in that case if that particular um Dom element we are not able to get and we get a false as a outcome in that case uh we either display a message that element not found and if the element not found the possible reasons could be if the payment is not successful or in case if we are getting not successful message here you can try to validate it that way as well okay great so do you know about devops tools are you aware about devops so I'm aware about devops I know tools uh for example like genen kings but I'm not aware of that there's a dedicated team to that so my hands on practice on that is not much sir okay but have you faced any issues with respect to devops what kind of challenges you have faced with respect to devops Sir the outcome I'll tell as a challenge which I faced it currently sir uh there was uh there was a 503 service unavailable error from like let's say yesterday 6:30 to today today office time and I was I was not sure why is this error why are the deployments they say are failing but then I I got in touch with the devops team I got to know I I asked for them that are the deployments being failing or the deployment being going on or is it stuck somewhere so that we are getting service unavailable they informed sir the credentials to uh deploy the particular chain sets or the cycle sir were expired so I believe they had to replace that and that's how the deployment process was successful continuous integration and deployment process that was one of the challenge I I got to know sir okay okay yeah so that fine service was unavailable okay what are the some common locators in protector that you are using and how will you use how do you use them sir uh I use them manually because most of the time sir client do not allow us to use uh extensions like X let xox and or maybe selectors up which I try to practice it in my personal uh development sir but we try to use them manually and we generally use xath we use input class or ID sir by that and we we generally use xath sir there will use okay okay how will you do data driven testing in protector so data driven I feel uh we use via Json we so for example sir in an insurance based domain there are certain details required to create a policy so the basic details fundamental details are the the personal details of the uh customer if is if he's into uh getting an insurance for a vehicle then he needs those vehicle input details so sir we we try to give those details and into the Json file so that uh you know the the as you said sir the hooks file will pick up that Json file and that's how it will uh create a policy sir M so Jason approach we we follow right so Json apart from Json you can use Excel file also and within that you can provide the test data like this you have input and you have expected so you have customer details the customer ID would be there and the customer details so what is the input test one and expected result one for that test one input you have test two expected result two for that test two and then you'll be traversing the loop for all these particular test data one by one okay so this is the code that you will be so you might be asked to write the code in the realtime interview so be ready with the notepad++ or ID intell or Eclipse whichever you are comfortable with then you can write the code in that okay now this is one of the question now okay how will you capture a screenshot sir we use take screenshot method to capture a screenshot so I believe that method is used and we can use wherever uh we need to capture a screenshot also at the failure we the assertions take the screenshot generally assertions which we use take screenshot and wherever necessary we try to implement that method yes yes correct yeah okay Vian I am done with the test automation interview do you have any questions for me uh sir what are the areas do you feel sir I need to more focus on in terms of the technicality yeah yeah so see with respect to predictor you have a idea what you have to focus is if you can focus on devops tools like genkins how is the pipelines created which are the different stages in those pipelines and which are the kind of Errors you might get in the devops tools and how will you troubleshoot them what is Docker what is Ku needs if you have a basic idea no one is expecting you to be a pro in this devops but if you have a basic idea it would be it would be helpful for you then some of the scenario based things like how will you read the data from a Json file or with respect to logs you are able to answer that question and I think with respect to data driven you're able to answer so just one or two scenario based questions right that you need to focus on and difference between page object model in page Factory yeah yes sir and Sir technically as to like I said I have an experience in typescript framework but of course we use it's a rapper class for JavaScript sir so we use uh Java Concepts only so as an interviewer sir what what logic based question they can ask me to implement so in an interview if you see the job description if they are looking for core Java or if they are looking for python then they'll ask you to write some program and in that they'll give you some logic maybe they'll ask you to for example they might ask you to go for type casting from the data type from to another data type and then further the question would be okay let's move to one more data type level okay that can be one of the things or else they might ask you to um pick out the pick the elements from the string and then the repeated the duplicate elements and then arrange them or the sequence of those elements sort the elements in a string or array in an ascending order descending order so those kind of coding questions you can get you might Implement them in the scripting language that you are aware of and then they'll ask you whether you would be comfortable with Java or not so then it will be discussed like that okay sir so those things would be happening okay vti anything else you would like to ask no sir I'm good yeah