Forum Discussion

rj3000's avatar
rj3000
New Contributor
15 days ago

MyFirstPlugin - button Project menu in Ready Api

hello,

I'm trying to create my first plugin for ReadyApi. I would like to add a button in the Project menu, only when a project is open. 

I've got the template Smartbear provided (https://github.com/SmartBear/ready-api-plugins) working and i see all kind of extra teststep/screens/buttons, but none in the project menu.

In the template is an action which suggest to add a button:

package com.smartbear.ready.plugin.template.actions;

import com.eviware.soapui.impl.wsdl.WsdlProject;
import com.eviware.soapui.plugins.ActionConfiguration;
import com.eviware.soapui.support.UISupport;
import com.eviware.soapui.support.action.support.AbstractSoapUIAction;
import com.google.inject.Inject;

@ActionConfiguration(actionGroup = "EnabledWsdlProjectActions", targetType = WsdlProject.class)
public class SampleJavaAction extends AbstractSoapUIAction<WsdlProject> {

    @Inject
    public SampleJavaAction() {
        super("Sample Java Action", "A sample action at the project level");
    }

    @Override
    public void perform(WsdlProject project, Object o) {
        UISupport.showInfoMessage("Hello from project [" + project.getName() + "]!");
    }
}

But no luck. The documentation says that actionGroup won't work in ReadyApi, see: https://support.smartbear.com/readyapi/docs/configure/plugins/annotations/actions/action.html
Is there an alternative to add a button in the Project menu?

thank you

1 Reply

  • nmrao's avatar
    nmrao
    Champion Level 3

    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?