Automated Software Testing in UiPath

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
dear friends welcome back to automate with Rakesh in this video we are going to learn about software testing is it possible to test a software and what exactly you test in a software right you may not have a complete experience around software testing so this video is going to give you everything that you need to learn around uip paath for software testing so why delay let's get started and I'm going to teach everything from the scratch from the very Basics from a blank zaml file I'm going to start so it will be a very learning experience for you so do not skip the video have patience and learn until the end so let's get started and don't miss out to subscribe to my channel go to my channel homepage and click on this subscribe button beside the logo and also you can click on the inverted triangle and click on this notification icons to stay updated so as we are learning software testing the very first need is the software which software you want to test now for practice and learning purpose uipath has created a software for you do you know about that that is known as UI bank. uipath docomo all you do on your browser log to uib bank. ui.com slw welcome this is the software so let us first open it and see how it appears understand what it is and then we will proceed further now this is a bank software when you come to this particular page it'll ask you to login with your username and password you may not have one so the very first thing what you do you click on register for account okay and enter your email address enter your set your password first name middle name last name date of birth number of dependencies username so all these fields you simply fill it out so once you fill it out click on I confirm that agree to the privacy policy and hit on register which I have already done it so let me quickly log in to the software once you register whatever the username and password that you have created loging into that I'm am going to hit on sign in and this is the page that you see so this is a bank website like you have any bank website this is a test website from uipath for Learning and testing purpose now this product or this software as a product which are the things available in this product let us first see like in a bank you can open apply for loan you can apply for credit cards Mobile Banking you can open a savings account so there are lot many different things available on this software now when it comes to testing one question you must ask what is the question what to test what should I test so remember when you test you do not test the entire software you test a specific module remember this name called module you test a module of a software so what is a module then module means any specific feature for example loan is a feature in this video we are going to test the loan feature and in that so loan is a big term now in that there is another term called apply for a loan there are two modules already have a loan apply for a loan so we are going to work on apply for a loan so remember what is the module name under the loan section we are going to test apply for loan is it clear now before you start testing it is atmost important that you spend time understanding that what it is what is the module look like we will click on this apply for a loan so when you apply for a loan there's a application form which opens up now in this loan application you have to enter certain details inside this form for example your email address your loan amount that you wanted to have term how many years you you want to complete that loan current year of income what is your income that the bank asks right and then your age here it is asking very limited data for testing purpose now after that you will be hitting on submit for loan application now when I hit on submit loan application it either will tell you congratul culation or it'll say sorry for example if I'm asking for 10 crores right or a big amount very big amount and my earning is less then the bank what it does it will says sorry you don't meet the required criteria for this loan if I apply for a small amount and my income is more then it'll say congrats your loan is approved similar way this software does that for example let me simply enter certain dat data for example I'm saying I'll enter a sample email address and let me enter a big amount okay and I am saying loan term I want to cover that in 10 years current year of income let's say $30,000 and age let's say I'm saying 30 is my age and I'm going to hit on submit loan application if I do this it is saying sorry at this time you have not been approved for a loan because I asked for a big amount let's go back to apply for another loan let me try the same thing so I'm saying uipath gmail.com then loan amount let me ask for only some $10,000 and I I can cover that in three years current year of income let's say I'm going to say $30,000 and age 30 and submit loan application now it says congrats So based on your input this app ation is acting and accordingly it is showing congrats or sorry and after it says congrats it also tells me you have been approved for a loan with UI bank with a fantastic rate of 9% you know annual uh rate 9% interest rate your loan ID is so and so so this is how the software is behaving now whether the software behaves in different different data points if I provide a different data is it accurately behaving or not that we wanted to test for example if I'm entering 1ak 122,000 more than my income a great amount then it is saying sorry so it is doing some calculation and finally showing this so here our objective so having a test objective is important third test objective what is your test objective so here our objective is to test the software or test the model module which module apply for loan module to verify if the software shows the right output on various data points if I'm providing different different data points that time how it is doing so this data points the end the all the data that I've entered these are called test data these are called test data okay and what to the module that you'll be creating this is called a test case you will create a test case for apply for loan so remember there are two terms we have understood test case means you are testing a specific module and the test data are the data that you'll be entering to test it so these are called test data these terms are important so test case means you are testing a module and test data means the data that will enter to test that this is called test data so you need multiple test data right different different situations so you need always you need multiple test data so more test data you have more rigorous testing you have done so you know that your software is working in every kind of data situation okay so these are the two terms you have understood all right so now we have logged in we have also seen the module how it works now what I should do on UI path now from here this until first second third is your understanding now from the fourth step you'll be building your RPA workflow so next step is build RPA workflow in UI path so let's do that let us start from very scratch okay so this is the page now here what we can do is let's go back to the software so this is the software now this software first what we will do we are entering certain data we'll create a simple work for to enter the data so prior to that there are also steps you have to click on loan apply for loan I will exclude that from this page we will start where we'll be entering the data points here and then finally submit the loan application and whatever the output is coming is it as per the match or not for that let's go back to yappa Studio step by step we will understand the very first thing you do hit on app web recorder okay and keep the application in the background so keep this application in the background and then hit on app recorder okay now first you select the you can simply select the text box so here the text box is enter email address simply click on it it is going to collect the information wait for it okay it has collected now it is asking to enter something so here I'm going to say uip path atate some a sample entry you make okay so it has got that for me next is loan amount request click on it all right now here let me enter some value some value I'm entering okay and it on confirm pretty simple now loan term click on this okay now here it is saying this is a drop down so that is how it is appeared let's say I'm selecting 5 years hit enter once you are done hit on enter next thing next thing is it is asking for current year income so let me click on this simply click your mouse now here let me enter current yearly income is 30,000 let's say and confirm the next one is AG click on this let's enter some H 30 and hit on confirm and the final button is submit button hit on submit okay so now this is coming so at this point you after hitting on the submit click on save so just by doing the app recording now it has become very easy that my workflow is ready you can see my workflow is ready okay so I have a used browser it has G gone to loans apply then it is typing the email address then it is typing the loan amount then it is typing the loan term current yearly income age and submit button so this is our workflow is ready so what we have done till now workflow is ready after this the very important thing is to you have to create arguments let me write the step so build RPA workflow you have done fifth step create Arguments for RPA workflow so the workflow that you have created you must have arguments arguments means where we will pass the values let's go back to Studio click on arguments panel and let us create these arguments now remember we have worked on multiple different fields let us create this arguments before you create argument let me show you something that you need need you need test data from where can I find the test data because I have to enter multiple different data for that you go to uipath academy so next point I'm talking here is before you create the argument you need test data you need test data so from where will you find this test data for this go to uipath academy there is a course called uipath test Suite let me close this in your in the courses just type uip path test Swit test site you type hit on enter so here there is a course called 2our 15 minutes course click on this you have a test Suite course okay and I'm going to open the course once you are on the uipa test Suite course scroll down and you would find something called test case building and Publishing with yapa Studio okay test case building and Publishing with yapa Studio simply click on this particular module here if you scroll down RPA test cases in yaua test Suite building test cases with yaua Studio Pro this is the demo and in this demo there is there is something called loan codes I'm going to download this loan codes where we have the test data for our testing purpose okay so the download is complete let's go back so this is my file so let me place this file cut from here and I'm going to keep it in my documents okay so replace so I already have the same file so let me not do that so this is the file loan codes. xlx now once you open the file you may find one of the email address in the second row might be missing if it is missing simply copy paste the previous one because we are this is sample data copy paste and save it again as a XX file Excel file okay now here what is there we have different data points so this is the data point I have tested loan granted no and if I put 15,000 loan term 10,000 income is $30,000 loan age 35 loan granted yes so this is a test data given it to you and this is the this is the output which will appear right what is the output we are getting for the first one we didn't get any loan rate it said sorry if you type the second one it will say 6% loan granted congrats like that there are different different test datas which are available clear so this is your test data so you got to know from where to get the test data from the test Suite course okay this is important all right now we have to create arguments what you do these are your values loan email is input Lo loan amount is a input loan term so this until here until loan age loan granted this is your input so what you do I need to copy this input values to a notepad for certain reason so simply copy paste this values and I'm going to hit on enter we simply keep it like this okay so these are the different different values I have copyed into a notepad so that it becomes easy to copy from here and create something in the Yaba Studio now which step we are in we are in create argument step we will copy each of this input loan email and click here and say loan email hit enter next is loan amount go to the second one and I'm going to say loan amount hit enter next loan term I'm going to go here so all of these arguments that I'm creating are of string arguments and in it is going to take some value then loan income enter next loan H enter and the next one is loan granted so let's click on this loan granted so how many we have created 1 2 3 4 5 6 easy so we have created this arguments so your workflow is ready so if you have done this your workflow is ready for testing pretty easy very good now let's move on to our next step what we will do here we will we will create our test case I told you when I say test case means what test case means it it tests a specific module we are going to test the apply for loan module so let's create a test case and inside the test case you will have multiple test data to test different different situations easy great so how to do that in UA studio so you have created this project let me save it okay there are no variables nothing simply arguments we have created and there are no values at the moment now what you can do after you create the workflow one thing that comes to our mind can I test whether it is typing it or not yes or no that comes to our mind okay no problem if that comes to your mind simply go back to the Excel file okay and enter any value any rows value so I'm entering the first rows value okay so I'll put some default value within double codes okay but ensure you are entering the in the right place see I have made a mistake loan email I put uh this one so I made a mistake right so be careful what where you are entering what so here double quote email then is loan amount then I should put this one then loan term then loan term within double quote 5 years loan income is 30,000 okay and Loan age is 35 enter your data properly and Loan granted is [Music] no okay now this is not part of your form loan granted this is just we need something for testing so now these are the values I've entered let us first test it it definitely comes to our mind okay rakes Let's test once right before we proceed so let me open that UI bank so let me close this course let me close this and let us run it run file this to see whether it is uh you know working properly or not all right so it has directly went to loan apply now you can see it is entering the email address loan amount loan term yearly income age and going to hit on submit the application now one problem you will find what happened I want to see what is the output but the browser got closed this is very important important what you do here in the use browser very important property go to properties and here there is something called close what you do select this and say never important Point okay say never so now what would happen the application won't close so let us run once again easy easy learning you're understanding slowly great all all right so now it is entering all the details one by one very good all right now the browser shouldn't be closed now you can see it has come sorry at this time you have not been approved for a loan and the same sentence is also there as a message correct so we want to verify whether the application is giving this message at the end or not for different different data inputs if this this are the data input then it should say congrats and it should only say the loan rate as 6 percentage we are also going to check the calculation whether it is giving that right value or not so all those checks we can perform there is a important factor we yet to consider tell me what it is here we have got some default values for each of these boxes correct entering the email address entering the this one and here what I'm going to do I'm going to replace this ua. Gmail with the arguments that you have created right loan email and all that so let's do it so the first one I will replace with loan email and the next one I'm going to replace with loan amount control space great then loan term loan term great and then current yearly income so this is the income so I'll say loan income loan income properly you do it okay don't make mistakes here and then age I will select loan age and click submit okay so verify once again let us see email address is email address loan amount is loan amount loan term is loan term uh yearly loan income age is age okay so we have entered all these things and save this workflow this is important our next step is to create a we will create a test case all right so how to do the test create a test case go to the projects panel select your zaml so which is the workflow here what is the name of this scenario 3 okay three I'm going to right click and I'm going to click on so before that Ensure you have saved the workflow then right click and click on create test case pretty simple step okay now here it is saying name test case one location this based on bdd test case so here we will do bdd bdd means behavioral driven development I have explained that in detail in the previous video what is it now here what we will do we have a test data set of test data we have in this one we are going to hit on next and here it is saying test data what is the source of your test data click on this dropdown and select file file is my source and click on this button browse that file that's why I told you to keep it in a particular location easy to find so I've kept in documents easy to find then I'm selecting this Excel file hit on open okay now it is saying there is some error what is the error the file you want to import can't be open check if already open okay I've kept it open let me save and close this let us try it again click on open or let's if this happens to you simply uh go back and hit on next or simply select some other file let's say it is not happening let me close this and recreate it go to projects panel and ensure your file is closed right click test case bdd hit on next so give it a name give proper name so I'll say TC um automate with Rakesh 3 aw3 hit on next select file now let me select documents this open now you can see it has appeared clear this may might also happen for you so you know how to fix it so here we will select all the data all the data point that is there inside the Excel file I've selected all the data points okay like this you can put a checkbox or you can select only a particular set of data so all those things you can perform let's say I need only three or let's say I need all everything so for everything you select like this okay so everything has been selected and then all you do simply hit on create so you got some input okay data successfully imported from loan course so what happens when the data is imported you will also see the arguments that you have created right right so when you do like this all the default value the first row value get autocreated automatically it has got created Everything Has Come come okay and Loan rate loan granted loan term all these things arguments got created for this zaml remember don't get confused here this zaml that we have created has its own arguments these arguments when you go back to your test case and hit on when section import arguments on the left hand side you find these arguments coming from your zaml okay let me expand this so these arguments are coming from your zaml and these arguments are coming from the Excel file so it automatically matched so if you keep the same name as per your Excel file this is the benefit you will get it might get automatically mased in case it did not appear the values did not appear automatically for you simply what you do simply type it and select the loan email and all these are coming from your current test case test case argument from the Excel file this all the things are coming from the Excel file okay so now hit on okay so this understanding is important okay remember this workflow has arguments so this arguments are coming where in your test case it is coming on the left hand side on the left hand side arguments are coming from the zaml file your workflow and the right hand side things are coming from the Excel file just now you have selected the Excel file which has columns from there it is picking and automatically matching it for you in case the automatic matching did not happen because you have got different different names then you have to manually enter it here like I have shown you this should be pretty clear to you so all these arguments are coming from the Excel file okay and these arguments you would find it in your test case argument section and it has got certain default values okay so once this is done once your test case is created in the given section we don't have to manually enter any value because all our data is coming from the Excel Okay so important points couple of important points what is the important Point here the workflow has arguments which resides in the left most when you import workflow this should be clear okay and eighth Point Excel uh what do you say column name becomes Arguments for the test case for the test case that you have created and the Excel Val you have selected that becomes automatically it creates the arguments for you automatically that happens as per the column names all right this resides on the right side of your import workflow of your import workflow I'm not writing every sentence but you understood right okay so this must be understood pretty well otherwise you will be confused from where this is coming from where that is coming so that's why I made the special point now in this one given section can be left blank why because we already have given the input coming from the Excel file and how to use it I'm going to show you so given section can be left blank all right so these are the important points we have understood let me increase it slightly okay all right so here everything is done now the next part in the then section I am expecting to verify what I want to verify if somebody's entering a some kind of a data I want to verify this it should say sorry at this time you have not been loan approved for a loan if somebody's getting entering proper value it might say congrats so these are the data points I would like to verify it could be multiple data points doesn't matter okay so how I do it the very first thing what you do because you'll be dealing with a application here ensure in the then section use application browser this should be a very first activity indicate the application so here I'm going to hit on indicate so this is my output right the output the same page you need to indicate zero false not the first page this the output you want to verify so select the page done okay after selecting we will use a switch case switch case now remember there is a value in the Excel file and now let me open the file so there is a value here called loan granted or not there are only two values it could be no or yes so based on your software you see what is that data point point you wanted to consider so here I'm considering loan granted so at the end loan should be granted or not granted right so this is the column I'm going to take so loan granted is also a argument right let's go back to the studio and here I'm going to use that argument loan granted or not and this argument coming from the Excel file and this argument contains only two values what is what are those two values no or yes yes or no okay so what we will do let's say the first case will become so remember before you write something in the switch very important one type argument should be changed so here we'll be dealing with a string so I'm saying saying string let us add no as one of the case and hit outside and the other case is yes and exactly you write how it is written in the Excel no and yes okay now let's focus on the no if it is no then what kind of a message do you expect on your application if it is a no the bank expecting this kind of a message sorry at this time you have not been approved for a loan if I compare that with my Excel file for the last case for the RO number eight even for this this guy uh loan term is five and his age is 16 so he should not be granted because it is below the age right loan age so that's why it is also saying sorry so at the time anytime it is saying no the message that always appears on the bank is sorry I want to test it if I'm providing some data is it really showing that message or not I'm doing a software testing is it behaving in the right way or not okay so this is the message so what we have understood here we will use certain verification activities so let me hit on activities and verify type verify so there are multiple different activities verify expression verify control attribute I'm going to teach you verify expression with operator and a lot of things now in the previous set of videos I have already taught you verify expression let's use something different here we'll use verify expression with operator okay verify expression with operator now this needs certain data for it to verify what to verify now for you to verify what we will do you will first use a activity called get text activity get text and dragon drop above it okay so first thing come is get text and then verify in the get text hit on indicate in Chrome and I'm going to indicate this particular box okay and then validate so it has validated successfully then hit on confirm clear now I have validated now once I validate what I will do I'll create a variable here called output hit enter okay so this output variable is going to get that text it's a string variable so the very first variable we have created this now this variable I'll put it here in the expression output okay output variable equals to what should be the message as per your Excel file not as per the application as per your test data given this is what the message I want to see so you first copy this so that it'll check from the website and see if it is matching with this data or Not So within double quote paste simple so check everything okay okay so done save equality sorry or you can also say contains if you feel there could be a space or some mistake kind of things are there you can also say contains instead of equality it's up to you okay all right so this is the verification I have done for my very first day if it is no then this this kind of verification it should do okay done fine now let us minimize and go to the yes in the yes the same set of activities will continue so get I need control and hold copy them copy and go back to the yes and in the yes let us paste it okay the same set of things we need but here the output the get text will be slightly different because it will say congrats right it should say congrats so what we will do we will test the second data by manually entering in the application we'll go back to the application click on apply for another loan and here let us enter some manual data some random data so some less amount I'll apply loan term I will keep it as 10 years current income I will say 30,000 oh I put more numbers it's fine 35 submit loan so now this is congrats so this is the message I would like to verify congrats let's say so what I will do here I will indicate again indicate Target on screen and I'm going to indicate congrat okay now once it comes validate validation successful and you hit on confirm simple now here I would like to verify the output so what is the output I would like to verify as per the Excel it should be congrats okay it should be it should say congrats done so the output variable didn't come because you know why it did not come because of the scope so change the scope to entire this one now go to yes now this should be kept in double code save okay so now our workflow is ready our workflow has been done save it okay so what is the next thing that we have done then section workflow design okay now in the then section once it test one data you wanted to move on to the next you know the the previous page you have to click on apply for another loan so in the then six itself after the switch case Okay after your switch case I'm going to add okay I'm going to add one more activity here click okay click activity and I'm going to indicate on screen the current activity must be inside a use application browser okay I have to drag and keep it on the top so that it comes under the use application this orange color okay okay it is inside now now indicate indicate Chrome and apply for another loan you can see how nicely we are doing one by one very good so let's select this validate validation is successful then hit on confirm very good so done so it'll click on apply for another loan then the next value will be entered so our test case is now ready the test case is now ready okay now let let us run now while you are running remember before you start running first you close the application that you have opened then click on this button and there is something called run file with data variations so data variations means the Excel data that you have given different different data that is called Data variations important term now what we will do we'll click on run file with data variations and you can see all the data has come it is still giving an option whether you would like to select all the data or some of the data so I'll select all the data and hit on run here Ure the application is already closed behind the scene so it is entered the first value now it will verify so do not use your mouse at this point let everything happen in the background all right so you can see the entire workflow has run very nicely and the ENT all the outputs have come for example the very first one all you do open your Excel file so you can see the very first test case has passed second one passed third one passed fourth one passed so what is saying pass the expression output with the value congrats was containing the expression congrats so it is comp comping as per our logic past past and past okay the last one also past because it showed the right message in the software testing so we have created a automated software testing so congratulations for watching this video and having patience till end and watching it so anybody who has watched till end please do comment and let me know because you guys are great you have a lot of patience to watch till the end thank you guys please do comment and let me know I would like to really see those comments thank you let's meet once again in the next content till then take care
Info
Channel: Automate with Rakesh
Views: 3,638
Rating: undefined out of 5
Keywords:
Id: SlrLCGLxxeY
Channel Id: undefined
Length: 43min 34sec (2614 seconds)
Published: Sun Mar 10 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.