Using NeoLoad for Microservices, API, and Component Testing
Understanding Microservices Architectures
Microservice architecture (‘microservices’) break down complex tasks into smaller processes that operate independently and communicate through language-agnostic APIs. These processes are modular in nature and can be deployed independently. Communications between Microservices is through a defined method or set of methods to deliver a specific capability or achieve a business goal.
- Microservices can be broken down into multiple component services, each of which can be created, tested, and deployed without impacting other services or breaking the overall operational integrity of the application of which it is part
- Microservices are set up to deliver a specific capability or set of capabilities to the business, by using cross-functional teams rather than handing off to specialist teams (e.g. database, network infrastructure, server) for related services
NeoLoad Meets the Performance Testing Challenges of Microservices Architectures
Because of the nature of microservices architectures, a robust load testing plan requires some work to characterize “real world” usage scenarios, to confirm proper operation and continued availability under heavy load or in the face of resource failure. In order to test as soon as possible in the SDLC, even before a GUI exists.
- At their most basic level, microservices receive requests, process them, and generate a response; NeoLoad excels at this
- NeoLoad allows you to define custom protocols and actions, record and replay transactions and user paths, and re-use scripts to do comprehensive performance analysis across the SDLC
- NeoLoad is flexible enough to be able to generate traffic with specific protocols as required by the microservices under test
- Since Web APIs are not always available for internal microservices, NeoLoad allows you to define custom actions and protocols as required
- Specific messaging protocols (e.g. JMS, MQTT, KAFKA, MQ Series, ProtoBuf) or database protocols (e.g. SQL load generation) can be defined to test specific microservices
Understand the Load Performance and Scalability of APIs
Application Programming Interfaces (APIs) are central to modern data-driven applications, and are becoming even more so. At the same time, Representational State Transfer (REST) has become more popular than ever, especially for popular Web-based applications (Twitter, Google, Flickr, and many others) that use REST APIs. The emergence of RESTful API frameworks like Swagger, which integrate with NeoLoad, makes API testing with NeoLoad faster than ever.
- Testing web services and APIs is critical to producing quality software that is robust and performs well under real-world load scenarios
- Many aspects of API testing are similar to traditional end-to-end load testing
- Since there is no GUI involved there are some special considerations
API Testing – More Important than Ever to Your Business
Including API tests improves the overall quality and coverage of performance testing.
- NeoLoad can help characterize API load behavior early in the SDLC, when performance issues are far cheaper and easier to address
- Gain insight into user experience even before a GUI is developed
- Simulate global traffic from the Neotys cloud to develop realistic load scenarios to visualize the impact of full-scale loads using virtual users. Choose from over 50 on-demand locations from 6 different providers
The Role of Test Automation in CI
DevOps testing and development teams are moving towards API test automation and integrating their testing tools with CI frameworks like Jenkins. NeoLoad supports developers and testers with integrations to the most popular CI tools using out-of-the-box CI plugins (available from the Download Center) for Jenkins, Team City, and Bamboo.
Automate for Continuous Integration Testing
- Run automatically from Continuous Integration systems
- Command line interface execution
Testing APIs with NeoLoad
NeoLoad provides SOAP/Web Services support with options for REST and API testing plus the ability to test all web and mobile applications. It means that you can use NeoLoad throughout the development lifecycle even before you have a UI, and reuse those assets later on when the app is more stable.
You can generate SOAP requests using WSDL descriptor files. It gives the ability to test the server before the client is ready, since you don’t need to record the traffic to be played back.
RESTful Web Services Testing
NeoLoad allows you test RESTful web services thanks to:
- Native support of all HTTP Methods: GET, POST, PUT, DELETE HEAD, OPTIONS
- Native support for XML and JSON requests and responses for extracting data from responses, validating data or injecting values
The Role of Component Testing
At Neotys we say, “test early…and often”, meaning that load testing should ideally be done both earlier in the SDLC, more often, and at different levels of granularity. Component testing is similar in approach to API testing, but specific methods are often required to ensure full test coverage of all components and application layers
Testing a single component, then testing integrated groups of components together (e.g. for a UI) ensures that these components can still function properly when you get to more-complex test and load scenarios later in the SDLC. Then, you can transition with confidence to doing more traditional system-wide performance testing in a pre-production environment.
Component testing is increasingly being done in a Continuous Integration (CI) and Continuous Delivery (CD) environment. The objective of CI is essentially defensive; performance testers and developers test on a very regular and automated basis and are intent on documenting performance trends and comparing their results to a reference test, typically to know if their current modifications on the code is having a deteriorating or improving effect on performance.
Focus on Application Performance
Take advantage of today’s best practices by “Shift Left” testing (testing early and often in your SDLC). As more DevOps and Agile-focused teams adopt this approach, what they are really doing is changing the granularity of what is tested at different stages of the SDLC, moving toward deploying the application into a pre-production environment. Additionally, you should consider how and when testing APIs, Microservices and components should be a part of your overall performance testing plan to ensure actual end-user experience will be satisfactory without frustration or failure.
Making Performance Testing a Competitive Edge
To achieve both speed and quality for performance testing in a DevOps environment, businesses will need to empower testers and developers to take ownership of application performance, build more-engaging applications for end-users, automate the testing process wherever possible, and transform the way applications are designed and how their performance is tested.
Beating the competition to the market will depend on the developers and testers working as a team, as key players in transforming the business, or in creating new opportunities, by creating faster and better developer and tester practice. DevOps teams will lead the way by delivering better and faster insights through applications built and tested to outperform the competition.
- Test with Confidence: Cover more test cases, ensure professional grade quality, make testers trusted partners
- Support Agile: Make performance testing a key element of your Agile software delivery
- Achieve DevOps: Make performance testing a continuous process across Dev, QA and Ops
More Resources About Microservices, API & Component Performance Testing