so let us go to the next topic and now we are going to learn in this session about https test script recorder in jmeter and i am going to go very basic and from scratch i will teach you step by step how do you use the test script recorder in geometer so we will answer the following questions what exactly is the test script recorder why do we need it when should we use it and how exactly we can use the test script recorder so the test script recorder in jmeter is a element that helps us to record our requests from the browser so let us see so it can be any http request let us see here i have my j meter and i can use the same test plan that i have been using or let me create a new test plan and before i do that uh let me also show you the things we are going to learn here so we are going to learn how to record your test on jmeter how to add and use test script recorder how to add and use the recording controller how to use proxy on firefox chrome browsers and also on your system whether you are using windows or mac operating system i will show you how you can add the ssl certificate how to do request filtering and then how you can do the use the recording template so before that i will go to my gmeter and i have created a new test plan i will do a right click and say add and i will go to non test elements and here we have a option for https test script recorder so i will add this here and it is added here i will also add a thread group in my test plan and inside the thread group i will take this up and inside the thread group now i am going to add a logic controller which is a recording controller so here we have a recording controller now what is this and why do we need it let us say i go to some website i am going to my website lifecharger.org and here i will go to the home page and i will record all the actions and all the events from here i will go to the archives page and i will go to the about page and i want to store all these events from every page separately so therefore we need a recording controller i can add multiple recording controllers per page or categorize my recording into different recording controllers and i will show you that in a moment so now we know what is https test script recorder it is a element in jmeter that helps us to record our http request so instead of manually adding your request in a http sampler you can very quickly do a recording and everything will get added now why do we use it we need these kind of a recorder so that we do not have to manually add every request in our j meter we can just browse and do the actions and everything will get recorded so it will save a lot of time it will be efficient and powerful therefore we need these kind of option and function to do the recording and whenever you want to record your http actions like uh your website or browser you can use this and now for how to use it we are going to see it here so let me bring it down this is how we are going to see the https test script recorder so i have added the test script recorder and the recording controller now i want to store the requests or the events from these three pages that is home page archives page and about separately so i will add three recording controllers i will again go to the thread group do a right click and say logic controller and say recording controller i can also just copy this i will select and press ctrl c or command c if you are on mac and then go to the thread group and say control v it will copy the element here now the first recording controller i will name it as home the second one i will name it as archive and this is optional it is only to store my requests and events from different pages separately if you do not want to do that you can still continue without a recording controller and then i will say this one is the about page now this is my test script recorder and here you will see we can give it any name by default it is https test script recorder then here we have an option to give a port you can give any port by default it is 8888 and you can select your domains if you wish to the https domains and here we have to select the target controller so if i see here we have these controllers home archive and about i will first select home so all my recording from my home page should go into this home recording controller and then we have option for grouping do you want to group samplers or not group all these options are here i will keep it as it is default here then we have option capture headers add assertions regex matching all this you can do for now i will keep everything as it is now the other thing is you can also do request filtering so here if you go to request filtering you will see that if you want to exclude some url patterns because when you hit any server there are lot of resources that get exchanged and if you want that some resources or some patterns should not be included in the request you can add them here if you want to include some patterns you can add them here i will show you a template and then it will be very clear to you as of now i will keep it as it is and go back to the test plan creation now here we have already added the test script recorder we have also added the recording controller now we want to see how to use proxy on your browser on and your system so if you see here we have a port 8888 and we want that all the traffic from a particular website or a particular http network should only be recorded and not anything else and therefore we set up a port here and in our browser we can set up a proxy for this particular port now let me show you on firefox and chrome both let us say if you are on chrome i will open chrome browser and you can go to these three dots here on your chrome and you can go to settings and here if you search for proxy here we have open your computer's proxy settings it will actually open your system's proxy settings now because i'm on windows it is opening this one if i am on mac you can see here it will go and open the system proxy on mac let me show you quickly this is for mac users i will go to network and then i will go to advanced and here i will go to proxies and here you can set the proxy so you can set a web proxy and set the server and the port here so this is for mac and if you're on windows you can just go to the manual proxy setup and this window can also come if you just search for proxy on windows it will open the proxy settings from here so now here you can say manual proxy setup and say user proxy server and here you can say localhost and the port number so this will be done at a system level and then you can use proxy and use the same port as you have used on jmeter for now i will switch it off and then after you have set up the proxy you also need to add a certificate so if you search for certificate you can go to the security and scroll down you will see manage certificates here and here you will have to import a certificate from jmeter's bin folder so if you go to your jmeter wherever your jmeter folder is and go to the bin folder you will see a certificate apache jmeter temporary root ca dot crt and this certificate needs to be added on the browser so you can say next browse and add the certificate and this is for chrome now coming to firefox let us say you want to do recording from firefox again you will go to these three dots here and go to the options so we have options here now i will again search for proxy and here we have the proxy settings and here you can see it is as of now use system proxy settings or it may be on no proxy but now i will say manual proxy here and then give the server which is localhost because i am doing it from my system itself and the port is 8888 now sometimes the port that we are using on jmeter uh may not be available or as busy then in that case you can always use any other port like 8181 but it has to be same on jmeter and browser both and i have also checked this also use this proxy for ftp and https and i will say okay now i have already set it for firefox and i will use firefox i have already shown you if you want to do at a system level then how you can do it so this is how we can do proxy setup and for ssl on chrome i have shown for firefox if you want to add the certificate you can just search for certificate here and then here go to view certificates and then here i will click on import and go to jmeter spin folder and this is the certificate we want to add so i will just add it for websites and say ok and you can now see it is added here and we have done this step as well to add the ssl certificate and now we will see how to start our recording so now if i use jmeter if i go to the browser that is my firefox we have i have done the settings and i go to this website livecharger.org as of now it is not going but when i do a start from jmeter i will click on start here and it is saying that you should be adding the certificate which we have already done i will say ok and now here we have got a transaction controller you can give the transaction name here and you can also select what is the prefix you want so i will say home because i want to do a testing on the home page and do recording there and now if i go back to my browser and go to livecharger.org you can see now it is coming here and i will go to home and you will see all these actions i am doing will be getting recorded in my j meter so if i open my j meter and open the home recording controller you can see everything is getting recorded here all the samplers are coming here now we have not done any request filtering therefore we are getting so many samplers but i will show you how to do request filtering and when it is done you can click on stop and now i will again go to the test script recorder this time i will select the target controller to be archived and i will say start again and say ok and here i can give a prefix let me say archive and now i will go to my archive page and it has gone here if i go to my jmeter i will click on stop here i will go back to my geometer and you can see all this has come here and the prefix you can see with every sampler we have a prefix called archive and then similarly i will go again to my http test script recorder click on start and here i will say about and again go to my browser and go to the about page and i can do more actions whatever i want to do here i can do everything here and then i will say stop and if i go to my j meter i think it did not record let me try this again okay it got recorded in archive that was a mistake i did not change it here so that was my mistake let me change from here about and now let me start and here or i can do one more thing let me stop this if i go to my archives there are these are the samplers with the prefix about that got recorded for the about page and i can just drag and drop it inside the about recording controller and it is done so i have got this now i can also add a listener let us say i will add a listener view results tree and i will add one more listener view results in table and then in the thread group i can give some user load whatever i want to and then i can start test it is asking me if you want to save let me say yes and i will name this jmx file as recording demo one and say save and now you can see it has started execution and it is now running all our samplers and if i see in the view results in table you can see all this is coming here so we have done and we have learned how to record your test on jmeter now we need to see how to use recording templates now if you see here in this particular test plan we created everything from scratch we created a new test plan and added the test script recorder added the recording controllers and everything but in geometer we have some templates you can go here to file and go to templates or you can see there is a template option or an icon here if i go here to template and the template window opens i will scroll down and we have a recording template and recording with think time the difference here is if you select recording with think time it will create a test plan along with some random timers that will have some random delay between requests that will mimic the actual real-world scenarios like real users testing the applications with some think time in between or some delay in between a random delay between requests i will select recording with think time and then you can also read some documentation here and go to the links i will say create and you can see here we have got a test plan created and we have got all these elements added we have got a thread group along with a recording controller we have got our test script recorder and now this time if you go to request filtering you can see all these are already added so these are some common patterns that you want to exclude when you are recording from a url or from any http resource so you can always add these things and this is a ready test plan that you can use for doing your recording with j meter and this is how you can do recording with j meter i hope this was very useful for you thank you for watching you