Forum Discussion

MonS's avatar
MonS
New Contributor
5 years ago

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?

    • MonS's avatar
      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's avatar
        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

         

  • tristaanogre's avatar
    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.