use of com.twinsoft.convertigo.beans.variables.RequestableVariable in project convertigo by convertigo.
the class RequestableStep method exportVariableDefinition.
public void exportVariableDefinition() throws EngineException {
for (StepVariable stepVariable : getVariables()) {
String variableName = stepVariable.getName();
if (sequence.getVariable(variableName) == null) {
if (!StringUtils.isNormalized(variableName))
throw new EngineException("Variable name is not normalized : \"" + variableName + "\".");
RequestableVariable requestableVariable = stepVariable.isMultiValued() ? new RequestableMultiValuedVariable() : new RequestableVariable();
requestableVariable.setName(variableName);
requestableVariable.setComment(stepVariable.getComment());
requestableVariable.setDescription(stepVariable.getDescription());
requestableVariable.setComment(stepVariable.getComment());
requestableVariable.setRequired(stepVariable.isRequired());
requestableVariable.setValueOrNull(stepVariable.getValueOrNull());
requestableVariable.setVisibility(stepVariable.getVisibility());
sequence.addVariable(requestableVariable);
requestableVariable.bNew = true;
requestableVariable.hasChanged = true;
sequence.hasChanged = true;
}
}
}
use of com.twinsoft.convertigo.beans.variables.RequestableVariable in project convertigo by convertigo.
the class Sequence method clone.
@Override
public Sequence clone() throws CloneNotSupportedException {
Sequence clonedObject = (Sequence) super.clone();
clonedObject.variables = new HashMap<String, Object>();
clonedObject.cloneNumber = ++cloneNumber;
clonedObject.vVariables = new ArrayList<RequestableVariable>();
clonedObject.vTestCases = new ArrayList<TestCase>();
clonedObject.vAllVariables = null;
clonedObject.nbAsyncThreadRunning = 0;
clonedObject.xpathApi = null;
clonedObject.stepHttpState = null;
clonedObject.transactionSessionId = null;
clonedObject.copies = null;
clonedObject.loadedSteps = new HashMap<Long, Step>(10);
clonedObject.executedSteps = null;
clonedObject.childrenSteps = null;
clonedObject.workerElementMap = null;
clonedObject.vSteps = new ArrayList<Step>();
clonedObject.vAllSteps = null;
clonedObject.currentStep = null;
clonedObject.currentChildStep = 0;
clonedObject.stepContextNames = new ArrayList<String>();
clonedObject.arborting = false;
clonedObject.skipSteps = false;
clonedObject.sequenceListeners = new EventListenerList();
clonedObject.stepListeners = new EventListenerList();
return clonedObject;
}
use of com.twinsoft.convertigo.beans.variables.RequestableVariable in project convertigo by convertigo.
the class AbstractCouchDbTransaction method getJsonBody.
public JSONObject getJsonBody(JSONObject jsonDocument) throws JSONException, EngineException {
// add document members from variables
for (RequestableVariable variable : getAllVariables()) {
String variableName = variable.getName();
if (!variableName.startsWith("__") && !variableName.startsWith(CouchParam.prefix)) {
Object value = toJson(getParameterValue(variableName));
addJson(jsonDocument, variableName, value, getParameterDataTypeClass(variableName));
}
}
return jsonDocument;
}
use of com.twinsoft.convertigo.beans.variables.RequestableVariable in project convertigo by convertigo.
the class SapJcoLogonTransaction method addCredentialsVariables.
public void addCredentialsVariables() throws EngineException {
if (getVariable(jco_user) == null) {
RequestableVariable varUser = new RequestableVariable();
varUser.bNew = true;
varUser.setName(jco_user);
addVariable(varUser);
hasChanged = true;
}
if (getVariable(jco_pwd) == null) {
RequestableVariable varPwd = new RequestableVariable();
varPwd.bNew = true;
varPwd.setName(jco_pwd);
addVariable(varPwd);
hasChanged = true;
}
if (getVariable(jco_client) == null) {
RequestableVariable varClient = new RequestableVariable();
varClient.bNew = true;
varClient.setName(jco_client);
addVariable(varClient);
hasChanged = true;
}
}
Aggregations