Today there are many available services that provide the possibility to track the current location of a digital device. Nowadays almost any operation related to the movement of an object in space can be recorded along the route and over time.
Many companies use such services to control and optimize their business processes. The benefit lies in the fact that the application is always aware of the device location and, depending on the tasks, provides the most relevant information upon request or as an offer.
Prompt route planning, adding geo-tags in the user’s content, searching for nearby sites the user is interested in, the need to change the application interface based on the information about the user’s new location. All of the above and much more makes life much easier for the user, and helps the application to be truly useful.
Our customer has its own set of devices and applications that run on these devices. At a certain moment it became necessary to determine the location of the device using the application running on it.
Our team developed our own Mule REST service called GetAdressByIP, which can use third-party services to determine the geolocation. In cases when the IP address of the device, on which the application is deployed, is not available, X-Forwarded-For header HTTP/HTTPS is used to determine its IP address.
GetAdressByIP operation algorithm is as follows:
Data between the client and the server is exchanged in JSON format. The operation diagram of the application is shown in Figure 1.
Figure. Diagram of interaction of the implemented application with client applications and an external address determination service
One of the customer’s requirements was to minimize labor costs during deployment and testing. Developers should have focused as much as possible on software product development. To fulfill this requirement, the Continuous Integration, Continuous Delivery (CI/CD) process based on Jenkins was implemented. Five processes were automated using Jenkins:
As a result, this significantly reduced the developers’ time they spent on building, testing and deploying new versions manually.
The Data Driven Testing approach was applied during the testing phase. The performed integration tests covered a wide range of cases.
Stack: Mule ESB, JSON, Apache Maven, Sonatype Nexus.
Infrastructure: Jenkins, Git, Anypoint Studio.
Test Automation Libraries: MUnit.
Protocols: HTTP(S), REST.
Company’s achievements during the project: