Package com.canoo.webtest.boundary

Examples of com.canoo.webtest.boundary.ResetScriptRunner


   * Perform the step's actual work.
   *
   * @throws Exception if a problem occurred
   */
  public void doExecute() throws Exception {
        final ResetScriptRunner runner; // delegate pattern
        final Context context = getContext();
        if (context.getRunner() == null) {
            runner = new ResetScriptRunner();
            runner.setLanguage(getLanguage());
            context.setRunner(runner);
            LOG.debug("Creating new Script Runner with language: " + fLanguage);
        }
        else {
            runner = context.getRunner();
            runner.reset();
        }
    buildScript();
    getProject().addReference("step", this);
    if (context.getCurrentResponse() == null) {
      LOG.warn("No response found. Previous invoke missing? Related scripting variables not created");
View Full Code Here


            }
        }
  }

    public static String evalScriptExpression(final Context context, final String expression, final Step step) {
        final ResetScriptRunner runner = context.getRunner();
        if (runner == null) {
            throw new StepExecutionException("Can't evaluate script property because no previous <scriptStep> with keep=true.", step);
        }
        runner.reset();
        try {
            return evalByRunner(runner, expression, step);
        } catch (BuildException be) {
            throw new StepExecutionException("Error invoking script: " + be.getMessage(), step);
        }
View Full Code Here

   *
   * @throws StepExecutionException if a mandatory attribute is not set
   */
  protected void verifyParameters() {
    super.verifyParameters();
        final ResetScriptRunner runner = getContext().getRunner();
        if (runner == null) {
            emptyParamCheck(fLanguage, "language");
        } else {
            paramCheck(fLanguage != null && !fLanguage.equals(runner.getLanguage()),
                    "You may not change 'language' to '" + fLanguage +
                    "' after previously using the 'keep' attribute (was: " + runner.getLanguage() + ")");
        }
    paramCheck(fSrc == null && StringUtils.isEmpty(fScriptText),
       "Either \"src\" attribute or nested script text must be given.");
  }
View Full Code Here

TOP

Related Classes of com.canoo.webtest.boundary.ResetScriptRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.