Лучше с тестами, чем без них. Но всё хорошо в меру.
Вот небольшая заметка, почему тесты писать хорошо, почему очень хорошо писать интеграционные тесты и почему 100% покрытие — не панацея
Парочка тезисов:
- ну понятно, что тесты иметь хорошо, если вы не хотите чинить что-то, что могло бы и не сломаться
- тесты нужно поддерживать и обновлять точно так же, как и остальной код. Больше тестов — больше поддержки
- Unit тесты писать быстрее всего, но они не дадут максимального обзора. E2E тесты — это долго, зато можно получить хорошую картинку. Integration тесты — где-то посерёдке
Ну и там ещё много ссылок на в теле статьи, которые могут пригодиться
#testing #qa #culture
Вот небольшая заметка, почему тесты писать хорошо, почему очень хорошо писать интеграционные тесты и почему 100% покрытие — не панацея
Парочка тезисов:
- ну понятно, что тесты иметь хорошо, если вы не хотите чинить что-то, что могло бы и не сломаться
- тесты нужно поддерживать и обновлять точно так же, как и остальной код. Больше тестов — больше поддержки
- Unit тесты писать быстрее всего, но они не дадут максимального обзора. E2E тесты — это долго, зато можно получить хорошую картинку. Integration тесты — где-то посерёдке
Ну и там ещё много ссылок на в теле статьи, которые могут пригодиться
#testing #qa #culture
Kentcdodds
Write tests. Not too many. Mostly integration.
[Guillermo Rauch](https://twitter.com/rauchg) [tweeted](https://twitter.com/rauchg/status/807626710350839808) this a while back. Let's take a dive into what it means.
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
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
Ловите долгий текст про тестирование. С примерами, тулзами и вообще, всё, как вы любите
https://martinfowler.com/articles/practical-test-pyramid.html
#testing
martinfowler.com
The Practical Test Pyramid
Find out what kinds of automated tests you should implement for your application and learn by examples what these tests could look like.
Testing and Infrastructure
On recently passed DevOpsStage where we had discussion about tests and testing in Brave New Infra World
Record here (Ukrainian and Russian)
Links on mentioned tools and configs:
- pre-commit - framework for multi-language pre-commit hooks
- pre-commit-terraform hooks by @antonbabenko
- pre-commit-config - list of Infrastructure useful hooks and it dependencies by @MaxymVlasov
- Terratest - testing of infrastructure code
- Molecule - testing of Ansible roles
#testing #terraform #git #culture
On recently passed DevOpsStage where we had discussion about tests and testing in Brave New Infra World
Record here (Ukrainian and Russian)
Links on mentioned tools and configs:
- pre-commit - framework for multi-language pre-commit hooks
- pre-commit-terraform hooks by @antonbabenko
- pre-commit-config - list of Infrastructure useful hooks and it dependencies by @MaxymVlasov
- Terratest - testing of infrastructure code
- Molecule - testing of Ansible roles
#testing #terraform #git #culture
YouTube
DevOpsStage'19 круглий стіл: Тести і тестування
Круглий стіл відбувся після 1-го дня конференції DevOpsStage'19, на якому було зачеплено багато різних тем.
Цей запис охоплює тему тестів і тестування інфраструктури і не тільки.
Згадувані тулзи і конфіги:
- https://pre-commit.com
- https://github.com/…
Цей запис охоплює тему тестів і тестування інфраструктури і не тільки.
Згадувані тулзи і конфіги:
- https://pre-commit.com
- https://github.com/…
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
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
Open Policy Agent
Policy Testing
Policy-based control for cloud native environments
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
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
Medium
Test Desiderata
Go placidly amid the noise and haste, and remember what peace there may be in silence
I had a whole talk about testing of the Helm charts, but it's not the only (almost) YAML that you could test!
This blog post describes how one could test their Prometheus alerts. Which is more productive than waiting till something happens.
#observability#testing
This blog post describes how one could test their Prometheus alerts. Which is more productive than waiting till something happens.
#observability#testing
Aviator Blog - Automate tedious developer workflows
A Guide to Unit Testing Prometheus Alerts - Aviator Blog
Although Prometheus alerts are widely used alerting system, unit testing these alerts is uncommon. Learn about best practices for testing these alerts.
🔥3
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
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
YR's Blog
Testing Helm Charts Part I
This article is also available on Substack.
Before answering this question, we should decide why to test Helm chart? and if you even need to bother with that. Following an example from this xkcd comic, the real answer is: it depends.
So, I want to share with…
Before answering this question, we should decide why to test Helm chart? and if you even need to bother with that. Following an example from this xkcd comic, the real answer is: it depends.
So, I want to share with…
👍6
The second practical part of the Helm charts testing article.
- Read in the blog
- Read on Substack
#kubernetes #helm #testing
- Read in the blog
- Read on Substack
#kubernetes #helm #testing
YR's Blog
Testing Helm Charts Part II
This article is also available on Substack.
This is a very basic example of using Helm Unittestas well as an example of the “test pyramid” discussed in the previous article. The code is available on GitHub.
Structure We have two charts:
fw-demo - a chart…
This is a very basic example of using Helm Unittestas well as an example of the “test pyramid” discussed in the previous article. The code is available on GitHub.
Structure We have two charts:
fw-demo - a chart…
👍4❤3