Is there a better way to handle large "Includes"?

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
Jerryth31
Newbie
Posts: 19
Joined: Wed Jun 18, 2008 6:03 pm

Is there a better way to handle large "Includes"?

Post by Jerryth31 » Wed Jun 18, 2008 7:49 pm

I am prototyping a test tool for an application that has a large number of fields on several screens. The primary script uses Include>filename1, Include>filename2, etc. for the screens that will be used in that script.

I am concerned that as I get all of the fields on a screen coded (a GetValue and a SetValue for each field), my script will be getting really large.

Is this going to be an an issue for 100+ fields per screen with 3 or 4 screens per script?

Is there a better way?

Thx

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

Macros vs Includes

Post by gdyvig » Wed Oct 15, 2008 8:03 pm

I don't think there is any problem with scripts containing lots of includes r as size is concerned. You will need to be careful to initialize all your variables in your subroutines because they are global in scope and probably frequently reused.

We are using the macro command to make our scripts more managable. Each called macro script will be small and variables used in the called macro are local to it so reuse should be more reliable. Each called macro would handle the fields for a specific screen as in your case.

Each macro contains include statements for the common subroutines. The subroutines in the includes are very generic in nature, not specific to any particular screen. The included subroutines might be things like DoOCR, ReportResult, SendEmail, ParseMacroResult, and EventHandler.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts