Forum Discussion
- richieCommunity Hero
Hi,
I dont know couchbase myself - but I had a quick look around and I suspect it will be similar to other DB connections in SoapUI.
You use JDBC to connect to a database in SoapUI - so you need to determine the Couchbase JDBC connection string - something like the following:
jdbc:couchbase://[Host]:[Port]/[Database];
You'll need to investigate which version of Java Couchbase uses via JDBC and get the appropriate version of Java also. Just a note - Couchbase seems new and so will probably use a recent version of Java - I need to highlight that if the version of Java is too old - this will impact negatively with any groovyscripting you have in your soapui project (for example I had to use .jar files that were developed for java 2 - this broke my groovyscripts).
You'll also need to find the driver .jar files SoapUI will use to connect to the database.
I put together the following instructions for myself when connecting to a MIMER RDBMS - I'd follow these instructions and just swap out the couchbase relevant bits
1. Install relevant version of JDK - that your Couchbase DB .jar files use to create a JDBC connection 2. Ensure PATH environment variable doesn't point to another version of Java 3. Set JAVA_HOME to JDKvX.Xs bin directory (e.g. C:\jdkv1.8\bin) - e.g. at command prompt run 'set JAVA_HOME=%JAVA_HOME%;C:\jdkv1.8\bin' 4. At command prompt run 'java -version' to ensure it's picking up JDKv1.8 rather than other versions of Java 5. Download the couchbase jdbc driver file (???????.jar) and copy this to 'C:\Program Files\SmartBear\ReadyAPI-n.n.n\bin\ext' 6. Create or update the CLASSPATH environment variable, pointing to the location of the .jar file. Run the following command via command prompt 'set CLASSPATH=%CLASSPATH%;C:\Program Files\SmartBear\ReadyAPI-n.n.n\bin\ext' 7. Within SoapUI's JDBC preferences, add in an entry - 'Driver column' value = 'UniqueIdentifier/com.couchbase.jdbc.Driver'. In the 'Connection String Template' column add in the value 'jdbc:couchbase://[Host]:[Port]/[Database];'
Hopefully something like the above will sort your connection.
I should highlight that I struggled with the connection string for the MIMER db - I had to alter it slightly from the published info to get it to work - but that was the major problem I had
have a look here for the info you need for drivers, connection strings etc.
cheers,
rich
- mgrovesNew Member
Hello,
I'm not familiar enough with Soap UI, but I am familiar with Couchbase. I can tell you that Couchbase does not ship with ODBC or JDBC support at this time. However, there are ODBC and JDBC drivers available from third parties Simba and CData: https://developer.couchbase.com/documentation/server/current/connectors/odbc-jdbc-drivers.html
Couchbase also has a REST API available. If you're interested in using that API to run N1QL queries (N1QL is Couchbase's implementation of SQL), you can do so: check out the N1QL REST API documentation here: https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-rest-api/index.html
Related Content
- 4 years ago
- 4 years ago
- 7 years ago
- 5 years ago
Recent Discussions
- 2 days ago
- 5 days ago
- 16 days ago