Conversation
| ) | ||
| passed = "PASSED" if passed else "FAILED" | ||
| print( | ||
| f"[{passed}] {self.request.endpoint.name}::{self.request.name}::{self.name}" |
There was a problem hiding this comment.
We need to iterate here to check if there are more parent endpoints
7b85f08 to
b19b924
Compare
|
@camilamaia your pull request is missing a changelog! |
94f8b71 to
8989cd5
Compare
| @@ -1,3 +1,2 @@ | |||
| [pytest] | |||
| addopts=-svvl | |||
| bdd_features_base_dir = tests/functional/features/ | |||
There was a problem hiding this comment.
We are not using pytest-bdd anymore
| try: | ||
| assert eval(code) | ||
| return (True, None) | ||
| except AssertionError as ae: |
There was a problem hiding this comment.
| except AssertionError as ae: | |
| except AssertionError: |
| if self.is_root or not self.parent.name: | ||
| return name | ||
|
|
||
| return "::".join((self.parent.name, name)) |
There was a problem hiding this comment.
| return "::".join((self.parent.name, name)) | |
| return f"{self.parent.name}::{name}" |
|
|
||
| @classmethod | ||
| def evaluate(cls, sequence, vars): | ||
| def evaluate(cls, sequence, vars, is_a_test_case=False): |
There was a problem hiding this comment.
this is_a_test_case looks kind of scattered all over
There was a problem hiding this comment.
@winstonf88 Hmmm indeed... Any ideas of how to minimize it?
There was a problem hiding this comment.
I tried to isolate it a bit more in a separated evaluate_assertion method, but we can do better in the future for sure.
There was a problem hiding this comment.
Really cool! it's much more isolated. Great job.
5cd5201 to
6c716d5
Compare
gillianomenezes
left a comment
There was a problem hiding this comment.
This is a pretty cool feature!
Description
TestingNode:
When tests passed:
When a test fails:
Loading file .scanapi.yaml Loading file api.yaml Writing documentation Making request GET http://demo.scanapi.dev/api/health/ [PASSED] scanapi-demo::health::Response Status is 200 [PASSED] scanapi-demo::health::Response Body Equals OK Making request GET http://demo.scanapi.dev/api/languages/ [PASSED] scanapi-demo::languages::Response Status is 200 Making request GET http://demo.scanapi.dev/api/devs/ [PASSED] scanapi-demo::devs::list_all::Response Status is 200 Making request GET http://demo.scanapi.dev/api/devs/ [PASSED] scanapi-demo::devs::looking_for_new_opportunities::Response Status is 200 Making request GET http://demo.scanapi.dev/api/devs/ [PASSED] scanapi-demo::devs::not_looking_for_new_opportunities::Response Status is 200 Making request POST http://demo.scanapi.dev/api/devs/ [PASSED] scanapi-demo::devs::new::Response Status is 201 Making request GET http://demo.scanapi.dev/api/devs/129e8cb2-d19c-51ad-9921-cea329bed7fa [PASSED] scanapi-demo::devs::details_not_found::Response Status is 404 Making request GET http://demo.scanapi.dev/api/devs/129e8cb2-d19c-41ad-9921-cea329bed7f0 [FAILED] scanapi-demo::devs::details::get::Response Status is 200 response.status_code == 300 is false Making request DELETE http://demo.scanapi.dev/api/devs/129e8cb2-d19c-41ad-9921-cea329bed7f0 [PASSED] scanapi-demo::devs::details::delete::Response Status is 200 Making request GET http://demo.scanapi.dev/api/devs/129e8cb2-d19c-41ad-9921-cea329bed7f0/languages [PASSED] scanapi-demo::devs::details::languages::Response Status is 200 The documentation was generated successfully. It is available at scanapi-report.mdCloses #11
Next Steps: