Solved
Forum Discussion
nmrao
2 years agoCommunity Hero
Interesting to see plugin development.
Any errors?
Did you try debug for IDE? or add debug statements to see if invoked or not?
Curious to see if you have any wire frame / mock screen that you are trying to build?
rj3000
2 years agoNew Contributor
sorry for the late reaction. I found another way to create an plugin. Instead of using java i used groovy.
i start using the template: Smartbears template
and added my own UpdateFunctionLibrary.groovy to it:
package com.smartbear.ready.plugin.template.actions;
import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.impl.wsdl.WsdlProjectPro;
import com.eviware.soapui.plugins.ActionConfiguration;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import com.smartbear.ready.functional.actions.FunctionalActionGroups;
import com.eviware.soapui.SoapUI
import com.eviware.soapui.SoapUIProSettings
@ActionConfiguration(actionGroup = FunctionalActionGroups.FUNCTIONAL_MODULE_TOOLBAR_ACTIONS, targetType = WsdlProjectPro.class, isToolbarAction = true, iconPath = "com/smartbear/ready/plugin/template/icons/jira.svg",description = "Update FunctionLibrary")
public class updateFunctionLibrary extends AbstractSoapUIAction<WsdlProjectPro> {
// @Inject
public updateFunctionLibrary() {
super( "toolbar", "Update FunctionLibrary", "");
}
@Override
public void perform(WsdlProjectPro project, Object o) {
if (SoapUI.settings.getString(SoapUIProSettings.SCRIPT_LIBRARY, "") == "") {
return
}
if (!project.open) {
UISupport.showErrorMessage("Project " + project.getName() + " is closed.");
} else {
if (project.name.toLowerCase() == "fl") {
UISupport.showErrorMessage("not possible.");
} else {
Boolean functionLibraryExists = false
project.testSuiteList.each{
if (it.name.toLowerCase() == "functionlibrary") {
functionLibraryExists = true
}
}
if (functionLibraryExists) {
project.runAfterLoadScript()
UISupport.showInfoMessage("FunctionLibraryupdated");
}
else {
UISupport.showErrorMessage("Error updateing FunctionLibrary");
}
}
}
}
}
And later build it with maven (mvn install)
Maybe not the best way to code, but it works for me
After I installed the plugin as .jar file and restart ReadyApi I get a button. when i click it, it will start the project load script
ps. i borrow the icon of the Jira plugin