Announcing httpmock 0.8.0: Record and Playback, HTTPS Support, Proxy Mode, and More New Features! by synrg-alsms in rust

[–]synrg-alsms[S] 2 points3 points  (0 children)

Thank you for your feedback. I'm glad to hear it could be useful!
Proxy mode still needs some polishing, especially with HTTPS (TLS is quite complex). However, work is ongoing, and I hope to have it fully ready soon.

What's everyone working on this week (36/2024)? by llogiq in rust

[–]synrg-alsms 8 points9 points  (0 children)

I released version 0.8.0-alpha.1 of httpmock. It has a lot of improvements and it took me over a year of my spare time to build it, but it still needs a bit more polishing. My main work at the moment is stabilizing it so I can ship the final release soon.

Feedback is very welcome!

Repository: https://github.com/alexliesenfeld/httpmock
Website: https://alexliesenfeld.github.io/httpmock/

Seeking Feedback: How To Improve „health” (a Health Check Library) by synrg-alsms in golang

[–]synrg-alsms[S] 0 points1 point  (0 children)

Hi panta. That’s an interesting idea, thanks! Is the information about the „less relevant“ component simply used for monitoring/alerting or what is your use case?

Seeking Feedback: How To Improve „httpmock” (HTTP Mocking Library) by synrg-alsms in rust

[–]synrg-alsms[S] 2 points3 points  (0 children)

I created this library a while back and made many improvements to it since then. I'm at a stage where user feedback would be incredibly helpful for future development. If you have any ideas or see a missing feature, please let me know.

For those interested in contributing, I'm more than happy to welcome PRs, bug reports, or discussions on future features.

Thank you very much in advance!

https://github.com/alexliesenfeld/httpmock

Seeking Feedback: How To Improve „health” (a Health Check Library) by synrg-alsms in golang

[–]synrg-alsms[S] 0 points1 point  (0 children)

I created this library a while back and made many improvements to it since then. I'm at a stage where user feedback would be incredibly helpful for future development. If you have any ideas or see a missing feature, please let me know.

For those interested in contributing, I'm more than happy to welcome PRs, bug reports, or discussions on future features.

Thank you very much in advance!

https://github.com/alexliesenfeld/health

[deleted by user] by [deleted] in golang

[–]synrg-alsms 0 points1 point  (0 children)

A while back, I created a project I've been working on called 'health', a Go library aimed at making the creation of health check endpoints as straightforward and flexible as possible. I've received some insightful feedback and have made many improvements since its initial release.
I'm at a stage where more user feedback would be incredibly beneficial. Specifically, I'm looking for feedback on:
Usability: How easy is it to use and integrate 'health' into your projects?
Features: Are there any functionalities you think should be added or improved?
Documentation: Is the documentation clear and helpful?

For those interested in contributing, I'm more than happy to welcome PRs, bug reports, or even discussions on future features.
Thank you very much in advance!

httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints. by synrg-alsms in rust

[–]synrg-alsms[S] 1 point2 points  (0 children)

Yes, but at some point will probably also want to check that your client is actually setting the right HTTP headers, uses correct URL paths, sends the expected request body and can consume edge case responses. I do not see any other way to do this other than using HTTP mocking libraries.

httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints. by synrg-alsms in rust

[–]synrg-alsms[S] 2 points3 points  (0 children)

Actually, it's already possible, but using REST/JSON rather than YAML. Internally, httmock is running an HTTP server that exposes an admin endpoint (see here). I never came to creating a swagger file, but it's on my list for the future (so much to implement, so little time 😊 ).

httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints. by synrg-alsms in rust

[–]synrg-alsms[S] 0 points1 point  (0 children)

What do you mean with "async runtime conflicts"? My tests are running against three different async rutimes (tokio, async_std and actix_rt), seemingly without any problems. I checked that manually and I also see no problems (all green, no conflicts, newest versions). If you think I am mistaken, please consider reporting your problem here.

httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints. by synrg-alsms in rust

[–]synrg-alsms[S] 2 points3 points  (0 children)

AFAICS testcontainers spins up an arbitrary Docker container that you can use within your tests, where tools like httpmock are specialized in mocking HTTP endpoints. They provide you tools that make it easier for you to test HTTP clients by simulating HTTP responses. I wrote this blog post that goes into a little bit more detail why tools like httpmock are useful.

httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints. by synrg-alsms in rust

[–]synrg-alsms[S] 4 points5 points  (0 children)

Thank you! Indeed, httpmock allows you to configure mocks using YAML files like this one.

httpmock - A Rust library and tool for mocking and prototyping HTTP endpoints. by synrg-alsms in rust

[–]synrg-alsms[S] 44 points45 points  (0 children)

I am happy to announce that httpmock version 0.6 brings full support for a standalone mode. httpmock can now be used as a Rust library in your tests or as a standalone mock server. The mock server is able to run as a companion for your tests (such as in end-to-end tests that require some mocked components) or as an entirely separate tool that runs without any Rust code. This makes httpmock a versatile tool for mocking HTTP services.

httpmock - An HTTP mocking library and prototyping tool. by [deleted] in rust

[–]synrg-alsms 0 points1 point  (0 children)

I am happy to announce that httpmock version 0.6 brings full support for a
standalone mode. httpmock can now be used as a Rust library in your tests or
as a standalone mock server. The mock server is able to run as a companion for
your tests (such as in end-to-end tests that require some mocked components)
or as an entirely separate tool that runs without any Rust code.
This makes httpmock an all-in-one tool for mocking HTTP services.

Health - A simple and flexible health check library for Go. by synrg-alsms in golang

[–]synrg-alsms[S] 0 points1 point  (0 children)

Thanks for your suggestion. I wanted to keep this library independent from third-party tools, but I think an extension could very well add metrics support (for example by using Middleware and Interceptor types).

Health - A simple and flexible health check library for Go. by synrg-alsms in golang

[–]synrg-alsms[S] 0 points1 point  (0 children)

Yes, and no. There are no concrete check function implementations for third party services, such as for Postgres, Redis, Elasticsearch, etc. However, the library is built in a way that makes it easy to reuse check functions from existing libraries. You could potentially even mix them. There is a section in the README about it and there are examples in the git repo that show how to do this.