Replies: 2 comments 2 replies
-
Taking the OSS Review Toolkit (ORT) project as an example, I believe that this approach is a good one: Utilize separate directories for testing within the ORT project. Each of these directories is designed to contain the expected results, which are crucial for successful testing. For example, consider the bundler > funTest > synthetic within the ORT project. This can provide a clear illustration of this testing strategy. (Explore others here) Additionally, the analyzer > funTest > synthetic within the ORT project demonstrates how this approach can be applied in analyzer case. |
Beta Was this translation helpful? Give feedback.
-
Hi all Here's an example of the code: # https://github.com/hahwul/noir/blob/main/spec/functional_test/testers/crystal_kemal_spec.cr
require "../func_spec.cr"
extected_endpoints = [
Endpoint.new("/", "GET"),
Endpoint.new("/socket", "GET"),
Endpoint.new("/query", "POST", [Param.new("query", "", "body")]),
]
FunctionalTester.new("fixtures/kemal/", {
:techs => 1,
:endpoints => 3,
}, extected_endpoints).test_all you can check based on the number of detections for techs, endpoints, and so on, or you can directly input Endpoint information for precise comparisons. Both arguments are optional, allowing you to configure the test flow by either initializing FunctionalTester with values or passing them as nil.
If you have any questions or concerns, please don't hesitate to reach out anytime! Goodbye👋🏼 |
Beta Was this translation helpful? Give feedback.
-
I received an idea from @ksg97031 regarding Spec(test).
I share the same sentiment, and I'm still pondering how to structure this. If you have any thoughts or suggestions, please feel free to share! Personally, I think there might be a way to create a separate directory or repository for testing purposes.
Beta Was this translation helpful? Give feedback.
All reactions