Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UFT Connection with Mongo DB
#1
Hello Everyone,

Does any one use Mongo DB along with UFT?
I want to connect to Mongo DB and search for data, so needs to know about required drivers and query pattern.

but the very first thing, whether UFT supports Mongo DB?
Reply
#2
I'm not really sure if the latest UFT version supports MongoDB. You may refer the product availability matrix (PAM.pdf) for the same. However, here is a workaround if it doesn't.
You can connect to MongoDB using .net/java languages since there are drivers for it.
Create a java jar which exposes methods like connect, execute, disconnect etc on MongoDB and call them from vbscript. This jar should also save the output of a query to excel. You can then invoke this jar or (executable jar) from command prompt and have the output sent to excel which can be used furthur for validations.
Code:
Systemutil.Run "cmd.exe"
Window("object class:=ConsoleWindowClass").Maximize
window("object class:=ConsoleWindowClass").Type "cd <location of executable jar"
window("object class:=ConsoleWindowClass").Type <excutablejar.jar>
window("object class:=ConsoleWindowClass").Type micReturn
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)