Can you provide an example of a writable datasource in Virtualize?
Can you provide an example of a writable datasource in Virtualize?
Thanks,
JT
Answers
-
The Writable data source is not something you add to Virtualize responder suites. In fact, you won't see Writable in the Add Data Source dialog.
The Writable data source is something you can use in a Virtualize provisioning action suite or a SOAtest test suite. It is intended so one action/test can write lists of values down the rows of the Writable data source then have a subsequent action/test or suite iterate over the values, row-by-row. A Writable data source is written to by a Data Bank tool where you would configure one or more extractions that select a list of values and configure which Writable data source column to store those values.
1 -
Does it sound reasonable for me to handle persistence in a custom Java solution called through an extension tool? Thanks for the quick response. JT
0 -
For persistence, you have various options.
One option is to use the Correlation data source where you can use a relational (SQL) data base for persistence. See CRUD Support for SQL Databases in Virtualize
Data Bank values are also persisted across responder invocations. So, if you were to invoke one responder that has a Data Bank then you can make a second request to a completely different responder which can read the current value of that same Data Bank.
Or you can persist data some way through the Extension tool. Our scripting API provides a ScriptingContext object which has generic methods put(String, Object) and get(String) methods. You could call
suiteContext = context.getNamedContext("name of my responder suite")
to get the context for the responder suite. Then you can callsuiteContext.put("someKey", someValue)
to save a value andsuiteContext.get("someKey")
to retrieve it later.1 -
I will try this out and report back. Thanks very much for this info!
JT
0