Thanks,
You're right, it didn't sound right but it worked.I've checked it again and 
probably something else? maybe just adding the structs dependency solved 
it? e
[added the code -  just a trial and error experience ]

public class LrScenarioLoadStep extends AbstractStepImpl {

    public String getArchiveRunTestResultsMode() {
//        return archiveRunTestResultsMode;
        return ResultsPublisherModel.CreateHtmlReportResults.toString();
    }

    public boolean isPublishResults() {
//        return publishResults;
        return true;
    }

    public String getIgnoreErrorStrings() {
        return ignoreErrorStrings;
    }

    public String getPerScenarioRunTimeOut() {
        return perScenarioRunTimeOut;
    }

    public String getControllerRunPollingInterval() {
        return controllerRunPollingInterval;
    }

    public String getRunTimeout() {
        return runTimeout;
    }

    public String getTestPaths() {
        return testPaths;
    }

    private final  String archiveRunTestResultsMode;
    private final  boolean publishResults;
    private final  String ignoreErrorStrings;
    private final  String perScenarioRunTimeOut;
    private final  String controllerRunPollingInterval;
    private final  String runTimeout;
    private final  String testPaths;



    @DataBoundConstructor
    public LrScenarioLoadStep( String runTimeout, String ignoreErrorStrings, 
String perScenarioRunTimeOut, String controllerRunPollingInterval, String 
testPaths)
    {
        this.testPaths = testPaths;
        this.runTimeout = runTimeout;
        this.controllerRunPollingInterval = controllerRunPollingInterval;
        this.perScenarioRunTimeOut = perScenarioRunTimeOut;
        this.ignoreErrorStrings = ignoreErrorStrings;
    }

    @Extension @Symbol("LrScenarioLoad")
    public static class DescriptorImpl extends AbstractStepDescriptorImpl {
        public DescriptorImpl() { super(LrScenarioLoadStepExecution.class); }

        @Override
        public String getFunctionName() {
            return "lrScenarioLoad";
        }

        @Nonnull
        @Override
        public String getDisplayName() {
            return "Run LoadRunner scenario";
        }

        public List<EnumDescription> getReportArchiveModes() {

            return ResultsPublisherModel.archiveModes;
        }


    }

}


and the executor:

public class LrScenarioLoadStepExecution extends 
AbstractSynchronousNonBlockingStepExecution<Void> {

    @Inject
    private transient LrScenarioLoadStep step;

    @StepContextParameter
    private transient TaskListener listener;

    @StepContextParameter
    private transient FilePath ws;

    @StepContextParameter
    private transient Run build;

    @StepContextParameter
    private transient Launcher launcher;



    @Override
    protected Void run() throws Exception {

        RunFromFileBuilder runFromFileBuilder = new 
RunFromFileBuilder(step.getTestPaths(), step.getRunTimeout(), 
step.getControllerRunPollingInterval(), step.getPerScenarioRunTimeOut(), 
step.getIgnoreErrorStrings(), "", "", "", "", "", "", "", "", "", "", "", "", 
"", null, false);
        RunResultRecorder runResultRecorder = new 
RunResultRecorder(step.isPublishResults(), step.getArchiveRunTestResultsMode());
        runFromFileBuilder.perform(build, ws, launcher, listener);

        HashMap<String,String> resultFilename = new HashMap<String, String>(0);
        resultFilename.put(RunFromFileBuilder.class.getName(), 
runFromFileBuilder.getRunResultsFileName());

        runResultRecorder.pipelinePerform(build, ws, launcher, listener, 
resultFilename);

        return null;
    }

    private static final long serialVersionUID = 1L;
}



On Monday, August 29, 2016 at 9:49:13 PM UTC+3, Jesse Glick wrote:
>
> On Mon, Aug 29, 2016 at 4:15 AM,  <[email protected] <javascript:>> wrote: 
> > Solved by following 
> > https://wiki.jenkins-ci.org/display/JENKINS/Structs+plugin and changing 
> the 
> > order of variables in the Constructor. 
>
> Order of variables in a constructor should not matter, so perhaps you 
> are doing something else wrong. Without a self-contained code example 
> it is hard to say. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/29207259-7fd1-4725-bb1d-e1c9437d8a15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to