Ask a Question

How to work with mongo db with TestComplete

SOLVED
MonS
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?

11 REPLIES 11
BenoitB
Community Hero

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

tristaanogre
Esteemed Contributor


@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
MonS
New Contributor

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?

BenoitB
Community Hero

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

sonya_m
SmartBear Alumni (Retired)

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

sonya_m
SmartBear Alumni (Retired)

Hi @MonS , any updates on this?


Sonya Mihaljova
Community and Education Specialist

MonS
New Contributor

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?

sonya_m
SmartBear Alumni (Retired)

Community Heroes, more help here is appreciated🙂

 

@tristaanogre @Marsha_R @cunderw @AlexKaras 


Sonya Mihaljova
Community and Education Specialist

@MonS  did you ask to mongoDB community forum ?


Un sourire et ça repart

cancel
Showing results for 
Search instead for 
Did you mean: