Package org.camunda.bpm.qa.performance.engine.framework

Examples of org.camunda.bpm.qa.performance.engine.framework.PerfTestException


  protected void starting(Description description) {
    if(perfTestConfiguration == null) {

      File file = IoUtil.getFile(PROPERTY_FILE_NAME);
      if(!file.exists()) {
        throw new PerfTestException("Cannot load file '"+PROPERTY_FILE_NAME+"': file does not exist.");
      }
      FileInputStream propertyInputStream = null;
      try {
        propertyInputStream = new FileInputStream(file);
        Properties properties = new Properties();
        properties.load(propertyInputStream);
        perfTestConfiguration = new PerfTestConfiguration(properties);
      } catch(Exception e) {
        throw new PerfTestException("Cannot load properties from file "+PROPERTY_FILE_NAME+": "+e);

      } finally {
        IoUtil.closeSilently(propertyInputStream);
      }
    }
View Full Code Here


    String processEnginePlugins = properties.getProperty("processEnginePlugins", "");
    for (String pluginName : processEnginePlugins.split(",")) {
      if(pluginName.length() > 1) {
        Object pluginInstance = ReflectUtil.instantiate(pluginName);
        if(!(pluginInstance instanceof ProcessEnginePlugin)) {
          throw new PerfTestException("Plugin "+pluginName +" is not an instance of ProcessEnginePlugin");

        } else {
          List<ProcessEnginePlugin> plugins = processEngineConfiguration.getProcessEnginePlugins();
          if(plugins == null) {
            plugins = new ArrayList<ProcessEnginePlugin>();
View Full Code Here

      Properties properties = new Properties();
      properties.load(propertyInputStream);
      return properties;

    } catch(Exception e) {
      throw new PerfTestException("Cannot load properties from file "+PROPERTIES_FILE_NAME+": "+e);

    } finally {
      IoUtil.closeSilently(propertyInputStream);
    }
  }
View Full Code Here

        }

        JsonUtil.writeObjectToFile(resultFileName, results);

      } catch ( Exception e ){
        throw new PerfTestException("Could not record results to file "+resultFileName, e);

      }
    }
  }
View Full Code Here

      resultFile.createNewFile();

      mapper.writerWithDefaultPrettyPrinter().writeValue(resultFile, object);

    } catch(Exception e) {
      throw new PerfTestException("Cannot write object to file "+filename, e);

    }

  }
View Full Code Here

    try {
      return mapper.readValue(new File(filename), type);

    } catch(Exception e) {
      throw new PerfTestException("Cannot read object from file "+filename, e);

    }
  }
View Full Code Here

  private boolean isSortingEnabled = true;

  public TabularResultAggregator(String resultsFolderPath) {
    resultDirectory = new File(resultsFolderPath);
    if(!resultDirectory.exists()) {
      throw new PerfTestException("Folder "+resultsFolderPath+ " does not exist.");
    }
  }
View Full Code Here

      outputStream = new BufferedOutputStream(new FileOutputStream(file, true));
      outputStream.write(value.getBytes());
      outputStream.flush();

    } catch (Exception e) {
      throw new PerfTestException("Could not write report to file", e);
    } finally {
      IoUtil.closeSilently(outputStream);
    }

  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.qa.performance.engine.framework.PerfTestException

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.