For some time now, in the R&D team, we’ve been wondering: “How can we return the favor to the open source community?” I am Italo, Software Engineer for the Imagicle headquarter in Treviso, and I will explain to you all how we have shaped the Imagicle contribution to the open source world.
As the R&D team, we asked ourselves:“how can we contribute to the open source community?” Moreover, we wanted to have the opportunity to show other developers how we develop our own software, in hopes that they would be intrigued enough to consider working with us in Imagicle
As we were thinking about the subject of this article, WireMock.GUI came to mind: an internal tool ready to be released as an open source code.
WireMock.GUI is one of our internal tools, born in conjunction with Cloud Licensing.
All our teams, both those working on the Cloud and those working on the Imagicle UC Suite, were involved in its development.
We defined the REST API set together, then we started working on the actual development.
While we were working for the team that was developing the Imagicle UC Suite, we found ourselves finishing the development and not being able to test it in our technical reviews. That happened because the cloud-side implementation was not ready, and it wouldn’t be ready before our 2019.Summer.1 release.
What’s more is that, even if it had been ready, we couldn’t have tested corner cases such as“cloud unavailable”.
So, WireMock.GUI was born out of necessity as a tool for developers based on WireMock.Net, a library that we used for the first time precisely when we were developing the Cloud Licensing for our automatic tests.
Automatic tests? Yes, we are stubborn enough to practice pure TDD.
Curious about TDD? Here’s an article written by my colleague Riccardo that will explain it all!
Back to our tests, we needed a way to test the integration of our Imagicle UC suite with our cloud.But how?
We needed something to simulate and control the behavior of our cloud and WireMock.Net was just what we needed because it’s a library that allows you to mock the behavior of a web server.
Alright, but what makes WireMock.GUI different?
Precisely the GUI! In fact, you can tell that our UI/UX designers haven’t contributed to its development… yet.
When started, the server will listen on the localhost on port 12345.
From the GUI, you can define a series of web methods of the web server you are mocking. In the example above, a web method has been configured so that if a request in GET is made to the following test resource: http://localhost:12345/test, a JSON with the following content is returned as a response body:
Here is a sequence diagram to summarize the interaction with the mock server
Despite the fact that WireMock.GUI is an internal tool, it was written in TDD.
WireMock.GUI is a tool that we have developed concurrently with our main activities and that can still be significantly improved. So, if you have problems or if you would like new features, you can contact us directly on GitHub, where can also find the WireMock.GUI executable ready to be tried out. WireMock.GUI represents our first experience in the open source world… The first of many, we hope!
Do you also have experience in the world of open source? What do you think? Feel free to leave a comment!