10-26-2016 10:14 AM
How can i log results to more than one database, using "database options callback".
It's working with one DB.
Using the report options pane, it working with multiple databases
Solved! Go to Solution.
10-26-2016 02:39 PM
What version of TestStand are you using?
If you are using 2013 or later then just add another db plugin.
10-26-2016 04:48 PM
2014, but i dont want to use the plugin.
I want to configure it in my seq. Via the callback.
and why do i have to have at least one "dummy" database row in reporting plugin, to make database options callback Work. ?
the same goes for a ATML report. No "dummy" plugin no report via report options callback
10-26-2016 04:56 PM
It's because the plugins are what is calling the callback. The callback is useless if you don't have the plugin turned on.
They recently redid the process model so that the reporting/database logging is no longer interleaved throughout it. The pushed it all to a plugin architecture so it is abstracted away from the model. this allows you much much much more flexibility with reporting and logging.
By the way, those aren't "dummy" databases or ATML you are seeing. without those you wouldn't get a report or log to the database at all. And by simply adding another database plugin like my picture you automagically are now logging to 2 databases. Of course you would need to configure each one to point to the correct database. Seems fairly simple and straight forward.
Each could be configured through the callback. Just key off of this name: Parameters.ModelPlugin.Base.DisplayNameExpression
I just tested this and it works great.
Regards,
10-27-2016 07:46 AM
What do you mean by
"Just key off of this name: Parameters.ModelPlugin.Base.DisplayNameExpression"
(see attachment)
I have e.g. 2 databases. Each one is set up in the plugin-pane.
how do i log same data "twice" i.e. in each database ?
does "DisplayNameExpression" refer to the name of the "plugin", and how do i refer to bot of them ?
10-27-2016 08:32 AM
In order for them to log anything they need to be enabled.
Also, I don't see anything in your screen grabs that shows: Parameters.ModelPlugin.Base.DisplayNameExpression. I am using 2014 and I have a parameter named that when I pause in the Database Options callback. Your Database Options callback is going to be called twice, because you have 2 database plugins. One is for DB1 and the other is for DB2. Parameters.ModelPlugin.Base.DisplayNameExpressioin should contain DB1 and DB2 respectively. You need to use that to set the DatabseOptions correctly for each of the DBs. Because you want one plugin to point to one set of options and the other to point to a different set of options.
I've attached an example of what I mean.
Also, here are screengrabs for how you need to set it up:
10-27-2016 08:39 AM
I gues that technically they don't need to be enabled in Result Processing because you can enable/disable in the DatabaseOptions Parameter.
10-27-2016 10:22 AM
If I enable them, the setup is just relflecting what is typed in plugin-pane.
I want the setup to be controlled 100% by my sequence.
With report options callback (only one report) i don't enable the report plugin (but it must be there)
If I disable them i get nothing, because somehow the precondition is not evaluated correctly. It seems it is actually reading the database names from plugin Pane, but the steps are still skipped.
my seq. is attached
10-27-2016 10:32 AM
I see what's going on. It needs to this:
Parameters.ModelPlugin.Base.DisplayNameExpression == "\"DB1\""
For some reason it has quotes in there.
One thing to consider is you can override the ModelPluginConfiguration callback and inject the database plugins so that way the user doesn't have to have anything set in Result Processing. Just a thought if you want it all completely done by your client file.
11-01-2016 05:34 AM
In my attached seq i am only changing the DatabaseOptions parameters, not the ModelPlugin.
Without enabling the to "databases" in the plugin pane, it is now logging to 2 databases.
I find it very difficult to comprehend these features in Teststand. Is there any good documentation somewhere ?
How do I override the ModelPluginConfiguration callback and inject the database....Can you upload an example, or give a link to documentation ?
thanks a lot for your valuable support !!!