public void execute(String paxml, Context context) { paxml = "<" + ScenarioTag.TAG_NAME + ">" + paxml + "</" + ScenarioTag.TAG_NAME + ">"; try { IEntity entity = this.paxml.getParser().parse(new InMemoryResource(paxml), true, null); this.paxml.execute(entity, context, !entryCalled, false); entryCalled = true; } catch (Throwable e) { if (log.isErrorEnabled()) { log.error(e.getMessage(), e); } println(Paxml.getCause(e)); } }
public void execute(String paxml, Context context) { paxml = "<" + ScenarioTag.TAG_NAME + ">" + paxml + "</" + ScenarioTag.TAG_NAME + ">"; try { IEntity entity = this.paxml.getParser().parse(new InMemoryResource(paxml), true, null); this.paxml.execute(entity, context, !entryCalled, false); entryCalled = true; } catch (Throwable e) { if (log.isErrorEnabled()) { log.error(e.getMessage(), e); } println(Paxml.getCause(e)); } }
/** * Run a random paxml xml string. * * @param paxml * the paxml xml string * @return the execution result */ public static Object runPaxml(String paxml) { if (StringUtils.isBlank(paxml)) { return null; } paxml = "<scenario>" + paxml.trim() + "</scenario>"; Context context = Context.getCurrentContext(); Paxml _paxml = context.getPaxml(); IEntity entity = _paxml.getParser().parse(new InMemoryResource(paxml), true, null); return _paxml.execute(entity, context, false, false); }
/** * Run a random paxml xml string. * * @param paxml * the paxml xml string * @return the execution result */ public static Object runPaxml(String paxml) { if (StringUtils.isBlank(paxml)) { return null; } paxml = "<scenario>" + paxml.trim() + "</scenario>"; Context context = Context.getCurrentContext(); Paxml _paxml = context.getPaxml(); IEntity entity = _paxml.getParser().parse(new InMemoryResource(paxml), true, null); return _paxml.execute(entity, context, false, false); }