In order for us to talk of how we incorporate end-to-end testing inside Wix, let's also discuss how Wix's mobile app is architected. So, in a bird's-eye view, there are four types of parts which we build the app from. The first part is what we call the engine. It's the backbone of the application. It's an entity that includes all the native code and all the API registry for all the modules that are built on top of it, so they can communicate with one another and with the engine. The infrastructure libraries used with the engine, most of which are actually open source, and the engine itself are usually written in languages native to the platform, so it's Objective-C and Swift for iOS and Java and Kotlin for Android. And alongside, all this is wrapped with a unified JavaScript API.
The second type is our UI library, aka React Native UILib. This is an open source project, and this is the project which all the UI is built on top of, including, and it includes a lot of JavaScript and native components. Module is a single product. It's a blog or we have a lot of them in the app. These are, this can be a blog, store manager, CRM, chat, we have a few of those, and those expose an API of itself to consumers, and also it consumes the engines API. Also, it consumes, of course, UILIB to build its own UI, and other modules, of course. This is the actual product implementation. Here we'll have most of the screens, and the business logic, and all of those will be defined inside a module. And the fourth type is some other libraries, either if it's open or a closed source. These are somewhat disconnected from the release process, actually, because they are inherently just transitive dependencies of the above mentioned parts. New releases are being updated manually with those, mostly through PRs to the engine, to UI lib or a module. And regarding testing, they're being tested and treated separately with their own build, with their own test suites. Each of those parts has its own independent CI process, and when everything looks good to us, a new version can be published for everyone to use. The final stage is to take all of those with your configuration files and build one big binary that includes everything. And this is the app released to Google Play and the App Store.
Now that we have a slight overview of how everything is laid out, let's discuss testing. I will not discuss unit tests because those, though we have a lot of them in all the projects and they run all the time, but they mostly are very easy to run and they're very, very cheap to run. On the end-to-end side, we differentiate between a few types of tests and split those into a few test suites and execute them in different timings and different stages of the development cycle. Here are four types of end-to-end tests that we have. So the first one will be production end-to-end. Those are fully functional, those run on fully functional app with very minimal mocking. Wix use a lot of experiments and A-B tests all around, and with this type of tests, we want to make sure that we get the same features and tests on every test execution because they can differ on different runs of the app. So we developed an experiment override mechanism that enables configuration of predefined experiments blob and at the beginning of every test, and this launches the app with these experiments running, thus ensuring that we never get different behavior while the app is under a test.
Comments