Selenium Integration with Azure Test Plans | Selenium Automation | Integrate Selenium & Azure DevOps

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hi everyone this is ravi welcome back to my youtube channel so it's been a while uh posting youtube videos in my channel so sorry for that but however you all as you all know i have posted around 20 to 30 videos on azure devops and also i have posted around 30 to 40 youtube videos on tosca automation tool okay so i would appreciate you guys to visit the channel and go through those videos so in today's session i'm gonna cover a topic related to azure devops and the automation test scripts so in this session i'm gonna cover how can we integrate your automation test scripts with azure devops test plans okay so that means how can you link an automation test crates to one of your manual test case in text plan and also how can you associate your automation test scripts with your manual test case in the test plan and also how can you run and trigger your selenium automation test scripts from test plan itself that means by using manual test cases itself you can trigger the corresponding automation test scripts and also how can you link automation test scripts to azure devops user stories as well okay so all these concepts i'm gonna explain you in this session but this session will be very high level session to get an overview right so after this i'll be posting around five to six youtube videos in detail explaining all these concepts please do subscribe to the channel click on bell icon you'll receive a notification whenever whenever i publish more videos on these different concepts thank you so if you see in the screen i'm also going to explain you how can we link automation test scripts to your manual test cases so basically while building your automation descriptions right so in this example we are going to take a bdd our spec flow framework where you will have a feature file right so in the future file you will be defining your actual test scripts or use cases right so we will be linking those features to your manual test cases okay so and also i'm going to explain you if you see on the screen if i go to the next slide how can you run automation scripts from test plans okay so basically how can i run these as linked automation test scripts from your azure devops test plans okay that i'm gonna show you and also we will be basically setting up the test plans in such a way that will be associating your latest release or a pipeline to your test plan so there is a prerequisite of your test plan settings where you will be associating your release pipeline to your test plans as shown in the picture okay so it's a very high level i'm telling you okay so once we jump onto the system i'm going to show you how to perform all these operations however in this session i might be covering very high level to show how this end-to-end end-to-end process can be achieved but i'm gonna post more videos with an explanation clearly how to build a framework and then how can you associate your framework test scripts or feature files to your manual test cases in azure devops plans okay so that i'm gonna tell you everything in upcoming youtube videos okay home now let's jump onto the system and see what are we gonna cover in this session okay practically okay so now let's jump on to our system and let me show you practically how can we perform the activities whatever i explained you theoretically right so this session will be very high level session so that you can understand end to end framework to achieve the required target okay so what is our target our target is how can we are integrate our selenium automation scripts with azure devops which means how can i link automation test scripts to manual test cases in azure test plan how to associate automation test scripts with manual test cases right and test plan and how can we run and trigger selenium automation test scripts from test plans and also how to link automation test scripts to azure devops user stories and tasks okay so in this session how much i can cover i will cover but you can expect rest of the topic in my next session okay so if i so before i start explaining you all these things let me first explain what is my automation script that i have built okay so this is my demo webshop trycenters.com site uh so my main aim of automation script i have built around five to six test scripts to validate login functionality okay by clicking on this login and i'm going to enter some invalid username and password and then i need to validate the invalid username error message okay and also there is another test case where i will be validating the valid user login so as soon as i log in i need to place onto this particular page that is another test case what is another test case which i automated so go to a parallelism shoe add one of the item to the cart and validate whether the shopping cart has been added with the item that we have added right so so this is our entire um shopping cart and test scripts whatever we built okay and then you just log out so basically i'm validating invalid user login and validating valid user login and then also i'm validating shopping cart functionality right so these are the manual test cases that we need to automate and once i automate i need to link these automation test scripts to those corresponding manual test cases okay so this is website and then if i go to my azure devops tenant okay so this is my azure devops okay i have built six automation tests sorry manual test cases if you see this is my first manual test case where i'll be logging with valid user okay so i'm logging in with my valid user i'm not providing any steps uh it's just a sample test case that's why i'm not providing any test test tips okay you can provide your test tips basically it's a just enter url enter username and then enter password click on login button so it's basically my manual test case okay so this is my manual test case and this is another manual test case for invalid user login and then this is one test case where i'll be validating the cart shopping cart by adding blue jeans and then this is another same test case where i'll be validating the shopping cart by using apparels and shoe product okay so these are all four different test cases manual test cases right you understand right these are all my manual test cases in azure test plans okay i wrote manual test cases okay and now we need to build automation test scripts for these manual test cases right so if you see here this is my visual studio where i have built a bdd framework means spec flow framework because i am using c sharp n unit framework c sharp so i built bdd framework by using split spec flow basically if you are building by using java then you say bdd framework but if you use uh visual studio c sharp we say it as spec flow okay so this is my spec flow framework okay if you observe my project structure here okay i have two features one is login feature add to shopping cart feature in login feature if you see our first scenario where i have valid user login i have second scenario where i am logging in with invalid user all right let me say invalid user right that's correct and if you see another feature which is add to shopping cart the first one is i'm adding apparition shoe product page i'm just basically validating the upper relationship product page link verification and there is another scenario where i will be adding a blue jeans to cart and then and then i am going to validate if i see that blue jeans in my shopping cart or not right these are my feature files and for each feature file for each scenario i will be creating steps right so for that right click and then go to your step definition okay so basically you can directly go to step definition or you can if you see here in the right side i have login steps this is one step definition for login feature for login feature i have defined all these steps in login steps definition right and add to shopping cart feature all the step definitions are available in add to cart steps okay these are all my step definitions for add to cart feature scenarios right and also if you see here i have a driver helper where i am basically initiating i web driver and then i do have a hooks so what do you mean by hooks hooks concept is where i can define before test run what should i do after test run what should i do before feature what actions do i need to perform after feature what actions i need to perform right and before scenario what actions do i need to perform so for you so if you see here before scenario what i am doing i'm basically i'm basically initiating a chrome browser right chrome browser and after scenario i'm basically quitting the chrome driver right i'm initiating the chrome browser and then i am quitting the driver as soon as the scenario is completed okay basically for each scenario it's gonna initiate the drive chrome drive browser and then it's gonna kill the browser right so that's the hooks and then this is my overall project structure our automation uh project structure right so now i have manual test cases in my arju devops and then i have my entire code base for those manual test cases automation tests basically in my local folder now what i did i have basically i need to check in i already checked in my entire code base to my azure devops okay so where if you go to azure devops again from test plans if i navigate to repose right if i go to repose and this one so this is my entire project structure whatever you are seeing in your visual studio if you see the solution explorer this replicates this structure okay so that means i have already checked in my entire code to repos right and as you all know i've already built a pipeline for this automation script basically i have built pipelines so if you want to uh know how to create a pipelines i have already published um another video in my youtube channel you can refer that particular channel so in this particular session we are not going to concentrate on how to build pipeline you can refer to those that particular video okay so here one thing is yes i can run the pipeline so that the code from this particular repos will be utilized and the entire selenium script will be run okay so that is known technology that means i am just running the pipeline so let me just run the pipeline no before i run the power plan i don't want to run the pipeline it will take some time okay so i can just directly click on run pipeline right and then which will initiate your test script but now if you if i run the pipeline okay let me run the pipeline okay let me run the pipeline and show you the results okay run pipeline i have already created local agent okay click on run so as soon as you click on run it creates a new build right this is my new build which is running on my system okay so it's checking out the code to azure repos from azure repos and then it start creating the pipeline okay so let's wait for the pipeline to be run so before while running the pipeline so let me also show you so i have already created my local agent if you see here i have my local agent so this is my local agent right which is actually sitting in my virtual machine i am actually executing all my test cases in my virtual machine if you see this is my virtual machine so that local agent is already available in virtual machine and this local agent is if you see here this is running up and running if you click on this local agent so this local agent is running so if you see here this local agent is online and if you see the jobs currently that local agent we are running one job on that particular local agent which means my virtual machine basically so now let me just go back to pipeline again okay so it's it's taking a bit time because my virtual machine is bit slow please bear with me but for sure you're gonna learn how i mean it's really very important session for everyone because not everyone knows this technology okay so if you see here it's running the job is running here okay so it's building okay so basically so once it starts uh test cases right a chrome browser should open and then it should execute my first test case login with valid user and then invalid user and then verify apparel instant shoe link and then also validate the shopping cart functionality okay so now so let's wait so it's basically publishing the artifacts and now it starts our test cases okay so once it is done it starts our test cases automation discretes now it triggers our automation test scripts okay so let's see right so it is basically taking all the tests see if you see my chrome browser is opened here okay it is going to enter the uh demo web shop url once it enters the demo absorption url it should execute valid user my system is very slow let's see what happens okay so it's entered the url once it enters the url it should log in now should click on login and then uh system is very slow sorry guys that's okay and then enter username and then password so i clicked on so i have entered wrong username password and then validated the error message now it should run the second test case now it should be at least fast now let's see so second test case is a successful login okay so now the successful login it should click on login enter your username and password valid oh this is also invalid okay this is also invalid let's see now there are two invalids here let me let me tell you again okay so it basically executes around six test cases okay the script has six test cases this is my successful login that is done and then i might have another successful unsuccessful login okay let me see this is again unsuccessful login now this time again it's gonna login with successful and then it's gonna validate our shopping cart functionality okay so it entered and then it's gonna click on a president shoe and then added shopping cart and then it's gonna validate in the shopping cart okay and then again now uh we'll be evaluating a link so this is our last test case okay that's it so the test case execution is done so now it's going to publish all the artifacts okay we'll wait and then let me show you the results okay even though this is not our main agenda of our thing of session okay but it's required for us okay hmm successful okay done so now see we have executed automation test scripts by using pipeline so what is the disadvantage so if you see my test results so this is my last build which is successful and if i want to see my test results i have to go to this navigation and then i click contest and if you see all six test cases is passed right so let me so if you see here see all my test cases are passed but but these test results are not visible to the higher management see because in if if in test plan if you are executing your manual test cases right you will have pass and fail criteria and then those can be pulled to your dashboard easily okay now because i have created my manual test cases and i have created my all dashboard templates to pull all the metrics in my dashboard so why should i need a different report called pipelines and why should i publish a different automation report because see see most of the clients so lot of clients ask this requirement okay as i'm already creating my dashboards right and i already have my manual test cases why do i need a different report as i already have my manual test cases and i'm generating the reports from my manual test cases right so then why can't we so these are my six manual test cases why can't i link these manual test cases to my these six automation test scripts so that whenever i run these test scripts the test results should get updated in my test plan for the corresponding manual test case and then i should have ready dashboard here because i already created my dashboard from my manual test cases right so why should i need to have extend reports value reports for automation test scripts why do you need i need to build a separate execution mechanism or separate execution reports for automation test scripts it's a redundancy so most of the clients they ask okay i have my manual test cases can you please link those manual test cases to your automation testers whenever you run the test scripts the corresponding manual test case should pass fail right so that is the requirement so here now i have built already my six different test cases and these are my corresponding automation scripts if you observe my first test case is login using spec flow valid user login that means here my valid user login login user as administrator right and the next test case is login with an invalid user login user as invalid so that means this is my feature this is my scenario right which i have automated and then add blue jeans to cart if i see i already have one test case validate shopping cart functionality by adding blue jeans okay this is my manual test case and this is my corresponding feature scenario here right this one and then validate apparent shoe link right this is my manual disk case and this is my corresponding test script right now how can i link these functions features to my manual test cases it's simple okay so see i'm explaining very high level okay so you have a lot of preconditions to achieve this particular task so i'm going to publish more videos uh in detail how to build from the scratch okay but for this session i'm explaining you on a high level okay so this is my valid user as administrator okay which is this one what is my test case id it's 276 so so for that right click on your feature file right right click on your test and then click on associate to test case so before i click on associate to test case i have already connected my solution explorer to azure devops if you see here i'm already connected to my azure devops here okay so that's the reason i can see my check-in functionality right all the check-in functionalities i can see here okay i already integrated i i already logged in um azure devops from i already linked my azure devops session in visual studio okay i'm going to explain how to do step by step in next videos okay right click on this click on associate to test cases so as soon as you if you can see here this particular test is already associated with 276 test case id if you see 276 test cases id if i want to associate a new test case you just need to enter your test case and click on add associate because this test case is already exist it's saying it's already exist okay and in the same way login user as invalid admin so this is my invalid 280. right click click on associate test case if you see my 280 test is also associated already and then what about at blue jeans right click associate test case so if i see 284 so this is my 284 and then the next test associate test case 286 so this is my 286 test case these are already associated right so i have associated if i click let me show you once you auto associate your automation scripts to your manual test cases if i right click and then click on edit test case and if you navigate to your associated automation tab for the manual test case i can see my automated test name if you observe this clearly it says bdd c-sharp if you see here bdd c sharp n unit right under that login feature this is my login feature file under login feature i have a function called login user as admin login user as administrator right in the same way if i go to shopping cart okay go to associated here if you see add to cart feature right this is the feature file under this feature the scenario called add blue jeans to cut add blue jeans to cut so that means we have associated automation test scripts for all these manual test cases okay so once you associate the test scripts all you need to do is you need to basically because you need to build your release as well okay this is very important to run your automation test scripts from test plans you have to create releases along with the pipeline pipeline i already created now i am creating releases if you see i have already created one release called execute picks flow test okay where i have one so basically i am i linked my build my build whatever i created pipeline right i have linked that pipeline to this particular pipeline as an artifact and then i created one task what is my job this is my task i'm basically created one stage one task where i'm actually calling visual studio test plan platform installer okay this is very important because we are running by using test plans right this visual studio test platform installer will contact with official new get package and it brings all the packages related which is helpful in running the automation test scripts from test plans okay i'm gonna explain in detail in further videos okay and also um i've created another task for test run visual visual studio test okay so this is my release okay this is why this is required so let me just go back to test plans now okay now i want to if you see these test cases are showing as fail okay now i want to run these four test cases login with valid users so one advantage here is see once you associate all the test cases to your test scripts you need not to run this entire project at once you need not to run the test cases correspond to corresponding to this entire project i can run whatever the test case i want to run okay so i want to run these four test cases out of these six test cases right so for that what i need to do you need to select the required manual test cases that you want to run and then click on run with options and here you need to select automated test using release stage that means i already created one release correct and all these manual test cases are associated with the corresponding script automation script and then click on run so as soon as you click on run it triggers the test scripts okay so you can just click on view test run so it basically takes you to the run test runs under azure devops okay so for now it is not required if i go to releases now if you can see one new release might have been triggered okay click on releases so as soon as you click on releases if you see okay let me go to releases if you see here one new release if you see has been kick started okay click on this new release 51 now this new release is running see if you see it picked up your pipeline and it is downloading artifacts it started these stage one task okay so it's basically it's building artifacts and then it's gonna start our test okay so we are gonna let's wait for some time see what are all our prerequisites to achieve this one is you need to have manual test cases defined you know in your test plan you need to have corresponding test scripts written in visual studio c sharp because see java is see whatever the functionality i'm talking java will not support all this functionality basically linking your automation to scripts your with your manual test cases okay so you need to have your automation test scripts ready for each manual test case and then you need to associate your automation test grips to your manual test cases and then you need to build your pipeline and then you need to build your releases okay so now a chrome browser should open because we we have we are running these four test cases right and also once the run is completed if you see here these all four showing as in progress okay once the run is completed if the test case is passed if the automation test script is passed the corresponding test case should be passed okay i think here it automation test started so it's executed first test case okay which is my invalid test case i think okay invalid user login test case click on login and then enter username password okay okay this is your valid username okay valid successful login and now it's unsuccessful login the second test case manual test case is unsuccessful login right so it's going to execute our unsuccessful login right it's unsuccessful what is my next manual test case it's adding blue jeans to cart now login okay apparently shoe and then it's gonna add to the card and then it's going to validate the card done and what is my next one is up relationship page link validation just log in and then validate the appearance and shoe link okay [Music] that's it so it completed run so let's go to release again okay let me open a new window so if you go to see your releases your release should be successful if you see it's still running okay so basically it's publishing the artifacts etc etc okay anyway so if i go back to test plan right now if i refresh this all my test cases should pass correct let me refresh this okay i refreshed it if you see here if you see my first test case is pass second is pass third is pass fourth is passed right we run only these four test cases i never run this six that's why it's showing in progress but the status of these test cases got successful that means i have executed part of my manual test cases directly from test plan right so it's really really helpful feature guys okay so if you have any questions okay just leave comments in the comment box i'll be replying to each and every query okay so next i'm gonna explain how did we achieve this from scratch okay i'll start creating manual test cases and then i'm gonna start creating automation test scripts for each manual test case and then how can we integrate your man automation test scripts with your azure devops and then how to build releases and then how can we run uh your automation test scripts from test plans okay so i'm gonna publish around four to five additional videos by explaining in detail okay by building the framework and everything okay hope you all understand the concepts okay please do subscribe to the channel click on bell icon thank you [Music] [Music] you
Info
Channel: Ravikanth FicusRoot - Tech Videos
Views: 20,930
Rating: undefined out of 5
Keywords: Azure DevOps, Azure DevOps Boards, Azure DevOps Backlogs, Azure DevOps Work Items, Azure DevOps Sprints, Azure DevOps Project Configurations, Azure DevOps Test Management, Sprint Taskboard, Azure DevOps Dashboards, Dashboards, Charts, Azure DevOps Widgets, Azure DevOps Training, Selenium, Automation, Test Plans, Azure Test Plans
Id: 55Yb7us6St0
Channel Id: undefined
Length: 40min 42sec (2442 seconds)
Published: Mon Jan 24 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.