public SimpleContainsAssertion(TestAssertionConfig assertionConfig, Assertable assertable) {
    super(assertionConfig, assertable, true, true, true, true);

    XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(getConfiguration());
    token = reader.readString("token", null);
    ignoreCase = reader.readBoolean("ignoreCase", false);
    useRegEx = reader.readBoolean("useRegEx", false);
  }
 private void init() {
   XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(getConfiguration());
   includeGlobal = reader.readBoolean(INCLUDE_GLOBAL, true);
   includeProjectSpecific = reader.readBoolean(INCLUDE_PROJECT_SPECIFIC, true);
   assertionSpecificExposureList =
       StringUtils.toStringList(reader.readStrings(ASSERTION_SPECIFIC_EXPOSURE_LIST));
   extractTokenTable();
 }
示例#3
0
  protected int readKeyIdentifierType(XmlObjectConfigurationReader reader) {
    int identifierType = reader.readInt("keyIdentifierType", WSConstants.ISSUER_SERIAL);

    // For backward compatibility see SOAP-2347
    if (identifierType == 0) {
      return WSConstants.ISSUER_SERIAL;
    }
    return identifierType;
  }
示例#4
0
  // Used to save values from table GUI components
  protected List<StringToStringMap> readTableValues(
      XmlObjectConfigurationReader reader, String parameterName) {
    List<StringToStringMap> result = new ArrayList<StringToStringMap>();
    String[] tableValues = reader.readStrings(parameterName);
    if (tableValues != null && tableValues.length > 0) {
      for (String tableValue : tableValues) {
        result.add(StringToStringMap.fromXml(tableValue));
      }
    }

    return result;
  }
  private void init(LoadTestAssertionConfig assertionConfig) {
    XmlObject configuration = assertionConfig.getConfiguration();

    XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(configuration);
    setName(reader.readString(NAME_ELEMENT, "Step Average"));
    minRequests = reader.readInt(MIN_REQUESTS_ELEMENT, 100);
    maxAverage = reader.readInt(MAX_AVERAGE_ELEMENT, 1000);
    setTargetStep(reader.readString(TEST_STEP_ELEMENT, ANY_TEST_STEP));
    maxErrors = reader.readInt(MAX_ERRORS_ELEMENT, -1);
    sampleInterval = reader.readInt(SAMPLE_INTERVAL_ELEMENT, 20);
  }
示例#6
0
  /**
   * Constructor for our assertion.
   *
   * @param assertionConfig
   * @param modelItem
   */
  public WSARequestAssertion(TestAssertionConfig assertionConfig, Assertable modelItem) {
    super(assertionConfig, modelItem, false, true, false, true);

    XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(getConfiguration());
    assertWsaAction = reader.readBoolean("asertWsaAction", true);
    assertWsaTo = reader.readBoolean("asertWsaTo", false);
    assertWsaReplyTo = reader.readBoolean("assertWsaReplyTo", false);
    assertWsaMessageId = reader.readBoolean("assertWsaMessageId", false);
    // assertWsaRelatesTo = reader.readBoolean("asertWsaRelatesTo", false);
    // assertReplyToRefParams = reader.readBoolean("assertReplyToRefParams",
    // false);
    // assertFaultToRefParams = reader.readBoolean("assertFaultToRefParams",
    // false);
    wsaAssertionConfiguration =
        new WsaAssertionConfiguration(
            assertWsaAction,
            assertWsaTo,
            assertWsaReplyTo,
            assertWsaMessageId,
            false,
            false,
            false);
  }
 private void readConfig(TestStepConfig config) {
   XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader(config.getConfig());
   scriptText = reader.readString("script", "");
 }