AnsweredAssumed Answered

Custom Step not executed

Question asked by Theo-Buri on Mar 9, 2018
Latest reply on Mar 12, 2018 by Theo-Buri

Hello,

 

I want to create a custom step to generate a JWT token. In order to learn the process of creating and integrating a custom step into a virtual service, I firstly tried to just create a custom step printing some logs.

Here it is :

public class CustomJWTStep implements CustJavaNodeInterface{

    private static final Log LOGGER = LogFactory
            .getLog(CustomJWTStep.class);
    
    
    public Object executeNodeLogic(TestExec testExec, Map arguments) throws TestRunException {
        Response responseLive= new Response();
        LOGGER.info("+++++++++++++++TEST++++++++++++++++++++");
        TransientResponse response=responseLive.createTransientCopy();
        return response;
    }

    public ParameterList getParameters() {
        ParameterList pl = new ParameterList( "param1=&param2=&" );
        return pl;
    }

    public void initialize(TestCase arg0, Element arg1) throws TestDefException {
        LOGGER.info("+++++++++++++++INITIALIZATION++++++++++++++++++++");
    }
}

With the file lisaextension containing the path to my class :

simpleNodes=fr.pe.poc.custom_step_jwt.CustomJWTStep

As told in the documentation. The custom step is integrated into a classical virtual service, just answering some json datas when requested.

The log "INITIALIZATION" always displays properly, but even when the service is called and answers, the "TEST" log is never printed, and I can't figure why...

 

Can someone help out ?

Outcomes