Tabnine Logo
TestSuite
Code IndexAdd Tabnine to your IDE (free)

How to use
TestSuite
in
net.bpelunit.framework.model.test

Best Java code snippets using net.bpelunit.framework.model.test.TestSuite (Showing top 7 results out of 315)

origin: net.bpelunit/ant-plugin

public void run(File testSuite) throws SpecificationException, DeploymentException, ConfigurationException {
  TestSuite suite= loadTestSuite(testSuite);
  suite.addResultListener(this);
  try {
    suite.setUp();
  } catch (DeploymentException e) {
    try {
      suite.shutDown();
    } catch (DeploymentException e2) {}
    throw e;
  }
  outputPlain("START", suite);
  suite.run();
  suite.removeResultListener(this);
  outputPlain("END", suite);
  String result= "Test Run Completed. " + fRuns + " " + getPluralOf(fRuns, "run") + " (" + fFailures + " " + getPluralOf(fFailures, "failure")
      + ", " + fErrors + " " + getPluralOf(fErrors, "error") + ") \n";
  outputPlain(result);
  System.out.println(result);
  outputXML(suite);
  closeOutputs();
  suite.shutDown();
}
origin: net.bpelunit/framework

/**
 * Filters this test suite to only run the test case with the specified
 * name.
 * 
 * Convenience method for {@link #setFilter(List)}.
 * 
 * @param testCaseName
 * @throws TestCaseNotFoundException
 *             If a test case with that name was not found.
 */
public void setFilter(String testCaseName) throws TestCaseNotFoundException {
  List<String> tempList = new ArrayList<String>();
  tempList.add(testCaseName);
  setFilter(tempList);
}
origin: net.bpelunit/framework

/**
 * Filters this test suite to only run the test cases with the names
 * specified in the list (in that order).
 * 
 * @see #setFilter(String)
 * @param testCaseNames
 * @throws TestCaseNotFoundException
 *             If one of the test cases does not exist.
 */
public void setFilter(List<String> testCaseNames)
    throws TestCaseNotFoundException {
  List<TestCase> filtered = new ArrayList<TestCase>();
  for (String name : testCaseNames) {
    addTestCaseToFilter(filtered, name);
  }
  fTestCaseFilter = filtered;
}
origin: net.bpelunit/commandline

  if (!suite.hasTestCase(testCaseName)) {
    abort(String
        .format(Messages
  suite.setUp();
} catch (DeploymentException e) {
  try {
    suite.shutDown();
  } catch (DeploymentException e1) {
screen.println(Messages.getString("BPELUnitCommandLineRunner.MSG_PROGRESS_RUNNING_TEST_CASES")); //$NON-NLS-1$
suite.addResultListener(this);
if (testCaseNames.size() > 0) {
  try {
    suite.setFilter(testCaseNames);
  } catch (TestCaseNotFoundException e1) {
suite.run();
suite.removeResultListener(this);
screen.println(Messages.getString("BPELUnitCommandLineRunner.MSG_PROGRESS_TESTCASES_FINISHED")); //$NON-NLS-1$
  suite.shutDown();
} catch (DeploymentException e) {
  abort(Messages.getString("BPELUnitCommandLineRunner.MSG_ERROR_UNDEPLOY"), e); //$NON-NLS-1$
origin: net.bpelunit/framework

/**
 * Creates a new Velocity context that extends the VelocityContext of the
 * test suite with information about this test case. To keep test cases
 * isolated, the context does not wrap the test suite context, but clones
 * and extends it. To reduce overhead, the test suite context is cached so
 * it is only produced the first time.
 *
 * @return VelocityContext with information about the test suite and test
 * case.
 * @throws DataSourceException 
 * */
public Context createVelocityContext() throws DataSourceException {
  if (fTestSuiteVelocityContext == null) {
    fTestSuiteVelocityContext = getSuite().createVelocityContext();
  }
  Context ctx = CLONER.deepClone(fTestSuiteVelocityContext);
  ctx.put("testCaseName", getRawName());
  if (fDataSource != null) {
    DataSourceUtil.initializeContext(ctx, fDataSource, fRowIndex);
  }
  if (fSetUpVelocityScript != null) {
    StringWriter sW = new StringWriter();
    Velocity.evaluate(ctx, sW, "setUpTestCase", fSetUpVelocityScript);
  }
  return ctx;
}
origin: net.bpelunit/framework

private void createTestCase(String testDirectory,
    XMLTestSuiteDocument xmlTestSuiteDocument,
    XMLTestSuite xmlTestSuite, Map<String, Partner> suitePartners,
    Map<String, HumanPartner> suiteHumanPartners, Partner suiteClient,
    TestSuite suite, int currentNumber, XMLTestCase xmlTestCase)
    throws SpecificationException {
  String xmlTestCaseName = getTestCaseName(currentNumber, xmlTestCase);
  boolean isVary = xmlTestCase.getVary();
  int rounds = computeNumberOfRounds(xmlTestSuiteDocument, isVary);
  fLogger.info("Varying: " + isVary + " (Rounds: " + rounds + ")");
  IDataSource dataSource = readDataSource(testDirectory,
      xmlTestSuite, xmlTestCase);
  final int nRows = getNumberOfRows(dataSource);
  final int nRounds = getNumberOfRounds(isVary, rounds);
  for (int iRow = 0; iRow < nRows; ++iRow) {
    for (int iRound = 0; iRound < nRounds; iRound++) {
      String currentTestCaseName = getHumanReadableTestCaseName(
          xmlTestCaseName, rounds, dataSource, iRow, iRound);
      if (!xmlTestCase.getAbstract()) {
        TestCase test = createTestCase(suitePartners,
            suiteHumanPartners, suiteClient, suite,
            xmlTestCase, currentTestCaseName, iRound,
            testDirectory);
        test.setDataSource(dataSource);
        test.setRowIndex(iRow);
        suite.addTestCase(test);
      }
    }
  }
}
origin: net.bpelunit/framework

TestSuite suite = new TestSuite(xmlSuiteName, suiteBaseURL,
    processUnderTest);
net.bpelunit.framework.model.testTestSuite

Javadoc

A BPELUnit TestSuite is a collection of TestCases, along with the description of PUT and partners, including deployment information for the PUT.

Most used methods

  • addResultListener
  • removeResultListener
  • run
  • setFilter
    Filters this test suite to only run the test cases with the names specified in the list (in that ord
  • setUp
  • shutDown
  • <init>
  • addTestCase
  • addTestCaseToFilter
  • createVelocityContext
    Creates a new VelocityContext with information about this test suite. If necessary, it will initiali
  • endTestCase
  • getBaseURL
  • endTestCase,
  • getBaseURL,
  • getChildren,
  • getLocalServer,
  • getName,
  • getProcessUnderTest,
  • getRawName,
  • getTestCaseCount,
  • hasTestCase,
  • isRunning

Popular in Java

  • Creating JSON documents from java classes using gson
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • getSystemService (Context)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now