Delete a record using Mongo Query DB Tool

ParasofttoudayaParasofttoudaya Posts: 232 ✭✭


Facing issue in delete call using mongo query db tool. When we try to delete using db.collectionName.remove is not possible as it accepts request only json.
Please share the possible way to delete the record in mongo


  • benken_parasoftbenken_parasoft Posts: 975 ✭✭✭

    As its name suggests, the "MongoDB Query Tool" is query-only. It fetches the collection with the name provided in the Collection field and will perform a "find" on the collection based on the provided query and projection arguments. No other operations on the collection are supported including things like "drop", "delete", "insert", or "update".

  • ParasofttoudayaParasofttoudaya Posts: 232 ✭✭

    Same set of querying right? Why not it can be used for delete?

  • benken_parasoftbenken_parasoft Posts: 975 ✭✭✭

    The tool only support the "find" operation which can only query documents from a collection object. If the "MongoDB Query Tool" was ever enhanced to perform more then just queries then we'd probably have to rename it to just "MongoDB Tool" (or something). :)

    If needed, you can use the MongoDB java API from an Extension Tool to perform whatever you need, including non-query operations. See their quick start which has code examples.

  • ParasofttoudayaParasofttoudaya Posts: 232 ✭✭

    Sure.. is there anyway in near future parsoft team add this to the tool?

  • benken_parasoftbenken_parasoft Posts: 975 ✭✭✭

    is there anyway in near future parsoft team add this to the tool?

    You would need to discuss with your technical representative from Parasoft.

  • ParasofttoudayaParasofttoudaya Posts: 232 ✭✭

    Sure Thanks Let my soa team know this.

  • anarraanarra Posts: 3

    Hello, per Parasoft guidelines I tried adding MongoDB Query tool jar to my SOA Test & Virtualize 9.10 version. When I click on Add Jars button of System properties section, I see only mongo-java-driver under org.mongodb and didn't find mongo db query tool. Can someone help me adding mango db query tool to my soa test?

  • OmarROmarR Posts: 229 admin
    edited June 2018


    Did you get a chance to restart SOAVirt after adding your mongodbquerytool.jar file to system preferences? After restart, it should appear in your tools selection when adding a new test to your test suite.

Sign In or Register to comment.