1. Home
  2. OpKey Help
  3. 10. Working with Coded Function Library

10. Working with Coded Function Library

Overview

The Coded Function Library is an advanced feature of OpKey Web. Coded Function editor provides you a platform where you can write your own function code of tasks to be performed in test automation. Once, they are written in Java, you can compile Java codes and debug easily. You can execute your Coded Function directly or map them with Test Case and execute them. In addition, Coded Function works as an One Stop Solution for creating Custom Keywords in OpKey as you can write your Custom Keyword specific code in Java, compile it to fix code errors, associate required libraries, import pre-built libraries and execute it. Furthermore, this code can directly be called and used in a Test Case or a Function Library and get Executed.

Need of Coded Function Library

OpKey users sometimes needed a platform where they could write their own code for actions (to be performed during test automation) which could be integrated with other OpKey artifacts. Coded Function Library feature fulfilled all those needs by providing a code editor platform. It allows you to write your own action code in Java, compile it, import pre-built libraries, execute it or map with Test Case. It works as one stop platform for writing function codes for task to be performed, compiling written code, making jar file and using jar file in Custom keyword creation. Now, you will not require Eclipse or any other Java code editor for writing your code, making its jar and using it within your Custom Keywords. You can also import your pre-built libraries at Coded Function Library and compile it. Once, your written code is compiled successfully, you can execute it on your machine by using OpKey Agent.

For creating Custom keywords in OpKey, you were required to follow the steps mentioned below:

  1. Write the specific code and save it in .jar file.
  2. Upload the .jar file in OpKey and map it with the associated method.
  3. Create and Add a custom Keyword for it.
  4. Call it in a Test Case or a Function Library(FL).
  5. Execute it.

To skip all the steps above, here arises the need of Coded Function Library. One of the major advantage of Coded Function Library over Custom Keyword is that it can be mapped with a number of Function Libraries & Test Cases and modified frequently as per the requirement.

Articles

Was this article helpful to you? Yes 1 No