Importing Existing Custom Actions into Qualitia
- Sagar Dubewar (Unlicensed)
You can import your existing set of custom actions into Qualitia. Importing custom actions is simple 3 step process.
In order to import and streamline the custom actions with other project data in Qualitia, you must add all the java source files at one place. In case you do not have source files for some actions, you can generate the source code files easily using these commands mentioned below.
- Launch command prompt.
- Navigate to the %localappdata%\QualitiaWDClient\app-7.1.0\Dist folder.
- Enter the following command:
“java -jar jd-cli.jar "<CLASS_FILE_SOURCE_PATH>" -od "<DESTINATION_FOLDER_TO_SAVE_SOURCE_CODE>"
C:\Users\<HOSTNAME>\AppData\Local\QualitiaWDClient\app-7.1.0\Dist>java -jar jd-cli.jar "D:\ClassFiles" -od "D:\JavaFiles" 21:21:06.078 INFO jd.cli.Main - Decompiling D:\ClassFiles 21:21:06.095 INFO jd.core.output.DirOutput - Directory output will be initialized for path D:\JavaFiles 21:21:06.412 INFO jd.core.output.DirOutput - Finished with 2 class file(s) and 1 resource file(s)
Post executing this command, source code files will be added at the destination folder. You can use them now to build and compile Eclipse project.
To create and compile custom action project:
- Launch Eclipse and create a new java project using an execution environment as JRE 1.8.
- Set the bin folder as an output folder.
- Add new folder and name it as lib.
The complete folder hierarchy will look something like this in the project directory. - Add all the existing custom action files in this directory.
Before you start adding custom action-related data into these sub folders, ensure that the code is working fine.- Add all the dependency files in the lib folder.
- Add all the compiled class files in the bin folder.
- Add all the java source files in the src folder.
Ensure you add all your dependent jars in lib folder and provide the relative path for these jars in Build Path with the correct sequence.
- Compile and build the Eclipse project.
Actions are now ready to be imported.
You can import the existing set of custom actions in Qualitia to share with the other project members easily.
Ensure the class files you are providing have all the custom actions functions present for which you have provided the metadata. A single class file can contain functions for multiple custom actions.
- Log on to automation studio as a user with Manage Custom Action Code privileges.
- Navigate to the project in which you want to import the custom action code and then click Develop > Custom Actions.
You will see the notification about importing custom actions on the top. This option is visible only if the project contains any custom actions that are not yet imported. - Click Import.
- Provide path to the the Eclipse project which we have created and compiled earlier.
- After importing all the custom action files successfully, click Close.
Eclipse project directory will be copied under Qualitia project path with all the sub-folders mentioned earlier (bin, lib, src, and so forth).
The Custom Action Repository Path under Configuration Settings will be set automatically to this new directory created under Qualitia Project Path. - In case there are any issues while importing the actions, these will be listed which can be exported in the HTML report.
Refer to the troubleshooting section to resolve the errors.
In case you are using any version control system (Bitbucket or SVN), you need to push and commit this java project folder into the repository manually for the first time and all the Qualitia clients must pull the same on their respective systems. This is a one-time activity. Changes made to the custom actions thereon will be pushed automatically.