electric_Insura
14 years agoContributor
Script assertion - iterate through Datasource properties?
I have script assertions in a JDBC request step.
Since the request can return multiple database rows for a key, I need to validate the content of each row against a datasource.
For each column in the table, I have datasource properties like PTD_NAME_0, PTD_NAME_1, PTD_NAME_2, which give expected results for each row for a given key.
I am using an Excel datasource.
I would like to do something like this... pseudocode follows.
For (i = 0, i++) {
currentName = context.expand ( PTD_NAME_i )
}
I don't know how to
a) get all the datasource properties to be available to the script assertion
b) construct the context.expand statement on the fly.
Any help appreciated, including more efficient ways to do this - thanks.
Since the request can return multiple database rows for a key, I need to validate the content of each row against a datasource.
For each column in the table, I have datasource properties like PTD_NAME_0, PTD_NAME_1, PTD_NAME_2, which give expected results for each row for a given key.
I am using an Excel datasource.
I would like to do something like this... pseudocode follows.
For (i = 0, i++) {
currentName = context.expand ( PTD_NAME_i )
}
I don't know how to
a) get all the datasource properties to be available to the script assertion
b) construct the context.expand statement on the fly.
Any help appreciated, including more efficient ways to do this - thanks.