-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing completed for responder endpoints #75
base: master
Are you sure you want to change the base?
Conversation
for (let r of responders) { | ||
var responder = await UserModel.findOne({ | ||
_id: new ObjectId(r.id) | ||
}).lean(); | ||
let availbilityStatus = await AvailbilityService.checkAvailabilityStatus(r.id); | ||
if (availbilityStatus == true) count++; | ||
try{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i believe this is not needed (try catch block)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was something I had during debugging, I'll take it away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Responder endpoints checking should be in another file, they are no longer in the authentication flow.
For authentication tests. You should also check for invalid cases, like password incorrect etc. Try to hit all the different 4** http codes (e.g. 400). It is actually more important to test the error cases than it is the correct cases. Reason being correct cases can usually be checked by navigating the app itself.
Have you also been getting timeout errors? You can increase this timeout duration. |
I haven't been getting time out issues, which test case is this? |
It's more like I'm just retrieving the login tokens in those tests to be used in other test cases. Should I delete the test cases and retrieve login tokens separately? |
The authenticaiton ones |
It should instead be assumed to be working in the responder tests, done in the before block. If there were any issues with the authentication part, the authentication test block will catch it. Of course, all the other tests will fail too if that's the case. |
No description provided.