Contributions
Re: how to access jdbc connection string set at environment level?
Thanks for the reply. This did help to address the issue. The 'groovyUtilsPro.getGroovySql' works very well and indeed it takes care of checking the environment mode. The first option using Environment opject complains as below. do we have to import a specific package or pass an object as argument instead of string? groovy.lang.MissingMethodException: No signature of method: com.eviware.soapui.impl.wsdl.support.connections.DefaultDatabaseConnectionContainer.getDatabaseConnectionByName() is applicable for argument types: (java.lang.String) values: [testDb] error at line: 36 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.5KViews0likes1Commenthow to access jdbc connection string set at environment level?
Hello, currently, I am using the below to get the connection string in groovy. This obtains the connection string from database container which is static across environments. Instead of this I want to get the connection string from the JDBC Connections tab from the soapui environments. Is there a way to do that? def ConObj = context.testCase.testSuite.project.databaseConnectionContainer.getResourceByName('testdb'); def constring = ConObj.getConnectionString(); def sql = Sql.newInstance(constring); sql.eachRow(<select statment>)Solved6 years agoPlace ReadyAPI QuestionsReadyAPI Questions2.6KViews0likes3Comments