One of the basic advantage in Automation testing is the re usability of commonly performed actions or code snippets required as part of the Automation Framework.
Automation engineers have separate function libraries based on the purpose, for example: for automation testing of Oracle EBS applications, following is a non exhaustive list of function libraries:
- For OAF Pages
- For Oracle EBS Forms
- For Reporting Purpose
- For Log File
- For Result File Generation
- For Product Family wise ( i.e. common functions for Procurement Product Family, HRMS Product Family etc.. )
- For dealing with Excel to handle test data.
Like any other test automation tools, even Oracle Functional Test of Oracle Application Testing Suite supports creation of function libraries through its Openscript IDE.
Lets see how we can create function library using Openscript
Steps to create function library:
- Open openscript
- Click New of File menu
- Select any project type and click Next
- Select the check box “Create script as function library
- Enter your desired function library name and click Next
- Enter desired package name, it can be your organisation name or some package name like we create for any java application.
- Enter your desired Class name, mostly same as your function library name.
- Click finish.
- Once the function library is created, end user can add the desired functions to be used in automation scripts.
Steps to use function library:
- Create any new automation script
- Go to Assets tab
- Select scripts node and click on Add
- Browse to the location where we have the function library created
- Select the same and provide appropriate alias name ( this name would be used in the scripts to call the functions )
- We are now ready to start using the functions in the function library.
Please feel free to ask any queries regarding this topic, I would be more than happy to help you out.