anantsan
(Sanjay Ananthanarayan)
November 9, 2020, 5:25pm
1
I am able to get all but one test passing in test collection. When I go back through my requests, the only one that does not pass is Get Specific players.
the error I get is:
There was an error in evaluating the test script: TypeError: Cannot read property ‘length’ of undefined
This is my code in the test scripts:
var player_list=pm.response.json().data.players;
pm.environment.set(‘player_id’, player_list[Math.floor(Math.random() * player_list.length)].id);
anantsan
(Sanjay Ananthanarayan)
November 9, 2020, 5:26pm
2
Actually never mind. just figured it out. All my tests in the test collection pass. How to submit to attain the Postman Student Expert badge.
the link to my postman is https://www.getpostman.com/collections/7113b113bc0bbf5ca6ff
suesmith
(Sue Smith)
November 9, 2020, 5:31pm
3
Hi there, the skill check response includes the link to submit your collection to, lots of existing conversations under the training tag !
anantsan
(Sanjay Ananthanarayan)
November 9, 2020, 5:33pm
4
@suesmith Just submitted the form. when should I get badge?
anantsan
(Sanjay Ananthanarayan)
November 9, 2020, 5:34pm
5
@suesmith All tests passing in test collection means I am good to go right?
Hey @anantsan
As mentioned, on the top of the form that you have just used to submit your Collection:
you can expect to receive your badge(s) within a week or two!
anantsan
(Sanjay Ananthanarayan)
November 9, 2020, 5:46pm
7
@danny-dainton Thanks for the help.
Having the same issue. No luck so far with the “TypeError: Cannot read property ‘length’ of undefined” despite following the instructions.