Building a real-world Clojure application from SCRATCH tutorial, part 2: pedestal and component test

preview_player
Показать описание
If you are interested in building production-grade Clojure applications - you are in the right place! This is the second video in the series of tutorials on how to build real-world Clojure services. In the Part 2: we'll add a new API endpoint to our web service, we will use atom to create an in-memory state component and we will write component tests.

0:00 Introduction
1:10 Overview from Part 1
2:20 Adding simple tests
7:17 Pedestal and component in tests: SUT
12:37 Add a new pedestal route
15:53 In-memory state component
21:00 Inject dependencies interceptor
33:29 Bi-directional routing
39:58 Dynamic port for the test system
43:42 Outro

If you liked this video and want to support my channel, please consider buying me a coffee ☕. Your contribution helps me create more content like this.

You can donate at:

Please also subscribe to my other resources:

I'm truly grateful for your support, and thank you for watching! 🙏

License code: 0W3JESWQW9ZJXLIC
Рекомендации по теме
Комментарии
Автор

If you liked this video and want to support my channel, please consider buying me a coffee ☕. Your contribution helps me create more content like this. You can donate at:
I'm truly grateful for your support, and thank you for watching! 🙏

P.S. Please like, comment and subscribe to the channel 🚀 Forgot to mention in the video, there is a repository in github with all source code, link in the description box. Happy coding 🎉

andrey.fadeev
Автор

You are doing great work by passing the knowledge gained in the industry back to the community. Hope you get to 1k subs soon!

saurabhmehta
Автор

Amazing content so far! I am using your videos to re-learn Clojure development. I enjoy the language a lot but since I don't work with it sometimes I lose contact with Clojure. This time I came back and found your material and it's being very useful to remember the language and some of the libraries.

matheusemm
Автор

Thanks a lot for this video Andrey. In deed testing one of the initial parts when learning a new language to start appplying TDD. As a personal note I am learning clojure for a personal motivation, coming from the software craftmanship in Barcelona, with the aim of rising my skills with functional paradigm. My interests are also into the use of clojure for data analysis so let see. By know I would like to have a simple application (an army builder for a miniature games called mordheim) with clojure and clojurescript or HTMX...let see. Thanks again!

javiermartinez
Автор

Great video, like all the others on this channel. I noticed one point that was once pointed out to me during a review. Instead of constantly generating a new random-uuid in tests, I was recommended to generate a static uuid once and use it in the test all the time. Of course, the chance of generating the same uuid is negligible, so it’s just interesting to know what you think. Do you use random uuid in your tests at work or do you prefer a static option?

velios
Автор

Hi @andrey.fadeev, I am working through this tutorial and have been stuck for a while on an issue with the function get-tod-by-id. Specifically, I was receiving "Cannot invoke because "fut" is null" when dereferencing the :state-atom. This was causing an issue in the tests when caling client/get for get-todo-test. Why would this be happening? I can provide more details but either way, thank you for the time you've put into this tutorial!

Art-
join shbcf.ru