 Hey, good morning all. So I'm today going to present on the robot framework extension site and My name is Sujit Agathwani. I have an 10 years of experience in software development and automation with different domains. I mostly work with the embedded storage systems and data domain also. So robot framework is a generic framework. Robot framework is a generic test automation framework used for the test automation and robotic process automation. This is highly portable, independent of operating system and applications. The syntax of the robot framework is like an English statement like so it's very easily readable and it's very easy to start to work on. The robot framework is basically developed in the Python. This is the main positive side is this is open source. It is released on the license 2.0. So there is a no cost of using it. This is extensible such as we can integrate with the latest tools and that makes it powerful and flexible. It has a rich ecosystem and active community to support. This is the basic architecture of robot framework. Data is the test data, test suits. What we use to write the test scripts for the test automations. So that all inputs and configurations are part of the test data. The robot framework utilizes this test data to execute the target under target system for the testing. And the test data interfaces with the target target system using the library interfaces. My slideshow is not working just to reopen it again. The test suits of the robot frameworks are the tabular like sections and it is a tabular like format and it is divided into major sections. These sections are syntactically denote within the three as check marks. So let's look at the what sections these are. The setting sections, variable section, test case sections and keyword section. And this dot represent the statements which we will see in the coming examples. So let's moving through the setting section. Setting sections, settings are available in the setting section. So mostly the setting section includes the place the role for importing the libraries, importing the resources, variables. So it has a documentation. We can import the metadata configs. We can see the suit setups and suit tear downs and the tags for the discuss and so on. Next one is the test case sections. In the test case sections, we use these sections for the typical test verification purpose. And we can write the multiple test case under the one test case sections. So the labels available in these sections are optional and those are documentation tags. Tags are used as a marker for the test executions. Setups, through setups, we can define what exactly to be set up prior startup test. Then there will be the test sets which we use using the keywords and tear downs are also there. Templates can be used in the test case sections. And timeout some test cases are limited using the timeout by setting the timeout parameters. Keyword sections are similar to the test case sections. Here the keywords we can do the analogy as I know methods. So in the methods, the way we achieve one functionality in the keywords, we define the specific steps to get covered up. The labels available in these sections are similar to the test case section except the return. The return is not available in the test case sections. As methods returns the value, it has the return keyword label. Similarly, we have a tear down sign timeout as we have the options with the test cases. I mean the variable sections. The variable section, like in other languages, Robert Frameback supports the variables and we can handle the Python list like variables or Dictlect variables or the standard environment variables using these variable sections. So this is not compulsory. We can define the variables inside the test case and the keyword sections also, but common variables we can be used to define with the variable section. Moving ahead, though the Robert Frameback is the keyword driven framework, it supports the different types of test case styles like keyword driven, data driven and behavior driven. So we can use one application, one test case. We can create our test case as per our need in the different test case style. So this is an example of keyword driven. This is an example of the keyword driven test case. Here, whatever is marked in green are the keywords. In the keywords, the keywords are the like and functions. But here we can define the keywords with the space separator format. So open browser to login page is a single keyword. Similarly, this test case is for validation of the login where the keyword is used. One keyword is open browser to login page keyword is used for opening the browser. Then input username will enter the text into the input username field and similarly the password field. Then submit button click is handled with the submit credential keyword and validation part will get handled here with the welcome page should be open keyword. And at the end of the test case execution, we need to close the browser. So we have defined the closed browser with the teardown as like another test engines. Teardown will always get executed independent of pass or failure of the test case. Here, second example of our data driven test case style. Here we can the inputs getting vary with respect to the test templates. This example is taken for the data ribbon which data is vary on the valid and invalid username and password combination. Behavior and test case. The given been and then labels plays the role and the key words are browsing open browser is open to the login page. Then when the user username the demo login in which password is moved here we are passing is Anna data. And here in the behavior driven we passed it as an a part of the keyword. And this is a validation where then then welcome page should be open. So I will demonstrate the same example using the using the same example. Just so this is the same example which we have seen in the PPD that which opening the browsers input user name and password then submit the credentials and then validate the steps and close the browser. So all these here we don't have a keyword section. So keywords are present in the resource and this resource is defined in the imported using the in the setting section. This is an example of data driven test case where we are using the template test template this. So on this test template all the data is getting executed with this combination of the data. And we have defined the keyword section over here for defining the test template. This is the behavior driven test case that we just saw here we can see these keywords are defined in the keyword section over here. And this variable is passed as a part of the keyword in the behavior driven test case. So if you can see my login test is my test suit and I'm executing I will show how to run the test test suit on a test case. So this we can just simply define the robot and the test suit name that even works but I'm just using the extra parameters hyphen L as a debug the default debug level is info. But I just show the some more informations during the exhibition I'm using the debug mode. And as you see my project directory I've created a separate directory for the logs the logs will get loaded. If you don't define the directory the test reports will get the output reports will get executed created in the current path. So to do not so that it will not mess up my project structure and separating it with the log directory. So after the executions these are the output output reports get generated in the XML log HTML and the report HTML format. The test case files we have an option to define the test case file either in the robot extension or with the extension. And we can use it also support the two type of syntax I have used the spaced based syntax or we can separate the keywords and parameters using the pipe this syntax also. Now just let's look into the this is a log output HTML where it shows the execution log of the test case. So as we have this is a data driven test case which is operated on the template and this is input data. So here in the log we have an options of info and debug variations. So by viewing for the log we can skip the debug logs if you want to go into details during the failures we can select the debug logs but default log level for this framework is the info. And here we have a report report section. It gives us summary reports of the overall execution. If you can see there are the options by default robot framework treated it as an critic critical test cases. So until and unless I have I didn't define it these are the critical test cases. I said earlier in the table on table explanation that we can define the tags I didn't define any tags as if I define the tag I will get the test execution by the tags report for these tags that mean test cases this total test cases exhibited past and failure reports. One more thing that if the if any of the test case get failed then this background automatically turn into the red color. And it can be configurable also. So that's that's all for the introduction of the remote number. Moving back to this. So I am I am pretty much covered this all that test cases styles and extensions and test reports and log and high level keywords into this. Yeah, one more thing is simple high level and low level keywords. So let's take an example of this resource file has an a high level keywords which got used during the test case. But this high level keywords are developed using the Selenium library, which is the low level interface library available for the report framework interface. So if you can see that means we can create our own keywords using the low level available keywords. So libraries are the so libraries are the backbone of the robot framework. The same robot framework libraries are we can divide the robot framework libraries into the three types because they provide the actual testing capabilities to the framework. So some of the libraries are available with the robot framework itself that those are known as the standard libraries and like in a building libraries. Building libraries are we don't need to import this libraries into our code. This is by default added as libraries for the rest of the libraries. We need to use our settings sections to import this dialogue libraries are for creating the interactive using interactive or semi automatic test execution using the dialogue libraries. XML libraries provide the flexibility over the XML operations. OS library for supports the OS task process library for the multiprocessing string for handling the string date times remote libraries screenshot library. Most of the applications utilizes this screenshot libraries for taking the screenshot at the certain verification for the connectivity. We have an Internet libraries and to handle the variables like the least we have a collection library. So these are the default library but as a community is very active. We can see the multiple exclusive set of library supported by the community. We need to install those libraries into the packages but in what happened in the practical word the products are ranging from different domain to the from one domain to different domain. That's an example of financial domain having the banking insurance then manufacturing domain which use the industrial 4.2 zero standard or smart manufacturing. There are iot products then automatic products are there in markets cloud and services are there application domain we have a back end front end full stack applications and right iOS applications and you can keep counting the variety of the product we have in market. So to look into the project for the automation we have the challenges to use this library and that's the string that we have a exclusive set of library available and we can extend the library further. So let's let's take the sneak into how the whole design is. So this is a test data which I show in the high level language high level architecture of the robotic framework. So test data mostly consists of testing pools and test scripts and expected results. As I said device emulation is the optional one as I said automate you. Let's take an example of the automatic domain where actual devices are not available. So to those devices getting emulated through the to set the typical values through the configuration. So such configurations are needed while the automating those tests test environment. Configuration files so configuration files are like a common common settings needed for the test source as well as the system and the test. Let's take an example of my current project which is OCS that is open ship content platform. The open shift is the product which is supported on the multiple platforms varying from the cloud to the virtuals to the bare metals. So the test suite for the open shift test suits is a big same state school test suite is applicable on all the platform and some typical test cases are applicable on the depends on the platform specific. So those configuration needs to be set depend on what which is which is the platform under test. So this test data get utilized by the robot framework to test the system under test using this interface library. And what there is a what is the challenge that what all the features which is all the interfaces needed for our system under test is not may not may or may not be available with the standard library or with the available external libraries. So let's have a look into the libraries what are the variables and how we can extend the libraries to achieve the solution automation solution for our specific project. So I just take a random examples for the external library over here just to understand the or just to give the introductions of the existing exclusive library sets. So app in the library which can be used for the big testing on iOS and Android test then we have a databases libraries varies from the MongoDB Oracle and SQL databases. Nowadays with the Kafka elastic stock elastic search and images image processing is getting used so to handle the interfaces of automation of such. Product involving this we have an a these libraries then to handing the data. Data under test we have an a Panda libraries Excel libraries open PYS libraries. Calculator libraries CSV libraries open PY Excel libraries for the storage is so we have an interface HDFS interface available. Kubernetes is the most common service available in the most of the most of the products. So Kubernetes is a cubely will help in for the interface of such a product set for Kubernetes interface AWS cloud is again widely used so we can automate the test using that AWS AWS library. The protocols like MQTT rabbit MQ serial. We'll get to handle to the protocol interfacing libraries which are also readily available. They have application HTTP and salient and for the rest API related API testing automations we have the request libraries and so many. Again we have the Jenkins and a notification libraries which is widely used for the integration and for the test automation solution. So what means by this integration is means this solution we can extend further by adding some adapters on it. So like that case case is pure case case. So it is data can be purely used by the robot framework and can be taste you can the system can be taste using the library. However, to input the test we can make the flexibility of some CLI utility or the graphical user user interface as if needed for the projects. Again, most of the projects are using. Jira's for updating the test outputs so we can add the external interface adapter for updating the notification after the execution of the test cases and updating the test outputs into the databases which in turns can be used for the. Updatertions of the different tracking tools like a Polarians and Jira's and Godzilla's. So let's move to the main core of the today's sessions that is the how to extend the robot framework. By customizing it or by extending the existing robot framework. So I am using we can develop. Most of the products are available either in the Python interface or Python core or Java core or if it is not available. It's in the other library as this framework is based on Python. We can extend those using the remote interfaces. But today I'm checking the one example of Python library code. This is I'm taking the example of the Azure platform and I'm taking the simple taste there for my OpenShift cluster after the deployment six nodes, six VMs will get up. I have created a library using the existing Python core which is not this is the Python core which I'm using. And I'm just demonstrating the basic functionality to understand and the taste that I'm covering is like after the deployment six nodes six VMs are created or not in OpenShift cluster. There are three worker nodes and three master nodes after the deployment. So I have written the one test case around it for the verification. And the after the deployment all the cluster should be in the running state. So I just create one random solution random test example to understand how easily we can extend the existing Python core into the robot framework interface. Mostly the syntactical way of defining the Python file and the class name should be same if it's different, then we need to explicitly define the class name in our import section. And if it is not then just importing the file will sufficient to create the instance of our class. This is one of the most important statement while creating the robot interface library is this defines the scope of the scope of this instance whether it should be for the taste case for the taste suit or we can use it that instance can persist for the global exhibition. So for now I just have a one test suit. So even if I define it's global this is to make the connection. I guess now it is visible. We need to define the versions for the library as is changing. We can use this for the ablation. And what basically I'm covering with this is just to create the credential complete client and resource client to create the complete client and resource client. We need the credentials to connect with the other Azure cluster. So this the connections are made using these parameters. So these are the optional parameters which can be which we can pass for now to keep the secret for my company company secret. I have make it available in the secret file and I'm updating it from there. So this is my credential which is just checking whether it is already defined or not and it's getting updated from the file. The load service attribute date is using that file to get the JSON drill and populate the required parameters into the spirit. Now to create the complete client handle and using the I have imported the library over here. Complete management and resource management client which is the easily available Azure Python code library. So to create the complete plan I'm just simply passing the credentials and the subscription ID which is which is as per the as per the as per the definition of this base as utility. Similarly, I have developed the resource client resource client is using the resource management client which is again the base as a utility and now this will act as a low level keepers for then I'm using it from the robot framework. And these are the application keywords for my library, which is a gate VM instance. So before using the gate VM instance, we need we need the name of the VMs. So this function will help to get the name of the VMs. Here it use the computer client. Again, this is Azure core Python and using to get the VM list. So this basically nothing but a wrapper on the existing as existing Python core available for the Azure. Similarly, I have taken a demonstration of one more power status. So there we are using gate VM power status keyword to get to face the status of the VMs. So that gate VM names gives me the VM name list and the gate power status will return me the power state of the VM. So these are the simple keywords which which is implemented and this is acting like like an extended custom library for robot framework. So I'm just quickly moving towards the demonstration. Here is an example where I write the smallest case verify the total minimum virtual machine count where gate VM is getting used and it returns the list. And we are checking the length should be six as I said the open ship cluster have the six VMs. Similarly here I'm just checking the VM list for the name which matches with the master and which matches with the worker and I'm getting that count and validating it across the whether that workers worker VMs are number of count is three or not. And this is for the checking verification for the power status. I'm just wrapping up as I'm just executing it and we'll show the reports. My library is in the live folder and my test cases are in this. Manage folder. So I'm executing this. As your cluster verification test case. Hi, I just wanted to mention that we have a five minute mark so. Yes, and this that's why I'm trying to wrap me up. Yes. Yeah, so this is the last one that the test case which executed intentionally and make it fail to show how it will get captured the details. So you can see there are four total test cases out of which three got passed when what they now we are open for the question. This is this is that's all for the how we can create the custom library using the existing core Python. So should we move to Q&A and correctly. Yeah, there is one question. I think it refers to your use of the terminal. Yeah, actually I have created it using the sudoer and my login is my own user. So the log directory when I create a project, the log directory has no permissions. That's why I did the CH mode. There is no need of 777 but just for the WShop. I just given 777 nothing else. And for the robot framework, the community is very good documentation is very good. We can just go for the documentations to extend the libraries. I intentionally take the small examples to cover up it in a easy way for the beginners as well as the experts. We are now open for the questions. I just only one question. Yeah, there don't seem to be any more. Yeah, another question. Is your example available somewhere? Yeah, the first example which I took is available on the robot framework site itself. This is a robot site. Here is the well known documentations. I show the standard libraries also available here and standard libraries and external libraries. And here is a documentation link for how to create it. And in the demo sections, I take the first example from the demo section itself.