Production-ready software requires testing before it goes into production. As the discipline of software development matured, software testing approaches have matured too. Instead of having myriads of manual software testers, development teams have moved towards automating the biggest portion of their testing efforts. Automating their tests allows teams to know whether their software is broken in a matter of seconds and minutes instead of days and weeks.
The drastically shortened feedback loop fuelled by automated tests goes hand in hand with agile development practices, continuous delivery and DevOps culture. Having an effective software testing approach allows teams to move fast and with confidence.
If you want to get serious about automated tests for your software, there is one key concept you should know about: the test pyramid. Mike Cohn came up with this concept in his book Succeeding with Agile. It's a great visual metaphor telling you to think about different layers of testing. It also tells you how much testing to do on each layer.
Stick to the pyramid shape to come up with a healthy, fast and maintainable test suite: Write lots of small and fast unit tests. Write some more coarse-grained tests and very few high-level tests that test your application from end to end. Watch out that you don't end up with a test ice-cream cone that will be a nightmare to maintain and takes way too long to run.
In this talk, I'd like to introduce you to the practices helping our team to keep our integration tests suite, or Service Tests suite, a bliss to maintain.
These practices can be summarized into 3 main points:
- Write your integration tests alongside your app code
- Use the same tools that you're using to write your app code and unit tests
- Generate as much code as possible
We'll see in this talk how Scala, zio-test and Caliban are, each with their own capabilities, helping us in this difficult task of writing and maintaining a production-ready software integration tests suite.
Linkedin : / jules-ivanic
Twitter : / guizmaii
Slides : docs.google.com/presentation/...
Негізгі бет Ғылым және технология Jules Ivanic - Cost-effective and easy to maintain GraphQL integration tests (zio-test and Caliban)
Пікірлер