Media Engine Tester

This blog post assumes that you are familiar with the Media Engine framework of ADAM.

There's a tool that is being deployed with ADAM that is little known, but can be very helpful when you have to test or troubleshoot an issue with a custom or out-of-the-box media engine on a production server.

The tool is called Adam.Core.MediaEngineTester and allows you to run any Media Action against any Media Engine. The biggest advantage is that you can run any of the media actions (like CreatePreviewImage, ResizeImage...) without actually having to create a record, creating an order... It enables you to limit your test completely to the media engine framework.

The tool itself is very basic. On the left side of the top panel, you can choose which media action that you want to execute and which engine you would like to use to execute this action. On the right side of the top panel, specify the registration and adam username of the database that you want to connect to. If you don't specify a registration name, the tool will use the default registration. If you don't specify a usernane, the tool will use Active Directory Authentication.

Next, in the bottom panel on the left side specify the parameters that the Media Action requires to execute your request. For example, if you choose the ReadContent action, you will have to specify the path to the file of which the content should be read (the path-argument) as well as the format of the file being read (the engineFormat-argument). This last argument is typically the extension of the file being read.

Then click the Run button. You will either get a message box back with the error message if the engine failed to execute this action, or you will get a result back in the right bottom panel as you can see in the screenshot above. You can ignore the fact that the IsSuccessful property indicates false in the result. This is a flag used by the MediaManager framework which is bypassed by this tool, so the value of this property is not reliable in this context. If you see a result, the engine successfully executed the action.

When the results are being displayed, the bottom right panel will display all information that is returned by the action's GetProperties method. This allows you to control which information is displayed if you're designing and testing a custom media action.

To test a custom media action or media engine using this tool, simply open the its config file Adam.Core.MediaEngineTester.exe.config and add an entry to the /configuration/Adam.Core.MediaEngineTester/MediaEngines-element or to the /configuration/Adam.Core.MediaEngineTester/Actions-element. All of the media engines and media actions that are provided by adam out of the box are pre-registered in these elements. For example:

XML
1
<add name="ReadXmp" type="Adam.Core.MediaEngines.ReadXmpMediaAction,Adam.Core"/>

Save the config file, restart the tool and you're ready to test.

Comments

Tuesday, 28 April 2009Alec Wadey says
This is great - I never knew about this and it will save me a lot of time! Thanks guys :)
Leave a comment
You must be logged in to post comments.
Sign in now
 
 
CATEGORIES
AnnouncementsDocMaker StudioEnginePageBuilderPIMSSales & MarketingSharePoint ConnectorWeb DevelopmentWebinarsWorkflow Studio
rss feed