cancel
Showing results for 
Search instead for 
Did you mean: 

How to work with mongo db with TestComplete

SOLVED
Highlighted
New Contributor

How to work with mongo db with TestComplete

Hi,

I want to integrate mongo db with TestComplete. After all the research I came up with a conclusion that we need to use ADO.Net for that. Can anyone please help me how to set the provider and DNS for that?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: How to work with mongo db with TestComplete

Hi @MonS,

I saw several discussions around the Mongo DB in the Community before. Here is one of them:

https://community.smartbear.com/t5/TestComplete-Functional-Web/Can-anyone-help-me-how-to-access-Mong...

 

Please check if the solution listed there works for you.

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

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

11 REPLIES 11
Highlighted
Community Leader

Re: How to work with mongo db with TestComplete

Some info here:

https://mongodb.github.io/mongo-java-driver/3.8/javadoc/com/mongodb/ConnectionString.html

 

Remember to uses same bitnesss between driver and TC

 

 

Un sourire et ça repart

Highlighted
Community Hero

Re: How to work with mongo db with TestComplete


@MonS wrote:

Hi,

I want to integrate mongo db with TestComplete. After all the research I came up with a conclusion that we need to use ADO.Net for that. Can anyone please help me how to set the provider and DNS for that?


TestComplete has the ability for creating ADO connection objects

https://support.smartbear.com/testcomplete/docs/reference/program-objects/ado/index.html

 

So long as you have all the necessary drivers and such set up, you should be able to do whatever you want in Mongo.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
New Contributor

Re: How to work with mongo db with TestComplete

Hi BenoitB,

Thanks! 

 

As my framework supports javascript, is there anyway we can make the connection between mongoDB and Testcomplete. The ADO code I am using is like:

 

// Create and open a connection to the OrdersDB.mdb database
var Conn = new ActiveXObject("ADODB.Connection");
/*Conn.ConnectionString = "Provider=;" +
"Data Source= mongodb://localhost:27017/myproject"; */
Conn.ConnectionString = "mongodb://localhost:27017/TS";
Conn.Open();

 

What should be the provider value and data source value?

Highlighted
Community Leader

Re: How to work with mongo db with TestComplete

I dont know which provider you must use.

MSDASQL.1 perhaps ? ADO provider for ODBC driver ?

 

You should ask for a correct connection string into MongoDB forum and please  back here to tell us what is the solution unless someone else here know the solution ?

https://www.mongodb.com/community-support-resources

 

Un sourire et ça repart

Highlighted
Community Manager

Re: How to work with mongo db with TestComplete

Hi @MonS  please let us know if you have any updates on the issue and if the Community can be of more help. Also, if you got your answer already please mark the best answer as a solution:smileyhappy:


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Manager

Re: How to work with mongo db with TestComplete

Hi @MonS , any updates on this?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
New Contributor

Re: How to work with mongo db with TestComplete

Hi Sonya,

I am still on it. I tried setting up a DSN for mogo ODBC driver and used it in my script.

I am getting the below error:

[MySQL][ODBC 1.0(w) Driver]Lost connection to MySQL server at 'waiting for initial communication packet', system error: 10060

 

Can someone help me with this error?

Highlighted
Community Manager

Re: How to work with mongo db with TestComplete

Community Heroes, more help here is appreciated🙂

 

@tristaanogre @Marsha_R @cunderw @AlexKaras 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Community Leader

Re: How to work with mongo db with TestComplete

@MonS  did you ask to mongoDB community forum ?


Un sourire et ça repart

New Here?
Join us and watch the welcome video:
Top Kudoed Authors