I have some soapUI tests that use groovy scripts to insert some data into a table first
For this, I used the following code snippet:
def conn = context.dbConnEtopup conn.execute( "INSERT INTO A(ID, NAME) VALUES (1, "Johnny")" )
This works fine, however, I have many test scripts that now execute similar (if not the same) SQL statements, so I try to approach this by loading it from the properties file, so my actual SQL statement is only in one place, to simplify editing
However, my SQL statement that I am trying to use is actually 2 inserts (or deletes), so the loadable property is:
DELETE * FROM TABLE_A; DELETE * FROM TABLE_B;
conn.execute() cannot handle ; , which means that I can only use the first DELETE
How can I get around this? I do not want to load each property separately and execute them. Ideally, I just want one property, so I can add additional instructions for deletion in the future
Jimmy source share