# Day 02: Collections and environments | AssertionError

**URL:** <https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280>\
**Category:** Help Hub\
**Tags:** 30-days\
**Created:** [November 15, 2024, 12:30pm UTC](https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280 "2024-11-15T12:30:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![maintenance-saganis4](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@maintenance-saganis4](https://community.postman.com/u/maintenance-saganis4)\
**Post date:** [November 15, 2024, 12:30pm UTC](https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280/1 "2024-11-15T12:30:03Z")

</div>

Hi,

I am working on the “Day 02: Collections and environments” in the “30 days of Postman - for developers”.

When I submitted my solution, I came across the “New request added | AssertionError: check parameters: expected 1 to equal 2” error.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/d/4/d42b484f78517d361fd7c39fe1d7a0541104ddcf.png)

It seems that I set up everything correctly. Please refer to the following screen shots.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/7/f/7f1f862e2084a358a4a2a779eb4c23110ace0cea.png)

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/8/b/8b94017f43fe208a55d69359fc1c622b050b39df.png)

Could someone advise me how to resolve this error?

Best,

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [November 15, 2024, 1:02pm UTC](https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280/2 "2024-11-15T13:02:09Z")

</div>

The screenshots posted have nothing to do with the failing test.

You need to show the request(s) from the collection.

The relevant info from the documentation…

> **Add a request:** Rename the request from `echo` to `POST raw text`. Then, duplicate the request in this folder, and rename the second request `GET with query params`. Update the new request HTTP method to `GET` and update the request URL from `/post` to `/get`. Add two [query parameters](https://learning.postman.com/docs/sending-requests/requests/#sending-parameters). This can be anything you like, for example, `foo` and `bar` or `name` and `ferret`. **Send** to make sure you get a 200 status code.

The important part being.

> Add two [query parameters](https://learning.postman.com/docs/sending-requests/requests/#sending-parameters). This can be anything you like, for example, `foo` and `bar` or `name` and `ferret` . **Send** to make sure you get a 200 status code.

When you have failing tests, I can only suggest that you look at the scripting tabs of the submit request and look for the failing test to understand more about what the failing test is actually doing.

```auto
pm.test("New request added", () => {
    pm.expect(folder.item.length, 'check number of requests').equals(2)

    let newRequest = folder.item.find(req => { return req.name === "GET with query params"})
    pm.expect(newRequest.name, 'check name').equals("GET with query params")
    pm.expect(newRequest.request.method, 'check method').equals("GET")
    pm.expect(newRequest.request.url.query.length, 'check parameters').equals(2)
    pass += 1
})

```

---

<div class="post-metadata">

**Author:** ![maintenance-saganis4](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@maintenance-saganis4](https://community.postman.com/u/maintenance-saganis4)\
**Post date:** [November 19, 2024, 3:41am UTC](https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280/3 "2024-11-19T03:41:17Z")

</div>

Hi,

Thank you for your reply.  
I resolved the issue. I needed to add 2 params to pass the test.  
Thank you again for your help.

Best,

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [November 19, 2024, 3:11pm UTC](https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280/4 "2024-11-19T15:11:49Z")

</div>

Mmmm, marking your own post as the answer!

---

<div class="post-metadata">

**Author:** ![mike-sop-rossiter](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@mike-sop-rossiter](https://community.postman.com/u/mike-sop-rossiter)\
**Post date:** [January 27, 2025, 12:48pm UTC](https://community.postman.com/t/day-02-collections-and-environments-assertionerror/71280/5 "2025-01-27T12:48:12Z")

</div>

lol yes I had the same problem as I read two query params to mean  
foo = bar = 2 query params.  
so I added.  
foo = bar  
a = b  
and it works. semantics of languages eh!  
{{baseURL}}/get?foo=bar&a=b
