MongoDB shell

Use the aggregation pipeline

Hard120 pts~45 min
  • Acme Document Store
Practice app · Acme Document Store

An in-browser MongoDB-compatible document store with users, orders and products collections.

Test URL
/lab/databases-use-the-aggregation-pipeline

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Use the aggregation pipeline. Practise it against the Acme Document Store practice application (An in-browser MongoDB-compatible document store with users, orders and products collections.).

Your task

  1. 1Open the practice application at the test URL shown above and wait for it to finish loading.
  2. 2Inspect the page to find the elements you need — key elements include #collection-browser, #mongo-editor, #run-mongo.
  3. 3Write and run a test that demonstrates: use the aggregation pipeline.
  4. 4Finish with at least one assertion on a user-visible outcome, not an internal detail.

Acceptance criteria

  • The test runs to completion without errors.
  • The test contains at least one passing assertion on a user-visible outcome.

MongoDB shell · Databases · MongoDB & NoSQL