Skip to content

Improve the stability of API mock servers in unit tests #157

Closed

Description

@seratch

The same issue I raised at slackapi/python-slack-sdk#808 is affecting this project's tests. I will be working on this soon.

=============================================================================================== short test summary info ================================================================================================
FAILED tests/slack_bolt/oauth/test_oauth_flow.py::TestOAuthFlow::test_handle_callback - ConnectionResetError: [Errno 54] Connection reset by peer
FAILED tests/slack_bolt/oauth/test_oauth_flow_sqlite3.py::TestOAuthFlowSQLite3::test_handle_callback - ConnectionResetError: [Errno 54] Connection reset by peer
================================================================================= 2 failed, 422 passed, 4 warnings in 98.22s (0:01:38) =================================================================================

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Others

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Activity

  1. added this to the 1.1.0 milestone on Nov 24, 2020
  2. self-assigned this
    on Nov 24, 2020
  3. modified the milestones: 1.1.0, 1.2.0 on Nov 25, 2020
  4. modified the milestones: 1.2.0, 1.3.0 on Dec 30, 2020
  5. vgupta-spothero commented on Jan 21, 2021

    @vgupta-spothero

    @seratch hi! our company put together a bot using the Bolt python framework (leveraging the FastAPI adaptor) and were curious if you have any documentation you could point us to in regards to the mock server and its usage outside of the provided code?

  6. seratch commented on Jan 22, 2021

    @seratch
    ContributorAuthor

    @vgupta-spothero Hi, I am glad to know you use Bolt and are curious about testing 👍

    any documentation you could point us to in regards to the mock server and its usage outside of the provided code

    Unfortunately, we do not have any document about testing and we do not provide any available testing tools for developers yet.

    But if you are happy to reuse some part of the unit tests in this project, the following test code and its dependencies like tests.mock_web_api_server should be useful for writing scenario tests without Slack servers. If you like the code, please feel free to copy and customize them in your project (it's under the MIT license).

    I cannot tell when and how but I am personally keen to provide some testing tools for Bolt users. We may be able to provide easy-to-use testing tools in the near future but until then, please go with your own solution 🙇

  7. vgupta-spothero commented on Jan 25, 2021

    @vgupta-spothero

    @vgupta-spothero Hi, I am glad to know you use Bolt and are curious about testing 👍

    any documentation you could point us to in regards to the mock server and its usage outside of the provided code

    Unfortunately, we do not have any document about testing and we do not provide any available testing tools for developers yet.

    But if you are happy to reuse some part of the unit tests in this project, the following test code and its dependencies like tests.mock_web_api_server should be useful for writing scenario tests without Slack servers. If you like the code, please feel free to copy and customize them in your project (it's under the MIT license).

    I cannot tell when and how but I am personally keen to provide some testing tools for Bolt users. We may be able to provide easy-to-use testing tools in the near future but until then, please go with your own solution 🙇

    Sounds great @seratch! Thank you for that reply, much appreciated 🙏🏽

  8. added a commit that references this issue on Jan 27, 2021
    6ce7bdc
  9. adriandiazgar commented on Aug 5, 2021

    @adriandiazgar

    I cannot tell when and how but I am personally keen to provide some testing tools for Bolt users. We may be able to provide easy-to-use testing tools in the near future but until then, please go with your own solution 🙇

    This would be very useful, +1 here

  10. dgarana commented on Aug 5, 2021

    @dgarana

    Can't wait for having that testing utils included on this framework :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions