For the purposes of this bug bash, we will focus on testing the following key features of the VS Code Extension:
- Query Editor
- CRUD Documents
- View documents table/treeview/json
- Download data from query
- Upload query
Please report any bugs found during testing here.
To begin, if you do not already have a sample Cosmos DB for MongoDB (vCore) account, create one using the Azure portal
To manually install the Visual Studio Code (VS Code) extension from a VSIX file, you can do the following: Download the latest VS Code Extension Release: vscode-cosmosdb-0.23.1-alpha-PrPr-25.10.2024
- Click the Extensions icon at the bottom of the Activity Bar
- Click the More button in the top right corner of the Extensions view
- Select Install from VSIX
- Select the VSIX file in the file browser or in your downloads folder.
- Click Install
- Click Reload to activate the extension
Ensure you have the Azure Cosmos DB for MongoDB vCore extension installed in your Visual Studio Code environment. This extension is crucial for managing and interacting with your MongoDB vCore clusters seamlessly.
After signing in to Azure, choose the subscription associated with your MongoDB vCore cluster. This step links your VS Code environment with your Azure resources.
Navigate to the Azure Resources section in VS Code. Locate the item labeled Azure Cosmos DB for MongoDB (vCore) and expand it to reveal your available clusters and databases.
Identify your cluster in the expanded tree view and select it. This will open the details and management options for your cluster.
When prompted, enter the admin password for your MongoDB vCore cluster. This step is necessary to authenticate your session and securely manage your database.
- Scenario: Use the MongoDB extension in Azure to create a new database named
RestaurantDB
and a collection namedRestaurants
. - Action:
- Open the MongoDB extension.
- Create
RestaurantDB
. - Add a collection named
Restaurants
. - Insert sample data into the
Restaurants
collection. Data can be found in this repo.
- Scenario: Query to fetch all open restaurants.
- Action: Enter the following command in the Filter textbox:
{ "is_open": 1 }
- Expected Result: A list of open restaurants.
- Scenario: Display the names of open restaurants and their Monday working hours in a table view.
- Action: You can filter open restaurants with the following command:
{ "is_open": 1 }
- Task: Capture a screenshot of the table view showing the names and Monday hours. You can view the hours by double-clicking on the hours of operation field. To return to the root level, click the Root level button at the bottom left of the screen.
- Scenario: Modify the Monday working hours for one of the open restaurants.
- Action: Update the entry using this filter:
{ "name": "Shalhoob's Funk Zone Patio" }
- Task: Capture and share a screenshot of the updated entry in the table view, with the new name "Cosmic Restaurant."
- Scenario: Remove a closed restaurant named "Minnow Cafe."
- Action: Use the following command to find the entry:
{ "is_open": 0 }
- Expected Result: Confirmation of deletion.
- Scenario: Insert a new restaurant entry into the collection.
- Action:
{ "business_id": "abc123def456ghi789jkl", "name": "Golden Gate Catering Services", "address": "123 Culinary Ave", "city": "San Francisco", "state": "CA", "stars": 4.5, "review_count": 15, "is_open": 1, "categories": "Caterers, Event Planning & Services, Food, Professional Services", "hours": { "Monday": "8:0-20:0", "Tuesday": "8:0-20:0", "Wednesday": "8:0-20:0", "Thursday": "8:0-20:0", "Friday": "8:0-20:0", "Saturday": "10:0-18:0", "Sunday": "Closed" }, "location": { "type": "Point", "coordinates": [ -122.419416, 37.774929 ] }, "description": "### Business Summary\n\nGolden Gate Catering Services, based in San Francisco, CA, is renowned for delivering exquisite culinary experiences for a variety of events. ..." }
- Expected Result: The new entry should appear in the collection.
- Scenario: Export all documents where
is_open = 0
. - Action: Use the following command to filter the results:
{ "is_open": 0 }
- Task: Export the results to a JSON file and count the number of documents in the file.
- Expected Result: A new file containing all documents with
is_open = 0
, along with a document count summary.