sanathkd
5 years agoOccasional Contributor
Creating databaseConnectionContainer in readyapi using groovy script
I know below groovy scripts are used to get JDBC details from the ReadyAPI tool. ========================================
jdbcName = context.testCase.testSuite.project.databaseConnectionContainer....
- 5 years ago
sanathkd :
You can create using below lines ://Get test env where you require changes. def env=testRunner.testCase.testSuite.project.getEnvironmentByName("EnvName") //Get getDatabaseConnectionContainer for that environemnt. dbContainer= env.getDatabaseConnectionContainer(); // Add new connection def connection = dbContainer.addResource(conName) //Set all properties. connection.setDriver(driver) connection.setConnectionString(conString) connection.<AnyOtherProperty>()
Thank you,
Sunil Devasya