[Music] hello and welcome to this session on soap UI beginner tutorial and today we are going to start creating our first soap UI project so in this session we are going to go very basic step-by-step and we will learn how to create a soap API testing project how do we add WSDL how to create test suite and test cases how do we add assertions in our test cases and then we will see how can we run our test step test case and test suite we will also see how can we run our test cases in sequence and in talent and towards the end we will also see how to create API documentation so this is going to be very easy and very fun and I will suggest that you can do hands-on along with me so let's get started and let me open soap UI so we have our soap ui open here and we have already seen about the GUI and all the options in the last session so now we can directly start creating a project so if you go to file here we have an option to create a new soap project or you can also click this soap icon here and it will also create a soap project so I will click here and you can see in this window it is asking for a project name and it is asking for an initial WSDL now WSDL is basically an XML document that contains all the details about the web service and all the API requests that is there in the web service so if you get the WTS a WSDL document it can actually pass and create all the epa requests for you so let us see an example let me go to my browser and let me google and I can say sample The Bluest TL so it will give me some sample W STL's that I can use and in case you are completely new to API and EPA testing I have a separate series on Web Services beginner tutorial where I have explained everything about what is web service water soap web services what is rest and WSDL and all other related terminology so you can watch that now here I have to take a sample WSDL so let me search for like a country tableau STL yeah so see we have this web service which returns a list of continents ordered by name let us use this web service and here is its WSDL so I will just copy this URL from here and go back to so py and just give it here in the initial WSDL field and you can see it has already taken the project name and I will check create requests create sample request for all operations and leave the other options as it is and click on OK so you can see it has actually passed the WSDL and it has created all the API calls or requests here so you can we have all these API is here in this web services like capital city to find out the capital of a country to find out the currency of a country and so on so let us see let me maximize my so py and if I just expand this first API call which is capital city and go to requests you can see here you have to give in the request you have to give the country iso code okay so to get the country iso code let me check there must be some call where we can get the country iso code yes there is this a country iso code here ok so this is the request where if we give the country name in the response we will get the iso name so let us try this if I say this is India and click on run it is saying no country found by that name maybe I have given everything in caps let me try India with just I capital and run it again and yes this time I have got the iso code which is i n so similarly i can get for like if i say USA let me check if it will get it is not getting so let me search for some other APA that will give me information for all the countries so we have this full country info let me check this okay here again we have to give an ISO code and then we have so let me check this API list of countries by code if I run this yes so this is giving me the country name and its ISO code and this is only four continents and let me check this list of country names by code and if I run this one yes it is giving me the country name and its ISO code so this one is giving us all the details about the country name and its ISO code so for United States the ISO code is us so if I go back here and say US and run this it's still not found okay I have to give United States and run it and yes now I am getting it alright similarly we can get currency we can get capital and so on let me close all these so here now we have our all our API is let me just delete this extra WSDL okay so here we have our all our API requests and we have our project now what we have to do is we have to start creating our test suit and test cases so for that what we can do is you can just right click on this Vistal and here we have the option to generate test suite so let us click here and here you will get a window again we is asking for style one test case for each operation or single test case with one request for each operation so let me just keep it as it is and create new MP request you can also select the APS that you want to put into the test suite so for now I will keep it as it is and let us say okay here it is asking to give a test with name you can give any name I will just say this is test suite one and say okay and you can see it has created the test suite here so let me minimize this and just go to our test suite and you can see it has actually created one test case for every request okay now what we can do is here let me just open the capital city test case and the capital city request and here I can just give the ISO code and hit the Run button and it is giving me the response so it is giving me the capital of India as New Delhi here okay which is correct now as of now we are just running a request it is not actually a test it is just running a request and getting the response but it is not a test because we are not doing any validation we are not putting any assertion here so for that what you will do is you can see this assertions here at the bottom click here and then you have to click on this plus icon to add a new assertion I will click here and here we have all different types of assertions that we can add so for now I will just use the very common contains a session which searches for the existence of a string token in the property value supports regular expressions so here I can give anything so I will say search for New Delhi in the response and I say ok and you can see now it has turned green because our accession passed and also in case you have note this also turned into green earlier it was great because we were just running it we were not validating anything but now it will turn green or that in case the session fails so just in just for example if it fails I am giving New Delhi one which is not existing and I say okay you can see it turns red and here the icon for the request also turns red okay so this is how you can add a session let me change it back to New Delhi and yes okay and before you go further let us save our project so you can click on this save all and you can say yes and wherever you want you can save your project so I will go to my desktop I will go to my onedrive and I will go to projects so peer projects so there is something already there let me just say this is one and save it so now we have saved our project as well and similarly now you can keep on creating new requests and adding assertions and that will create the actual tests now we have also learned how to add a sessions now we will see how to run tests step test cases and test suite now in case you want to run a particular test step so here you can see the hierarchy the very first element is project then we have test suite then we have test case and inside test case we have the test step so this request is our test step we can just go to this particular request and run it which is running the test step we can also go to the test case level and just run it from here so it will run all the requests inside the test case so for now we just have a single request and then you can also go to test suite level and then run it from here so in this case you can see it runs all the test cases inside the test suite now how to run in sequence and parallel so you can see as of now we ran our test cases in sequence so if I run it again you can see it is running one by one okay this is in sequence and here is the option if you click here this icon the selected test cases are run in sequence but if you click here the selected test cases are run in parallel so I will click this one and now you can see when I click on the Run button everything will be run in parallel all the test cases will run in parallel let me click here and you can see everything got completed everything ran in parallel and it got completed okay and just say in case we have any error or any assertion fails for example let me just fill this accession I say ok and when I go to test suite and run it you can see this particular test case failed and therefore it is showing the complete test suite has failed so in case there is any single failure inside any test case the entire test suit will be considered as failed and similar goes for test case in case when you are running a test case and any requests inside a test case fails again that test case will be considered as fail now here we have added all the tests all the requests in a separate test case which might not be a very ideal scenario when we work with practical projects so what I'm going to do is I'm going to again do a right click on the Vistal service and I will say generate test suite and Here I am going to select the option single test case with one request for each operation and I will say ok and I will say this is test suite 2 and say okay let me close all of this and let me minimize everything and just go to test suite - and now you can see it has a single test case which has all the requests or all the API calls so this is how easy it can be now also let us see how can we create our API documentation so if you right click on this Vistal service right click here here you have an option to generate documentation so click here and it is asking to give the location for the folder let me just select desktop and say open and say ok so you can see it has actually created a documentation and this is an HTML file and you can see it has created a very good-looking documentation for all the api's that were present in the web service you can click on the detail and it will take you to the that particular API what's the description what is the style what are the input parameters what are the output parameters so this is very handy very useful if you want to provide a documentation to somebody you can just create this kind of a documentation and then you can send it over so it gives a very neat and clean looking document which lists out all the api's and their details and of course if you go to the location so I created it on here on my desktop so you can see this is the HTML so if I click here I will get the same document so coming back to our our project so here in this session we have created a very simple project so we have just started creating our projects there is a lot of things that we will learn in the coming sessions we will also learn how to do Ruby scripting how to run test cases and test steps through code and a lot of other things also one thing that you can see is if you right-click on this the still service here is an option to update definition so whenever there is any change at the back end or any change in this Vistal or web service or any ap a call from the backend you can just click this update definition and it will get all the changes so just say ok and it will just take all the changes and it will be it will update all the API is all the calls accordingly so this is going to be very handy we will learn more on this in the coming sessions so today we learnt how to create a sope API project how to add WSDL how to create test suite test cases how to add a sessions we also learned how can we run tests step test case and test suite how can we run the test cases in sequence and in parallel and how to create API documentation I hope this session was very useful for you I will meet you in the next episode of so Qi thank you for watching [Music] you