O que você está procurando?
REST API And Automated Testing
Representational State Transfer, or more commonly called REST, is an architectural style that leverages HTTP and its simple verbs like GET, PUT, POST, and DELETE for interaction between two entities.
REST's simplicity and overwhelming adoption by all types of applications makes it an obvious choice for automation and testing. Its simplified structure, use of HTTP, and cloud readiness enable it to seamlessly integrate into test automation harnesses. REST can be used standalone to create new automation tests, but since it’s just HTTP requests and response, literally any programming language like Python or Perl can wrap around REST API calls.
Not all REST API is The Same
Is automation support just a checkbox on your list of requirements?
The need for automation in your validation tool is a given, but automation capabilities in different tools are not the same. Clear expectations for automation will help in the selection process and the right tool will make automation easier and faster.
Every automation framework is unique, however, there are some common attributes that most require. Proper automation support in a test tool will make it easier to integrate into almost any framework. Keysight network test products provide these unique capabilities:
- Well designed data-model driven REST API that uses structured JSON for passing information
- Modern, object-oriented Python libraries implemented using the REST API
- Built-in, interactive REST API browser that allows tests to be debugged faster
- Secure access to the API server to ensure only authorized use of the test tool
- Comprehensive documentation with supporting samples that is easy to navigate and search
Selecting The Right Tools & Processes
Automation solutions are as unique as the teams that deploy them. And so are the tools available to implement the solutions. Successful adoption of automation hinges on making the right choices of tools and processes that achieve the operational and business goals of the organization. Test tools also have different automation capabilities. They are judged by how easy they are to automate and their ability to integrate with other components in the tool chain. Modern test tools follow industry trends such as working with open source tools and leveraging scripting best practices. They have a well designed, data-model driven REST API and a intuitive Python Library to expertly and easily program scripts.
Why REST API is better than legacy API
The evolution of test automation has followed a path from old non-structured test scripting languages to modern data model driven test programming. Many of the innovations in test programming have been influenced by advancements in network automation like REST API and Python scripting.
Sometimes it can be difficult to evolve with the times and the investment to change what's already established needs to be compelling. Keysight network test tools continue to support all of the legacy test script APIs while at the same time have introduced new REST APIs and Python libraries.
Watch the video here to get a better understanding of how making the move to a more modern form of test automation can actually save time and money in the long run.