Benefits of Virtualan - "The Service Virtualization Project"
Virtualan is open source based Open API Interface driven Service
virtualization tool. Virtualan - Mock service developed on
top off spring boot. Any rest API can be converted as
Virtualized service in a minutes.
"Virtualan would be build 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 @VirtulaService and @ApiVirtual annotations."
How it helps in Automation world,
API Testing world and Microservice World:
- Big support for Spring-Boot API Rest services. Fully developed using spring-boot.
- Convert spring-boot services as Virtualized mock in matter of adding couple of annotations.
- New rest api service development - Don’t have bandwidth to complete all services..
- Unimplemented APIs converted as mock-service in a matter of simple annotations.
- Existing service development.
- Just deliver API as mock service using simple annotations and can un-block Tester/automation test cases development and developer can work on the implementation in parallel.
- Creating test data for testing
- easiest approach using the virtualan-UI.
- For the automated test cases as well :)
- Improves/un-block the tester and helps to complete quickly along with development time.
- "Service Principle Unit test cases(SUnit):
- Its like similar/traditional way of creating JUnit test cases: but using BDD :)
- Want to test a scenario for create order "POST" method using BDD:
- Pre-condition:
- Prepare the dynamic input data using Virtualan-UI.
- Populate/set-up data using the Virtualan Rest endpoint.
- Run the test case:
- Execute the "POST" call
- Post-Condition:
- Tear down/clean up the data created via Rest end point.
- Example:
- Using Virtualan-Rest service: Refer the following examples to populate via rest client
- https://github.com/elan-venture/virtualan/blob/master/test/virtualan-test-data/src/main/resources/features/pet/pet.feature
- https://github.com/elan-venture/virtualan/tree/master/samples/virtualan-openapi-spring-mapping/src/test/java/io/
- API testing world: How can Scrum team can Self Certify API delivered follows the Interface spec.
- Self-certify interface implementation before deliver to the depend system: to solve day to day integration issues in interface driven world.
- SUnit way - certify the implementation delivered as follows the interface specification.
- Value add to create more well-developed BDD test scenario using Virtualan centralized mock approach.
- Gives more control over all the test scenarios and use cases with regression pack in the Development Environment to test your application.
- Example use case:
- Order application connected to Inventory, Payment and Product (Micro)services and need to test all scenarios in Dev environment.
- Add interface of Inventory, Payment and Product services to centralized mock
- Set up as centralized mock using the CI/CD. Your centralize mock is ready.
- Change the end point of your application to Inventory, Payment and Product mock service endpoints.
- Use the "SUnit" approach and pre populate your expected data in dependent System .
- And run all regression test scenario in Development Environment.
- Think about executing complete regression suite in the development environment with dependent system(Obviously using Virtualized service).
- Automation/API Testing made simple and easy.
- Helps to cover more functional area in dev environments.
- Helps discover the issue/defects as early as possible and fix early.
- Cheaper to fix defects in Dev environment. Cost-efficient.
- How quickly release the software test and release faster.
- Virtualan "The Simplified UI" easy to adapt. No much learning curve.
- Interface driven Mock service.
- Supports Open API specifications.
- Performs the validation provided in the Yaml.
- Helps lot for testers and developers
- Identify and solve lot of integration issues before SIT and Other environments.
- Create centralized mock in matter of minutes and needs to be integrated with CI/CD pipelines.
- Simplified approach to create BDD testcases.
- Mock data can created as quick as possible.
- Easy User interface to view all the available mock data.
- How to create a mock Data:
- Static approach:
- Using web user interface.
- Dynamic Approach:
- Using rest endpoint and provided Open API spec.
- Don’t have to worry about the old mock/test data created in the system.
- removes the old unused data by itself(Self-Heal).
Reference manual:
To set up Virtualan:
BDD Test
case Reference:
- https://github.com/elan-venture/virtualan/tree/master/samples/virtualan-openapi-spring
- https://github.com/elan-venture/virtualan/tree/master/test/virtualan-test-data
- https://github.com/elan-venture/virtualan/blob/master/test/virtualan-test-data/src/main/resources/features/pet/pet.feature
Thank you for reading !!!
Stay tuned
more to come :)
Comments
Post a Comment