virtualansoftware / virtualan

Virtualan is an open source-based Open API Interface driven Service virtualization tool. Virtualan - Mock service developed on top of the spring boot framework. Any Rest API can be converted as Virtual service in minutes using annotations. Annotations: @VirtualService & @ApiVirtual
https://tutorials.virtualan.io/#/
Apache License 2.0
10 stars 4 forks source link
automation automation-test dynamicstubbing mock servicevirtualisation shiftleft stub stubbing test-automation testing

Virtualan

**virtualan-plugin:** [![Maven Central](https://img.shields.io/maven-central/v/io.virtualan/virtualan-plugin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.virtualan%22%20AND%20a:%22virtualan-plugin%22) **virtualization:** [![Maven Central](https://img.shields.io/maven-central/v/io.virtualan/virtualization.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22io.virtualan%22%20AND%20a:%22virtualization%22) [![Build status](https://ci.appveyor.com/api/projects/status/31oxvck9dmghc4iv/branch/master?svg=true)](https://ci.appveyor.com/project/elans3/virtualan/branch/master) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=virtualansoftware_virtualan&metric=alert_status)](https://sonarcloud.io/dashboard?id=virtualansoftware_virtualan)

Virtualan is an open source-based Open API Interface driven, Kafka, AMQ and MQTT Service virtualization product. It supports #OpenAPI, #AsyncAPI test development. This supports #shiftleft testing.

Product page: https://www.linkedin.com/products/virtualan-software-virtualan/

Tutorials: https://tutorials.virtualan.io/#/Virtualan

Example: https://github.com/virtualansoftware/service-virtualization-openapi

Video: https://www.youtube.com/watch?v=otTjbPxT0W8

Docker Image: https://hub.docker.com/r/virtualan/service-virtualization

Live demo link:

OpenAPI Only:

         https://live.virtualandemo.com/virtualan-ui

OpenAPI and SOAP :

        https://sforce.virtualandemo.com/virtualan-ui

What is Virtualan :

Virtualan would be built with spring boot framework that would convert API service as Virtualized service in matter of adding couple of annotations. Simply as Virtualized service which currently supports spring-boot based Rest service(API) with Spring-RestController or CXF-Jaxrs as Virtualized service with @VirtualService and @ApiVirtual annotations.

How it could be useful: In the Agile world, We need to develop (Micro)services & Test the services in parallel. How can tester or development team can develop or test parallel to all the APIs before the real Microservices would be developed? Here Virtualized service comes into the picture.

What would be the benefits for?

Development team :

Testing team(Shift left approach) :

Overview: How developer to make and deploy the (newly developing) spring boot application interface with stub as Virtualized service. How this would helps team to proceed with "Shift Left" Strategy.

What is Shift left(Wikipedia): Shift left testing is an approach to software testing and system testing in which testing is performed earlier in the lifecycle (i.e., moved left on the project timeline). It is the first half of the maxim "Test early and often."

How to make my Service As Virtualized :

Developing a sprint boot(supports from 2.0.1.RELEASE) REST services using Rest Controller or CXF(JAX-RX) can be easily deployed as Virtualized service with three simple steps .

Step (1) : Add the "virtualan-plugin" dependency

• Add "virtualan-plugin" dependency in the  pom.xml  
    <dependency>
        <groupId>io.virtualan</groupId>
        <artifactId>virtualan-plugin</artifactId>
        <version>${virtualan.version}</version>
    </dependency>

Step (2) : Add @VirtualService and @ApiVirtual annotations

• @VirtualService - Annotation should be added in the class level
• @ApiVirtual - Annotation should be added in the method level that the API would you like to Virtualize.

Step (3) : Service Data base setup:

• Add the entries in the **application.properties** of the database to be used to store the test data (Example: hsql with in memory DB).
    virtualan.datasource.driver-class-name=<org.hsqldb.jdbcDriver>
    virtualan.datasource.jdbc-url=<jdbc:hsqldb:mem:dataSource>
    virtualan.datasource.username=<sa>
    virtualan.datasource.password=<>

License


Copyright 2022 Virtualan Contributors (https://virtualan.io)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.