Using Compass – The GUI tool for interacting with MongoDB

by: Meera M Bastian

MongoDB is the most popular NoSQL database. Unlike SQL,MongoDB isn’t based on the table-like relational database structure. Data is stored in a format called BSON (similar to JSON format) and use MongoDB query syntax for doing the operations.

MongoDB Compass is a graphical interface to interact with the MongoDB database management system. It comes in handy as it does not require prior knowledge of MongoDB query syntax. It is a convenient tool for Testers as it allows to perform the CRUD operations without manually writing queries.

Things to do:

  1. Download and install Mongodb compass in your system
  2. Once downloaded, connect to a host which can be done either by providing the connection string or by filling in the connection fields individually


  1. After collection is successfully established, you will be able to see the document and collections in it.

  1. Now, click on the collection in which you need to work. Under the options, enter the different criteria based on your action like filter, sort etc.

Here it retrieved the data based on the input given as userid = “198358” and sorted it by created date.

  1. We can add multiple criteria in the filter like below to fetch the data based on our requirement.

  1. Advanced options are also available here – like export data, Aggregations tab to use aggregate functions , explain plain to know the performance of query, indexes to view the indexes used in the collections,validation rules to view the constraint set during insert/updates.

  All these actions required to validate a MongoDB application, can be performed in compass, without the hassle of learning a new querying language syntax. MongoDB Compass is thus a champion for QA/BA’s working with MongoDB.

Relevant posts

Capture Real-Time Performance from UI using WDIO

The “wdio-performancetotal-service” plugin for WebdriverIO empowers you to capture real-time performance data from UI tests. By integrating this plugin, you can measure the response times of various UI procedures, identify potential bottlenecks, and make informed decisions to optimize and enhance overall performance. With detailed performance metrics at your disposal, you can improve the effectiveness of your UI testing efforts and deliver a high-performing application. The “wdio-performancetotal-service” plugin provides a valuable solution for ensuring optimal performance in your UI tests.

Dynamics 365 automation through RSAT

The Regression Suite Automation Tool (RSAT) significantly reduces the time and cost of user acceptance testing. It enables functional power users to record business tasks using the Finance and Operations task recorder and convert them into a suite of automated tests without the need to write source code.