cancel
Showing results for 
Search instead for 
Did you mean: 

How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Frequent Contributor

How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Hi All,

 

I have a scenario where I have to connect to the MongoDB database and verify the records. 

 

Has anyone tried eshtablished a connection with MongoDB and fetched the query result? 

 

Looking forward for possible suggestions

 

Thanks,

Karthik K R

7 REPLIES 7
Frequent Contributor

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Hi All,

 

Does anybody has inputs/suggestions on how to eshtablish connection with MongoDB?

 

Thanks in advance.

 

Thanks,

Karthik K R

Community Hero

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Test complete does not support MongoDB out of the box. You will have to purchases a propiatery ODBC driver and setup up the connection that way. 

 

https://docs.mongodb.com/bi-connector/master/reference/odbc-driver/


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Community Hero

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

In addition to what was said by Carson:

I might remember it wrong, but I seem to read that MongoDB is essentially a local database. Which means it cannot be accessed over the network. This may be a problem if you need to access a database located, say, on mobile device.

 

Update: Well... It looks like it is possible, but requires some setup. For example: https://ianlondon.github.io/blog/mongodb-auth/https://medium.com/founding-ithaka/setting-up-and-connecting-to-a-remote-mongodb-database-5df754a4da...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Manager

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Hi @krkarthik_info,

 

Have you tried using ADO to get data from the DB? ADO is a standard Microsoft engine that is available from any application. ADO calls the required database provider (e.g. the Oracle provider) depending on the connection string, and it performs all operations with the database. The provider is supplied by the database vendor, and TC just passes the control to this provider. However, please keep in mind that TestComplete can work only with the 32-bit provider (see the Working With Databases article). 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Member

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Agreed...Having a separate ODBC driver is strongly recommended here.If u go for anything else it will just increase complications for you mypascoconnect

Frequent Contributor

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Thanks all for your suggestions/inputs.

 

Even I preferred to have a seperate ODBC driver to eshtablish a connection. I expected TestComplete would support direct connection eshtablishment with MongoDB, but unfortunately it doesn't.

 

Also ADO is not supported for MongoDB.

 

Thanks,

Karthik K R

Community Hero

Re: How to eshtablish a connection with MongoDB and fetch a query result through TestComplete

Hi,

 

> ADO is not supported for MongoDB.

ADO can use ODBC connection to access the database.

The question is whether or not remote connection to MongoDB is allowed.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2