Help to solve test cases student expert

Hello Guys can somebody help me to solve this issue.

You might want to share your public collection or at least show screenshots of your request body and collection variables.

The failures are telling you what is wrong.

The student expert course isn’t meant to catch you out, so its generally good advice to just re-read the instructions carefully.

Troubleshooting is part of the learning.

Hello Mike Actually i tried solving these issues and solved a few but stuck with these 2 issues. I Request you to guide me through this.

This is the first failing test.

//** [skillcheck] 5. Used a JSON body with 'actorName' */
pm.test(`5. [skillcheck] Used a JSON body with 'actorName; `, function () {
    const b = JSON.parse(req7.request.body.raw)

Req7 is the “skill check”.

It’s expecting a JSON body, where you have used a query parameter.

You’ve used a JSON body for the “add books” request, so use that for a reference.

This is the second failing test.

// ** [skillcheck] 6. Set "favoriteActor" as a collection variable using pm.collectionVariables.set(...) in  Tests tab script */
pm.test(`6. [skillcheck] Set "favoriteActor" as a collection variable using pm.collectionVariables set(...) in  Tests tab script`, function () {
    const studentScript = req7.event.filter(s => s.listen === 'test')[0].script.exec.join("\n")
    const pattern = /pm\.collectionVariables\.set\(["'`]favou?riteActor["'`]/

This is checking that you’ve set a collection variable called favouriteActor in the tests tab of the same skill test request.

You don’t have any code in the tests tab, so this is also failing.

Both of these test failures should have been resolved by carefully re-reading the instructions.

Thankyou so much ! I resolved my testcases.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.