Our current testing procedure can be broadly divided into two different types, unit testing which has very limited scope but can be easily automated, and “staging” testing which can test a lot of things, but can’t be automated, take a lot of time and require other teams to not do this test at the same time. There is no way we can achieve proper continuous deployment with just these two tests, since engineers must spend a lot of effort to receive some kind of quite possibly low-quality feedback. Thus we want to introduce a type of testing that includes broader scope compared to unit testing, but at the same time can be automated just as easily and only requires engineers to spend minimum effort.
We define service testing as tests done from the boundary of a service to check the functional correctness of that service, with all of its dependencies’ behaviors controlled as much as possible. We think making tests based on what the service is supposed to do will be easier on many services compared to unit testing classes that made up the service, especially for legacy services. At the same time, we will control all the dependencies through liberal use of faking tools, thus all the limitations of “staging” testing such as low reliability and slow, manual process won’t apply to service testing.
We have created two documentations about service testing so far, the introduction which will give some more explanation about service testing, and the simple adoption guide, which will explain the new infrastructure we created to simplify service testing adoption for teams. The documents might still be a bit rough, but we believe it’s ready to be used by all Traveloka teams. Feel free to contact us if the documents aren’t clear enough.
So far, we have tried piloting the service testing to the ACD team, with the result being :
Additionally, we also revamped our Backend’s Functional Testing page. Now it contains new test definitions and requirements, and also explanations of backend engineers’ testing responsibilities moving forward.
We want to push all backend teams to prioritize automated testing for their services, thus in 2021 H2 Backend Infra will give support to adopting teams in the form of consultation and debugging help, either through slack or meeting during office hours. Please contact @christianto.handojo or @fajrinazis to ask for help.
That’s all! We want to thank :