CatOps
5.08K subscribers
94 photos
5 videos
19 files
2.58K links
DevOps and other issues by Yurii Rochniak (@grem1in) - SRE @ Preply && Maksym Vlasov (@MaxymVlasov) - Engineer @ Star. Opinions on our own.

We do not post ads including event announcements. Please, do not bother us with such requests!
Download Telegram
Лучше с тестами, чем без них. Но всё хорошо в меру.

Вот небольшая заметка, почему тесты писать хорошо, почему очень хорошо писать интеграционные тесты и почему 100% покрытие — не панацея

Парочка тезисов:
- ну понятно, что тесты иметь хорошо, если вы не хотите чинить что-то, что могло бы и не сломаться
- тесты нужно поддерживать и обновлять точно так же, как и остальной код. Больше тестов — больше поддержки
- Unit тесты писать быстрее всего, но они не дадут максимального обзора. E2E тесты — это долго, зато можно получить хорошую картинку. Integration тесты — где-то посерёдке

Ну и там ещё много ссылок на в теле статьи, которые могут пригодиться

#testing #qa #culture
​​So Cloud, much serverless. How about return to ground and talk about testing your Ansible playbooks? (Of cource, if you use Ansible :)

For example, Molecule is designed to aid in the development and testing of Ansible roles. It has an extensive set of unit and functional tests and the same time Molecule uses Ansible playbooks to exercise the role and its associated tests. So you can test Ansible using Ansible! For me, looks great.

#ansible #testing
Понедельник -- день не только тяжёлый, но часто и долгий

Ловите долгий текст про тестирование. С примерами, тулзами и вообще, всё, как вы любите

https://martinfowler.com/articles/practical-test-pyramid.html

#testing
If you work with Open Policy Agent, you probably want to test the policies you write.

Lucky there is an ability to write test suites for Rego.

However, these tests suits are not always very obvious as well as Rego policies themselves. Here is an article by Dustin Specker on how to write tests for your policies. This article helped a lot me personally. And I hope it will be helpful for you too.

#opa #kubernetes #testing
From time to time people bring the topic of testing during our voice chests.

Here Kent Beck, a creator of extreme programming, provides 11 properties for good tests:

- Isolated — tests should return the same results regardless of the order in which they are run.
- Composable — if tests are isolated, then I can run 1 or 10 or 100 or 1,000,000 and get the same results.
- Fast — tests should run quickly.
- Inspiring — passing the tests should inspire confidence
- Writable — tests should be cheap to write relative to the cost of the code being tested.
- Readable — tests should be comprehensible for reader, invoking the motivation for writing this particular test.
- Behavioral — tests should be sensitive to changes in the behavior of the code under test. If the behavior changes, the test result should change.
- Structure-insensitive — tests should not change their result if the structure of the code changes.
- Automated — tests should run without human intervention.
- Specific — if a test fails, the cause of the failure should be obvious.
- Deterministic — if nothing changes, the test result shouldn’t change.
- Predictive — if the tests all pass, then the code under test should be suitable for production.

#programming #testing
At last! I converted my talk from FW Days DevOps 2024 into an article in English.

You can find it in my blog or on Substack.

This is the Part I which goes through the ideas behind the testing of Helm charts. But have no fear! I learn on my previous mistakes, so the second part that walks you through the technical aspects of tests is also ready and will be published tomorrow!

Also, you can still watch the video of my talk on the FW Days conference (in Ukrainian). It has basically the same content as the articles.

Enjoy!

#kubernetes #helm #testing
👍6