Esempio n. 1
0
  @Override
  public void resolve(ResolveContext<?> context) {
    super.resolve(context);

    if (targetTestCase == null) {
      if (context.hasThisModelItem(
          this, "Missing Test Case", getTestStepTitle() + "/" + stepConfig.getTargetTestCase()))
        return;
      context
          .addPathToResolve(
              this, "Missing Test Case", getTestStepTitle() + "/" + stepConfig.getTargetTestCase())
          .addResolvers(
              new RunTestCaseRemoveResolver(this),
              new ChooseAnotherTestCase(this),
              new CreateNewEmptyTestCase(this));
    } else {
      targetTestCase.resolve(context);
      if (context.hasThisModelItem(
          this, "Missing Test Case", getTestStepTitle() + "/" + stepConfig.getTargetTestCase())) {
        context
            .getPath(
                this,
                "Missing Test Case",
                getTestStepTitle() + "/" + stepConfig.getTargetTestCase())
            .setSolved(true);
      }
    }
  }
Esempio n. 2
0
  @Override
  public void resetConfigOnMove(TestStepConfig config) {
    super.resetConfigOnMove(config);

    stepConfig = (RunTestCaseStepConfig) config.getConfig().changeType(RunTestCaseStepConfig.type);
    propertyHolderSupport.resetPropertiesConfig(stepConfig.getProperties());
  }
Esempio n. 3
0
  public WsdlRunTestCaseTestStep(
      WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    super(testCase, config, true, forLoadTest);

    if (config.getConfig() == null) {
      stepConfig =
          (RunTestCaseStepConfig) config.addNewConfig().changeType(RunTestCaseStepConfig.type);
      stepConfig.addNewProperties();
      stepConfig.addNewReturnProperties();
    } else {
      stepConfig =
          (RunTestCaseStepConfig) config.getConfig().changeType(RunTestCaseStepConfig.type);
    }

    if (stepConfig.getRunMode() == null) {
      stepConfig.setRunMode(RunTestCaseRunModeTypeConfig.PARALLELL);
    }

    setIcon(UISupport.createImageIcon("/run_testcase_step.gif"));

    propertyHolderSupport =
        new XmlBeansPropertiesTestPropertyHolder(this, stepConfig.getProperties());
  }
Esempio n. 4
0
  public void setTargetTestCase(WsdlTestCase testCase) {
    if (targetTestCase != null) {
      targetTestCase.getTestSuite().removeTestSuiteListener(testSuiteListener);
      targetTestCase.removeTestPropertyListener(testPropertyListener);
    }

    WsdlTestCase oldTestCase = this.targetTestCase;
    this.targetTestCase = testCase;

    if (testCase != null) {
      stepConfig.setTargetTestCase(testCase.getId());

      targetTestCase.getTestSuite().addTestSuiteListener(testSuiteListener);
      targetTestCase.addTestPropertyListener(testPropertyListener);

      syncProperties();
    }

    notifyPropertyChanged(TARGET_TESTCASE, oldTestCase, testCase);
  }
Esempio n. 5
0
 public void setRunMode(RunTestCaseRunModeTypeConfig.Enum runMode) {
   stepConfig.setRunMode(runMode);
 }
Esempio n. 6
0
 public RunTestCaseRunModeTypeConfig.Enum getRunMode() {
   return stepConfig.getRunMode();
 }
Esempio n. 7
0
 private String getTestCaseId() {
   return stepConfig.getTargetTestCase();
 }
Esempio n. 8
0
 public void setReturnProperties(StringList returnProperties) {
   stepConfig.getReturnProperties().setEntryArray(returnProperties.toStringArray());
 }
Esempio n. 9
0
 public StringList getReturnProperties() {
   return new StringList(stepConfig.getReturnProperties().getEntryList());
 }