com.ibm.rational.test.lt.datacorrelation.testgen

Class DataCorrelator

  • java.lang.Object
    • com.ibm.rational.test.lt.datacorrelation.testgen.DataCorrelator
  • All Implemented Interfaces:
    com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator


    public class DataCorrelator
    extends Object
    implements com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
    • Method Detail

      • generateNames

        public List generateNames(LTTest test,
                         boolean create,
                         boolean all)
        Parameters:
        test - - the test to create the names for
        create - - true to generate names, false to remove them
        all - - true to override user defined names, false to leave them alone
      • correlateAll

        public void correlateAll(LTTest test,
                        IProgressMonitor monitor)
        Deprecated. - use correlateAll(LTTest, IProgressMonitor, boolean)
        Parameters:
        test -
        monitor -
      • correlateAll

        public void correlateAll(LTTest test,
                        IProgressMonitor monitor,
                        boolean generateNames)
        Parameters:
        test - - name of test to do correlation on
        monitor - - a progress monitor to be updated while correlation is being done
      • findPossibleSubstitutionSites

        public List findPossibleSubstitutionSites(com.ibm.rational.test.common.models.behavior.cbdata.SubstituterHost host)
      • correlateAll

        public void correlateAll(LTTest test)
        Specified by:
        correlateAll in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • addHarvester

        public com.ibm.rational.test.common.models.behavior.cbdata.CorrelationHarvester addHarvester(IDCStringLocator harvestString)
                                                                                              throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
        Specified by:
        addHarvester in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
        Throws:
        com.ibm.rational.test.lt.datacorrelation.testgen.DCException
      • addHarvester

        public com.ibm.rational.test.common.models.behavior.cbdata.BuiltInDataSource addHarvester(CBActionElement elem,
                                                                                         String bidsName)
        Parameters:
        elem - - element using the built in data source
        bidsName - - name of built in data source to create
        Returns:
        - the built in data source.
      • addSubstituter

        public com.ibm.rational.test.common.models.behavior.cbdata.Substituter addSubstituter(IDCStringLocator subString)
                                                                                       throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
        Specified by:
        addSubstituter in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
        Throws:
        com.ibm.rational.test.lt.datacorrelation.testgen.DCException
      • addCorrelation

        public com.ibm.rational.test.common.models.behavior.cbdata.Substituter addCorrelation(com.ibm.rational.test.common.models.behavior.cbdata.Substituter myDS,
                                                                                     com.ibm.rational.test.common.models.behavior.cbdata.DataSource harvester)
        Specified by:
        addCorrelation in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • resetEncode

        public void resetEncode(com.ibm.rational.test.common.models.behavior.cbdata.Substituter sub)
      • addCorrelation

        public com.ibm.rational.test.common.models.behavior.cbdata.Substituter addCorrelation(IDCStringLocator subString,
                                                                                     IDCStringLocator harvestString)
                                                                                       throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
        Specified by:
        addCorrelation in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
        Throws:
        com.ibm.rational.test.lt.datacorrelation.testgen.DCException
      • addCorrelation

        public com.ibm.rational.test.common.models.behavior.cbdata.Substituter addCorrelation(IDCStringLocator subString,
                                                                                     com.ibm.rational.test.common.models.behavior.cbdata.DataSource harvester)
                                                                                       throws com.ibm.rational.test.lt.datacorrelation.testgen.DCException
        Specified by:
        addCorrelation in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
        Throws:
        com.ibm.rational.test.lt.datacorrelation.testgen.DCException
      • findPossibleHarvestSites

        public List findPossibleHarvestSites(LTTest test,
                                    IDCStringLocator subString,
                                    IProgressMonitor monitor,
                                    int[] srchList)
        This method will find possible correlation sites given a string
        Parameters:
        test - - test to search in.
        subString - - the string to find correlations for
        monitor - - the progress monitor to update while finding sites.
        srchList - - the list of types of candidates to search for. Valid types are in IDCListTypes.
        Returns:
        this will return seperate lists for each type of list asked for
      • findPossibleHarvestSites

        public List findPossibleHarvestSites(LTTest test,
                                    IDCStringLocator subString,
                                    IProgressMonitor monitor)
        This function will find possible correlation sites given a string
        Parameters:
        test - - test to search in.
        subString - - the string to find correlations for
        monitor - - the progress monitor to update while finding sites.
        Returns:
        this will return a list of IDCStringLocators with responses where the correlations were found
      • findPossibleHarvestSites

        public List findPossibleHarvestSites(LTTest test,
                                    IDCStringLocator subString)
        Specified by:
        findPossibleHarvestSites in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • getDPColName

        public String getDPColName(IDCStringLocator strl)
        Specified by:
        getDPColName in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • getUniqueDPColName

        public String getUniqueDPColName(CBActionElement elem)
        Returns unique name. If the elem is not in the model (the call to getParent() returns null), the method will only work if DataCorrelator.setCBTest(CBTest) is called ahead of time, because the CBTest is needed to ensure uniqueness.
        Specified by:
        getUniqueDPColName in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
        See Also:
        IDataCorrelator.getUniqueDPColName(com.ibm.rational.test.common.models.behavior.CBActionElement), DataCorrelator.setCBTest(CBTest)
      • canSubstitute

        public boolean canSubstitute(CBActionElement cb)
        Specified by:
        canSubstitute in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • canSubstitute

        public List canSubstitute(IDCStringLocator strl)
        Specified by:
        canSubstitute in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • canHarvest

        public boolean canHarvest(CBActionElement cb)
        Specified by:
        canHarvest in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • canHarvest

        public List canHarvest(IDCStringLocator strl)
        Specified by:
        canHarvest in interface com.ibm.rational.test.lt.datacorrelation.testgen.IDataCorrelator
      • unCorrelateAll

        public void unCorrelateAll(LTTest test,
                          com.ibm.rational.test.lt.datacorrelation.testgen.IDCCallBack cb,
                          IProgressMonitor pm)
        This method will remove all correlations from a test.
        Parameters:
        test - - the test to remove correlations from
        cb - - the call back class for the UI to process the deletions before they happen. can be null.
        pm - - the progress monitor to report progress to user. can be null.
      • setCBTest

        public static void setCBTest(CBTest test)
        Parameters:
        test - CBTest. This method can be used to specify the CBTest when working with model elements that are not yet added to the test. Other methods in DataCorrelator expect the getParent not to return null so that the host test of any model element can be found. Use this method to set the CBTest to bypass this behavior.

        IMPORTANT

        If this call was used to force-set the CBTest, when finished with data-correlation, the caller must call this method again with null argument, to unset the CBTest, to ensure proper behavior of other RPT componets.

IBM Rational Performance Tester SDK

© Copyright IBM Corp. 2013. All rights reserved.