aws / aws-xray-sdk-python

AWS X-Ray SDK for the Python programming language
Apache License 2.0
324 stars 142 forks source link

Testing utils for integration #209

Open shyamd opened 4 years ago

shyamd commented 4 years ago

I'm wondering if we can move the utils in the tests folder into a test_utils module so that other applications can use it to build their own integration tests? There might be more than just what's in tests/util.py to move though.

srprash commented 4 years ago

Hi @shyamd, It would be possible to expose the tests/util.py as a separate module, however, I am curious about your use case which involves leveraging the methods of the file. Can you provide some more details and any suggestions you may have?

shyamd commented 4 years ago

Hi @srprash

I'm writing some middleware for starlette for AWS X-Ray that I planned on contributing to this SDK when I'm happy with it. I relied on the tools in testing/utils.py to construct the unit tests for my middleware, so I just copied them over to a file in my project for now. Anyone else writing integrations for AWS X-ray would probably want to run CI on their code and having these tools directly exposed say as part of aws_xray_sdk.testing. Additionally having these tools as part of the SDK provides a framework for testing and documentation on testing that should be emphasized.

srprash commented 4 years ago

Hi @shyamd, That's awesome that you're writing a new middleware for the SDK! I like the idea of having a testing utility module. Feel free to post a PR for it and I'll be happy to discuss how we can standardize the module for everyone's use. :)

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in next 7 days. Thank you for your contributions.