Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 942199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:14:05+00:00 2026-05-15T22:14:05+00:00

I’m fairly new to Rational Functional Tester (Java) but I have one large blank.

  • 0

I’m fairly new to Rational Functional Tester (Java) but I have one large blank. I have an application that is in an agile development environment so some of the screens can flux as new interfaces are brought online.

For this reason I’m trying to modularize my test scripts. For example: I would like to have a login script, a search script, and a logout script.

I would then stitch these together (pseudo code)

Call Script components.security.Login;
Call Script components.search.Search;
//verification point
Call Script components.security.Logout;

By breaking the testing script into discrete chunks (functional units) I believe that I would be better able to adapt to change. If the login script changed, I would fix or re-record it once for every script in the application.

Then I would call that script, say, “TestSituation_001”. It would have need to refer to several different data pools. In this instance a User datapool (instead of a superUser datapool) and a TestSituation_001 datapool, or possibly some other datapools as well. The verfication point would use the situational datapool for its check.

Now, this is how I would do it in an ideal world. What is bothering me at the moment is that it appears that I would need to do something entirely different in order to get the child scripts to inherit the parents.

So my questions are these:

  1. Why don’t child scripts just inherit the calling script’s data pool?
  2. How can I make them do it?
  3. Am I making poor assumptions about the way this should work?
  4. If #3 is true, then how can I do better?

As a side note, I don’t mind hacking the heck out of some Java to make it work.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T22:14:06+00:00Added an answer on May 15, 2026 at 10:14 pm

    I solved my own problem. For those of you who are curious, check this out:

    public abstract class MyTestHelper extends RationalTestScript
    {
    
        protected void useParentDataPool() {
            if(this.getScriptCaller() != null) {
                IDatapool dp = this.getScriptCaller().getDatapool();
                IDatapoolIterator iterator = DatapoolFactory.get().open(dp, "");
                if(dp != null && iterator != null) {
                    //if the datapool is not null, substitute it for the current data pool
                    this.dpInitialization(dp, iterator);
                }                           
            }
        }
    
    }
    

    This will use the same iterator too. Happy hunting…

    Actually, after some reflection, I made a method that would make any given script use the Root calling script’s DataPool. Again, happy hunting to those who need it…

    /*
     * preconditions:  there is a parent caller
     * postconditions: the current script is now using the same datapool / datapool iterator as the root script
     */
    protected void useRootDataPool() {
        //if there is no parent, then this wouldn't work so return with no result;
        if(this.getScriptCaller() == null) return;
    
        //assume that we're at the root node to start
        RationalTestScript root = this;
        while(root.getScriptCaller() != null) {
            root = root.getScriptCaller();
        }
    
        //if this node is the root node, no need to continue.  the default attached datapool will suffice.
        if(this.equals(root)) return;
    
        //get the root's data pool (which would be the parent's parent and so on to the topmost)
        IDatapool dp = root.getDatapool();
        if(dp != null) {
            //check to make sure that we're not trying to re-initialize with the same datapool (by name)
            //if we are, then leave
            if(dp.getName().equals(this.getDatapool().getName())) return;
    
            //this basically says "give me the iterator already associated to this pool"
            IDatapoolIterator iterator = DatapoolFactory.get().open(dp, "");
            //if we have an iterator AND a data pool (from above), then we can initialize
            if(iterator != null) {
                //this method is never supposed to be run, but this works just fine.
                this.dpInitialization(dp, iterator);
                //log information
                logInfo("Using data pool from root script: " + root.getScriptName());
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.