Forum Discussion
ShivaniKamboj
Occasional Contributor
Yes , this could be solution if this script is having some logic which can be used anywhere in the project, but in case of DB connection I dont think would be of that Use.
Is there any way to use DB confiuration at Project level in Databases Menu in test scripts?
jhanzeb1
6 years agoFrequent Contributor
Hi,
def dbURL="jdbc:jtds:sqlserver://serverNme;databaseName=DBName;trusted_connection=yes "
def dbUsername = ""
def dbPassword = ""
You can store individual components of the connection in custom props, i.e username, pw, db name etc. the whole connection cannot be stored in custom props as one.
If you do want to go via groovy route then easier method would be script library as Mo mentioned.
Related Content
- 4 years agoPUM-Prodat-SQL
- 7 years agoGaleG