Custom testplan runner as a plugin

Executing a custom test plan runner (basically the RunTestPlan example from SDK as a .exe) from Keysight TA installation folder will require and grab a TA license (TAP_Engine). How can this be avoided?

The PackageManager.AddAssemblyLoadFilter() seems to be helpful, but I cannot get it to work and found no example using this method.
I want to be able to use same set of installed plugins in TA and the runner and manage these with PacketManager.exe .

Same thing happens if running from some other folder and setting: PluginManager.DirectoriesToSearch.Add(@“C:\Program Files\Keysight\Test Automation”)

The reason for the license check is that you have a licensed Keysight installation. For Keysight to be able to distinguish between licensed and community supported installations, license checks are added to the commercial installations.

There are a few options, but the best way to avoid installing any licensed products together with a standalone test plan runner is to base it on the OpenTAP installer from OpenTap.io and then manually install your collection of packages using tap package install.

Thats what I’m trying to avoid, having one set of installed packages for the test plan runner and another set for editing the test plan is far from ideal.
I was hoping it would be possible to package the runner .exe as a plugin for the TA installation. It works but the runner then grabs a license when running the test plan.

OK, I understand now.

If you want Editor and your custom runner in the same installation, without a TAP_Engine license check, you can remove the KS8000 package. This way the installation is becomes not fully supported by Keysight, but that should achieve what you want.

Yes, I found out that myself. Removing the KS8000 package seems to fix the problem and TA Editor still works as I understand. Raises a question why the KS8000 package/TAP_Engine is needed/installed since the engine is not licensed…

However, there are other Packages incl. with the Dev system/Editor that cannot be removed that the test plan runner (in TA installation) will load.
There should be a way to control what Packages the runner should (not) load. From the sparse documentation the AddAssemblyLoadFilter() method in the API seems to do this but I have not yet got it to work?

To clarify the first part, the KS8000 package marks the installation as having commercial Keysight support and warrant. That works by having the TAP_Engine license check and some watermarking here and there (Currently mostly log files) to allow a Keysight representative to verify it. Normally, this is not an issue as KS8000 is only bundled with the PathWave Test Automation installers, for which most part has license checks already.

As for the second part, the way OpenTAP really supports not loading a plugin is by not having it in the installation folder, or by having it in a folder marked with a ‘.OpenTapIgnore’ file.

There is a small section on .OpenTapIgnore this in the Developer Guide.

The general idea is that you have an expectation of what kinds of plugins are available based on the packages installed, if you start excluding certain DLLs from being loaded for some applications a test plan that works in one application might not work in another.

Why do you need to block some DLLs from being loaded?

Thanks for the explanation re. KS8000 package.

As I see it:
When deploying to system(s) in production you often need to have the dev env. (TA) installed besides your test plan runner on the production PC’s. This for (occasionally) debugging of the test plan on the ‘real’ system.
In this case you also want your runner and TA to use exactly the same set of plugins (and Settings).
Unfortunately, this is only possible by installing the runner in the TA installation folder.
This seems to work fine but the side-effect is the runner will install all Packages from the TA incl. the KS8000 and several other.
To avoid the runner grabbing a TA license the KS8000 package can be removed (I guess it will be re-installed when updating TA next time?)
But there are several other Packages included with TA that cannot be removed. They are not used by the runner and just increases the footprint. Thats why I want to block them.
Perhaps there should be a way in the API to specify packages that should not be loaded?

When you start OpenTAP, it will scan the directory for plugins to load. This takes more time for each plugin installed, but not a lot. With a few packages installed it usually takes in the order of 50-100ms. You can check the “Searched X assemblies” message to see how long this took.

It only actually loads the assemblies when something needs it, for example when a test plan is loaded or a step is inserted into the test plan.

I think in the default TA installer there are a few other packages you could remove like the Timing Analyzer and Results Viewer, although that would break the Developer’s System package.

And yes, you would have to uninstall again after updating, because that installer installs the Developer’s System package, which requires all these other things.

But of course, if we can identify a way to improve the installer in a generic way it is something we can consider adding.

Maybe you can clarify what you mean by footprint? Is it disk foot print, memory or CPU?