Anyone got any ideas on re-using code in Test Partner across multiple MDB databases?
I was thinking along the lines of compiling a shared module or a class into a DLL?, (registering it?, referencing to it?) and then being able use intellisense to include its properties, methods etc in other scripts.
Anyone done this?
Are the Shared Modules in Test Partner available to all Test Partner MDB on the same PC anyway?
An example would be good.
Everything in a TP database is avaiable only to that database. If you create a shared module in a database, it means that you don't have to include it in any scripts or classes to use it (within this database).
If you want the code to be available in a different database, and you plan on modifying the code as time goes on, then you DLL idea is likely a good path to explore. Otherwise, if your code is good and you don't plan to change it, I'd just copy and paste the shared module from one DB into another.
Current AUT running test scripts on TP 6.3 build 183, SQL 2000 DB.
Legacy AUT running on TP 5.6.0 Build 81 and TP 6.2 build 449 with SQL 2000 DB.
TP/IE Clients on VMWare ESX 4.1 server, AUT Servers on VMWare ESX 3.5 server.
Application Under Test (AUT):
Client/Server based, IE 7/8 interface with SQL 2005/2008 DB.
The scope of the shared module is the project, not the database with the exception of the Common project.
From TP Help:
A shared module is implicitly included in all test scripts contained inside its own project. If it is created in the Common Project it, is implicitly included in all test scripts.
If creating shared modules in a Common Project, be aware that any name or word used in the shared module should not be used in a test script or function. This could cause compile errors that at first sight may not make sense. Also, large numbers of shared modules in either the Common Project or another project add potentially unnecessary overhead to the test scripts being played back. This may create the potential for memory overrun issues.