<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Microservices Validation: Methodology and Implementation</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Dmitry Savchenko</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gleb Radchenko</string-name>
          <email>gleb.radchenko@susu.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>South Ural State University</institution>
          ,
          <addr-line>Chelyabinsk</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>21</fpage>
      <lpage>28</lpage>
      <abstract>
        <p>Due to the wide spread of cloud computing, arises actual question about architecture, design and implementation of cloud applications. The microservice model describes the design and development of loosely coupled cloud applications when computing resources are provided on the basis of automated IaaS and PaaS cloud platforms. Such applications consist of hundreds and thousands of service instances, so automated validation and testing of cloud applications developed on the basis of microservice model is a pressing issue. There are constantly developing new methods of testing both individual microservices and cloud applications at a whole. This article presents our vision of a framework for the validation of the microservice cloud applications, providing an integrated approach for the implementation of various testing methods of such applications, from basic unit tests to continuous stability testing.</p>
      </abstract>
      <kwd-group>
        <kwd>microservices</kwd>
        <kwd>ontologies</kwd>
        <kwd>cloud computing</kwd>
        <kwd>validation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The microservice model describes a cloud application as a suite of small
independent services, each running in its own container and communicating with other
services using lightweight mechanisms. These services are built around separate
business capabilities, independently deployable and may be written by di erent
development teams using di erent programming languages and frameworks [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
We can mention several platforms (with varying degrees of completeness) that
support the microservice model: VAMP [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], Mjolnirr [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and Net ix Cloud
Platform [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. In the paper [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], the following features of microservices were described:
{ Autonomy { microservices can be developed, tested, deployed, destroyed,
moved or duplicated independently and automatically. Continuous
integration is the only option to deal with such development and deployment
complexity.
      </p>
      <p>One of the most important stages of the process of continuous integration
is a continuous validation of the software. The goal of this study is to develop
a microservice validation methodology and design a software solution for
automated microservice systems testing support. To achieve this goal it is necessary
accomplish the following tasks:
{ provide a review of existing distributed systems validation methods,
including cloud, multi-agent and actor-based systems;
{ develop a microservice validation methodology;
{ design a framework for microservice systems validation support.
In this article, we will describe our model of validation of microservice systems
and it's implementation as a prototype of microservice systems validation
framework.</p>
      <p>The rest of this paper is organized as follows. In Section 2 we will provide a
review of the current state of distributed systems testing and validation methods.
In Section 3 we would describe the model of validation of microservice systems. In
Section 4 we would propose an architecture and describe prospective approaches
to implementation of microservice systems validation framework. In Section 5
we would summarize the results of our research and discuss further research
directions.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Distributed Systems Validation</title>
      <p>
        To develop a model of microservice systems validation, we should analyze
existing testing methods that used for such distributed systems. In the paper [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]
we proposed an approach to a microservice system validation based on ISO/IEC
29119 standard suite. Authors of [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] describe an approach to microservice testing
based on BDD approach.
      </p>
      <p>
        We also analyze the validation methods that are used in a set of related
distributed systems models, like multi-agent systems and actors. For example, it is
possible to apply ontologies-based multi-agent systems validation method [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] to
provide a validation of microservices communication. However, there are some
approaches that can't be easily implemented for the microservice model. For
example, paper [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] describes the testing framework, which operates in accordance
with the actors model. Such analysis can be carried out only for the actor
systems, because, unlike the actor model, there is no standard requirement for any
microservice that it should be able to create another instance of microservice.
      </p>
      <p>
        We should also mention integration and stability testing methods are
developed for highly loaded cloud applications. The \Chaos Monkey" [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]
failureinjection framework, provided by Net ix, implements a permanent background
work process, which at random times introduces occasional failures in the
production platform. This process may trigger a violation of network connectivity,
crash random processes or entire units of the computing system. This testing
approach leads to the fact that the application is designed with consideration of
possible random failures, and if they occur, they do not cause application
malfunction. Another approach, proposed by the Twitter development team in [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ],
provides automated web services validation based on mirroring of user requests
incoming to the production environment and their simultaneous execution on
the testing environment. Comparison of results of execution of these requests
allows to evaluate the quality of the system being developed in the real ow of user
requests, thus avoiding the inconsistency of a standard user activity processing.
      </p>
      <p>The analysis of existing methods of testing of microservice systems shows,
that there is no uni ed model of microservice system validation that would
support a continuous integration of microservices.</p>
    </sec>
    <sec id="sec-3">
      <title>Model of Validation of Microservice Systems</title>
      <p>Based on the microservice features shown in the introduction, we propose the
following model of microservice systems validation (see g. 1).
1. To provide an automated validation of microservices interface and
communication process, we should require a de nition of the interface of every
microservice.
2. According with the features of the programming language and framework
chosen to implement the microservice, a developer should provide
appropriate automated unit-testing of the microservice source code to ensure it's
compliance with the requirements.
3. If the source code is passing all the unit tests, the microservice is packed into
the container and a set of container self-tests is provided to ensure that all
the components of the container are functioning correctly and the interface of
the container corresponds to the interface de nition provided on the step 1.
4. If the self-test is successful, then microservice load testing and security testing
is provided. Steps 1-4 can be provided locally on a microservice developer's
machine.
5. If all tests pass, the microservice is deployed on a test microservice
environment, where functional integration testing, load integration testing and
security integration testing is performed. It allow to detect a set of issues
caused by microservices orchestration, including load balancing, life cycle
management and communication issues.
6. If the microservice is passing all tests inside the test environment, it can
be deployed to the production environment. A continuous stability testing is
performed in a production environment in accordance with the methodology
of deliberate provocation of random failures of the system components.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Microservice Systems Validation Framework</title>
      <p>To evaluate the proposed validation model, a Microservice Systems Validation
Framework (MSVF) is being developed. The MSVF should support microservice
application testing from the source code to the continuous stability testing,
regardless of the basic programming languages and software frameworks used for
the microservice development (see g. 2).</p>
      <p>MSVF would provide its users a catalog of testing methods, that can be used
to test a microservice application and an API for integration with continuous
integration platforms. Each testing method can be considered as a separate
microservice template, that can be tuned to provide validation of speci c part or
activity of user's microservice application.</p>
      <p>We can de ne the following main actors, who would interact with the MSVF:
{ Validation methods developer: provides development of new validation
methods and their integration into the MSVF. The validation method can be
implemented as an independent microservice, that implements a speci c
method of validation that can be adopted to a speci c microservice or
microservice application, including:
component-level testing: supports unit-testing of the microservice source
code and container self-testing;
integration-level testing: supports functional integration testing of the
microservice system on a testing environment;
load testing : supports load integration testing of the microservice system
on a testing environment;
stability testing : supports validation methods that provides deliberate
provocation of random failures of the microservice system in a production
environment.
{ Tester: is the main user of the MSVF platform. Tester can choose a service
or microservice application for validation; de ne a validation objective that
consists of a set of validation methods, adapted to the chosen application;
execute validation objectives and gather the results of the validation.
{ Microservice application: represents the validated microservice application.</p>
      <p>We can de ne the following basic components of the MSVF (see g. 3):
{ Validation Methods Manager responds for listing, creation and modi cation
of validation methods available in the MSVF.
{ Validation Method Interface is a common API that should be provided by
any validation method in the MSVF to support adaptation of validation
method to a speci c microservice application.
{ Validation Method is an implementation of speci c validation method in the
form of microservice template.
{ Validation Objectives Manager responds for listing, creation and modi cation
of validation objectives.
{ Validation Objectives Interface de nes an interface of validation objectives,
including methods for integration and tuning of validation methods.
{ Validation Objective represents a suite of validation methods, tuned for a
speci c microservice application.</p>
      <p>Currently, the MSVF is being developed to support VAMP and Mjolnirr
microservice platforms and Jenkins as a continuous integration framework. VAMP
and Mjolnirr cloud infrastructure is deployed on a set of computing nodes
provided by the Supercomputer Center of South Ural State University. The MSVF
is being implemented as a separate Java-based microservice with its own web
and REST interface, providing integration and execution of validation methods
and objectives.</p>
      <p>To support the validation process, a set of standard validation methods
is being developed and integrated to the MSVF, including component-level,
integration-level, load and stability testing methods.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In this paper, we provided an overview of existing validation approaches that
used to test distributed and cloud systems. On the basis of this overview, we
presented a model of validation of microservice systems, supporting such
microservice features as open interface, containerization and autonomy. This
methodology covers the microservice systems development process, from the creation
of a separate microservice to the production environment continuous stability
testing. Based on this model, an architecture of microservice systems validation
framework was presented.</p>
      <p>Currently we implement the microservice systems validation framework as a
software solution that would support microservice applications validation in the
cloud environment. It would provide its users a catalog of microservice
applications testing methods and an API for integration with continuous integration
platforms. Currently, the microservice systems validation framework is being
developed to support VAMP and Mjolnirr microservice platforms and Jenkins as
a continuous integration framework.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgment</title>
      <p>The reported study was partially supported by RFBR, research project No.
14-07-00420-a and by Grant of the President of the Russian Federation No.
MK7524.2015.9.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Thones</surname>
          </string-name>
          , J.:
          <source>Microservices. IEEE Softw</source>
          .
          <volume>32</volume>
          ,
          <issue>116</issue>
          {
          <fpage>116</fpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Vamp : The Very Awesome Microservices Platform</surname>
          </string-name>
          , http://vamp.io/.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Savchenko</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Radchenko</surname>
          </string-name>
          , G.:
          <article-title>Mjolnirr: A Hybrid Approach to Distributed Computing Architecture and Implementation</article-title>
          .
          <source>4th International Conference on Cloud Computing and Services Science</source>
          .
          <volume>445</volume>
          {
          <issue>450</issue>
          ,
          <string-name>
            <surname>Barcelona</surname>
          </string-name>
          , Spain (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Tilkov</surname>
            ,
            <given-names>S.:</given-names>
          </string-name>
          <article-title>The Modern Cloud-Based Platform</article-title>
          . IEEE Softw.
          <volume>32</volume>
          ,
          <issue>116</issue>
          {
          <fpage>116</fpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Savchenko</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Radchenko</surname>
          </string-name>
          , G.:
          <article-title>Microservices validation: Mjolnirr platform case study</article-title>
          .
          <source>38th International Convention on Information and Communication Technology, Electronics and Microelectronics</source>
          , MIPRO'
          <year>2015</year>
          .
          <volume>248</volume>
          {
          <fpage>253</fpage>
          . IEEE, Chroatia, Opatija (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Pahl</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Containerization and the PaaS Cloud</article-title>
          .
          <source>IEEE Cloud Comput. 2</source>
          ,
          <issue>24</issue>
          {
          <fpage>31</fpage>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Nguyen</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Perini</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tonella</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Ontology-based Test Generation for MultiAgent Systems</article-title>
          . 7th international joint conference on
          <source>Autonomous agents and multiagent systems</source>
          .
          <volume>1315</volume>
          {
          <fpage>1320</fpage>
          . International Foundation for Autonomous Agents and
          <string-name>
            <given-names>Multiagent</given-names>
            <surname>Systems</surname>
          </string-name>
          , Richland,
          <string-name>
            <surname>SC</surname>
          </string-name>
          (
          <year>2008</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Rahman</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gao</surname>
            ,
            <given-names>J.: A Reusable</given-names>
          </string-name>
          <string-name>
            <surname>Automated</surname>
          </string-name>
          <article-title>Acceptance Testing Architecture for Microservices in Behavior-Driven Development</article-title>
          .
          <source>2015 IEEE Symposium on ServiceOriented System Engineering (SOSE)</source>
          .
          <volume>321</volume>
          {
          <fpage>325</fpage>
          .
          <string-name>
            <surname>IEEE</surname>
          </string-name>
          (
          <year>2015</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Tasharo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Karmani</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lauterburg</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Legay</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Marinov</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Agha</surname>
          </string-name>
          , G.:
          <article-title>TransDPOR: A Novel Dynamic Partial-Order Reduction Technique for Testing Actor Programs</article-title>
          .
          <source>Formal Techniques for Distributed Systems</source>
          .
          <volume>219</volume>
          {
          <issue>234</issue>
          (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Izrailevsky</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tseitlin</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>The Net ix Simian Army</article-title>
          , http://techblog.net ix.com/
          <year>2011</year>
          /07/net ix-simian-army.html.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Khanduri</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          : Di y:
          <article-title>Testing services without writing tests</article-title>
          , https://blog.twitter.com/2015/di y-testing
          <article-title>-services-without-writing-tests.</article-title>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>