Good afternoon, greetings to all. I am sending the certification and it shows me an error when doing so.
It gives me an error in the test. In console, it tells me that he did not assign task 4. And actually I have. I don’t understand why it keeps giving me the error.
that’s my post
I am open to any help.
The advice for these training courses is to go back over the steps.
These courses aren’t designed to catch you out, and the troubleshooting is part of the learning experience.
However, I’ve done this course, and I can tell you straight away that you are missing a specific test for this assignment.
The following is taken straight from the documentation.
Assignment 4
For your final assignment, test that the response includes confirmation of the order success–in the created
and orderId
properties (one should be true, and the other should be a number).
Send and check the Test Results –as always, make your test fail also!
1 Like
I can’t understand, because I actually made the test fail. And it keeps throwing me an error, in fact., Look.
You really need to go back over the documentation and carefully read what is being asked.
pm.test('Order Success', () => {
pm.expect(response.created).to.eql(true);
pm.expect(response.orderId).to.be.an('number');
});
First of all, there are two assertions needed for that test to pass the final assessment.
Response created to eql true
Response orderID to be an number.
It’s not (to have eql) and you are not testing just the response as you do when your testing the status code. (It’s the small details that matter).
Both of these tests are covered in the previous exercise for “Get product code”. Hence the advice to please carefully read the instructions and go back over the course if you having issues. This course really isn’t there to try and catch you out.
In Testing, attention to detail is one of the most important skills. You need to be a good tester first, the technical skills come second.