Automated Function Library

A function library is a component designed for reusability, capable of being utilized across various test cases. For instance, one can establish a function library specifically for the login functionality and subsequently invoke it in different test cases.

We can create a function library in three different ways :-

In this article, we will discuss about Automated function library:-

The Automated function library streamlines the function library creation process by eliminating the need to manually write steps, a common practice in the case of manual function libraries. Instead, users can create the test case (function library) using either of two methods:

  1. Opkey Recorder Utilization:

  2. You can choose the Opkey recorder, where you can opt for various recording modes. This feature simplifies the process, allowing the tool to capture and generate steps based on user interactions, significantly reducing the manual effort involved in creating a function library.


  3. Incorporating Keywords, Functional Library, and Service Repository:

  4. Alternatively, users can build the test case (function library) by incorporating keywords, functional library components, and services repository. This approach provides a flexible and modular way to construct automated function libraries, offering users the ability to assemble test cases with pre-defined elements, enhancing reusability and efficiency.



Let's understand how to create an Automated function library by both methods :-



1. By using Opkey Recorder - 


To create a new function library in Opkey Web, follow these steps:-


Start by logging in to your Opkey Web account.

Once you're logged in, navigate to the "Project Workspace" folder. Right-click on the Project Workspace folder and select the function library option to create an automated function library

 

Rename the function library and click on the automated function library. A blank window will appear.

Now, begin recording the test steps by clicking the Recorder button. .  



Select Web Recorder from the available options.




On the pop-up window, select the Object Repository, select Browser, and start Recording. 


 

A recorder window will open along with the browser window. Add the desired URL to begin performing steps. 

 

 

 

Perform steps on the browser. 

  

Once done, click on the Save and Close icon. 




Your recorded steps will be saved in the test case. 

Now you will be directed to your recorded test steps.

Click on the save icon and save the step if you dont want to enhance it further.


 

 

Click the Run button to execute the test case. 


 

 

Enter details of Session Name, Build Name, Execution Agent, and Plugin on the pop-up window of Local Execution Wizard. Click on Finish. 


 

 

 The test steps will start executing and later you can view its result in the Execution Result section. 


 

 

Now you have successfully created and executed an automated function library. 


2. By using Keywords 



To create a new function library in Opkey Web, follow these steps:-


Start by logging in to your Opkey Web account.

Once you're logged in, navigate to the "Project Workspace" folder. Right-click on the Project Workspace folder and select the function library option to create an automated function library

 

Rename the function library and click on the automated function library. A blank window will appear.

Now Click on the "+" icon to add a test step and choose the keywords option.






The frequency used button helps in selecting the keywords that are used often.


Now you can add steps by using the keywords and providing input and output data.



There are many icons available on the screen such as an icon to refresh , to create backup, to add more settings, to add tags and to rearrange steps.



When you want to add the steps to the function library you can use the flowcharts view. 




Here you have to provide input and output data and look at the details of the step.



Once you have finalized your test steps. Click on the save button.


Now let's understand how to use this function library in a test case.



Calling the function library in the test case 



Create a test case.

Click on the "+" icon to add a test step and then select the function library option.

After this select or search for your automated function library.




Once you click on the desired function library, your function library will be added as a test step within your test case.



Finally, you can save and execute your test case.




Now you have successfully learned how to create an automated function library!


Explore more Opkey features by clicking Here. 


To learn more about the function library feature and its capabilities,  visit https://university.opkeylms.com and enroll in our Opkey series course.











Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article