How to see details of test scripts

In case, I fail the test in the challenge but have no idea why it fails. It will be helpful if I can see what exactly the test script is testing. Is there a way to see the code of each test script? Many thanks.

1 Like

click on the number of passed tests and you see which ones are failing

Sorry. I don’t understand where I can find the number of passed tests.

I am taking the following challenge: https://www.freecodecamp.org/learn/quality-assurance/quality-assurance-and-testing-with-chai/run-functional-tests-on-an-api-response-using-chai-http-iv—put-method

I passed all the tests except the first one, which reads “All tests should pass.” but I have passed all just except this one. I have no idea what is actually being tested. So I would like to see the source code of the test script. Is it possible and how?

I agree. I would love to see a reason when there is a failure. Sometimes opening the network tab can be helpful.

I do understand that there needs to be some tests that you can’t see the exact assertion because otherwise students could just hardcode solutions

1 Like

It seems I did not understand which challenges you were talking about

It is being discussed here, you can join the discussion

1 Like

Thank you, ilenia. That implies there is no way to see the codes of the test scripts at present unless disclosed specifically by the internal staff.

Well, anyone can go to the repo and look at the tests. But they aren’t exposed as part of the challenges and you have to know about them.

As evident by me opening that issue I do agree that coding against tests you can’t look at is not ideal. Having assert messages is not the same as seeing the tests. A better TDD-driven challenge experience should in my opinion (ideally) better expose the tests (not just for the backend part of the curriculum).

It is in part a technical issue as to how to do it and it doesn’t really work the same for all parts of the curriculum.

2 Likes

you can go to the challenge file to see the tests, but there is being discussed how to show more infos to the user

1 Like

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