I write a lot of integration tests for Magento 2. This helps my local development and they fit nicely in a CI way of working.
However, there are some oddities about the integration test suite of Magento. For example:
- It enables all modules by default, and there is no way to disable this. This can have some unwanted side-effects, because on a client project you most likely disable modules you don't need, for example, the Vertex module. However, this module adds a required field to your customer model, so needless to say, if you create a customer in your integration test, this test will fail.
- It adds Magento test modules to your codebase. So each time you ran your integration test suite, you end up with having 3 extra modules in your
These issues make it hard for an integration test to be used in a local project. Someone once said to me that the integration tests are only created for extension developers to test if your module passes the criteria to make it to the marketplace. Is this true? Because if so: what's then to a proper way to write integration tests for your clients' webshop? I do like the Magento annotations and stuff. Really frustrating this.