Showing posts with label APIs. Show all posts
Showing posts with label APIs. Show all posts

Saturday, 18 December 2021

The power of Automation and AI on API testing

IBM Exam Study Materials, IBM Career, IBM Tutorial and Material, IBM Guides, IBM Prep, IBM Certification, IBM API

Testing APIs is crucial. It helps identify errors in the code, improve code quality, and empowers developers to make changes more quickly with confidence that they haven’t broken existing behavior. Automation and Artificial Intelligence can have a significant impact on API testing. Utilizing automation in API testing can be found in many products, but the majority of companies have yet to tap into the potential that AI and machine learning can have on enhancing testing. At IBM, we believe there are a few key capabilities to keep an eye on as the future of API testing incorporates more AI and automation.

Adding Intelligence to Automation

With basic automated testing, a developer might use code that generates random inputs for each field. A lot of those tests will end up being wasted as they are repetitive, or don’t match the business use of the application. In those cases, manually written tests are more valuable because the developer has a better understanding of the API usage.

Adding intelligence provides a great opportunity to enhance automated testing to work with business logic – i.e. users will place an item in their online shopping cart before they are taken to the page that requires an address, so testing an API with an address but no items is a waste of time. Intelligent automated testing could generate a dynamic set of input values that make sense, and are a broader test of the API’s design with more confident results.

Semantic and Syntactic Awareness

Creating new API test cases can be time-consuming when done manually. Generating tests can accelerate this, but developers can only rely on this if the generated tests are high quality.

One way to improve the quality of generated tests is semantic and syntactic awareness – that is, training an intelligent algorithm to understand key business or domain entities such as a ‘customer’, ’email’, or ‘invoice’ – and how to generate data from them. By pointing it at existing tests, APIs and business rules, it should be able to ‘learn’ from that and become better at generating tests with less developer input later on.. 

Automating Setup and Teardown

A tester’s workload can be significantly decreased by identifying and automating routine tasks. Using an algorithm to look at an API specification and see what the dependencies are allows the machine to conduct routine setup and teardown tasks. For example, if a bookshop has an API for orders, the AI can set up the scaffolding and create the prerequisites for the test. If a tester needs to create a book and a customer prior to creating an order, those tasks are conducted by the AI, and then cleaned up and deleted after the test. As an algorithm learns about the company’s API structures, it can generate more of the setup and teardown tasks.

Mining real world data

IBM Exam Study Materials, IBM Career, IBM Tutorial and Material, IBM Guides, IBM Prep, IBM Certification, IBM API
The effectiveness of API testing is greatly increased when tests use realistic data, representative of real-world production conditions. Generating tests from production data must be done with care due to the risk of exposing sensitive data. Without automation, creating real-world useful tests is difficult to achieve at scale because of the high labor cost of combing through mounds of data, determining what is relevant, and cleansing the data of sensitive values.

Using AI to identify gaps in test coverage

A recent addition to the IBM Cloud Pak for Integration Test and Monitor uses AI to analyse the API workloads in both production and test environments, identifying the ways that APIs are being invoked in each. This analysis allows it to identify real-world production API scenarios that aren’t adequately recreated in the existing test suite, and automatically generate tests that fill that gap. 

Allowing an algorithm to efficiently examine millions of production API calls means that production personnel only need to review and approve the smartly generated tests. This is a very effective way of increasing test coverage in a way that will have the most impact – as it prioritizes closing testing gaps based on how users are interacting with APIs in the real world.

Source: ibm.com

Thursday, 17 November 2016

API Days Ahead For Construction

At first glance, it might be easy to dismiss a term like Application Programming Interfaces (APIs) as the kind of technical jargon that only software programmers might get excited about.  However, the implications of ‘the API economy’ could barely be less significant as organisations increasingly digitise and become data driven.  In some industries it has even disrupted whole business models and become a regular board room topic.

IBM Guides, IBM Tutorial and Material, IBM Learning, IBM API

An API is essentially a means by which different software applications can talk to each other, like a digital glue that can bond disparate systems and services together.

If you have wondered how you can sign up for a new app or website with your Facebook ID rather than entering all of your personal details again, then it is down to APIs. Or perhaps to track a package you simply click a URL in the vendor’s e-mail and it takes you straight to the information in the delivery company’s website without any re-entry of addresses or delivery ID. The You Tube video embedded on a web page, current weather conditions beamed to the home screen on your mobile phone, and price comparison site matching your details to a host of vendor prices in seconds. All made possible by the humble, understated API.

Indeed the chances are that you have not noticed, and that is the point of APIs; that things just work automatically and effortlessly even when you move from one system or service to another.

Open the gates


Software vendors are now realising that their products need to communicate with others. APIs are now so common that anyone can create their own basic event programs without code using services like IFTTT. For example you may wish to create a recipe that automatically switches on the home central heating when your car calculates that you are 30 minutes away.

The largest benefits however are reserved for organisations, where slow and error prone manual handling of information can be replaced by seamless, automated work flows. New, external data sources can be incorporated into organisations’ decision making where, previously, intangibles had to be resolved through gut feel. And organisations can realise latent monetary value in by making it available externally.

But what does this all mean for construction?

Plug in to productivity


The construction industry is highly fragmented and this creates inefficiency. Productivity has barely moved in twenty years and if you can make profits of just 2% then you are doing well. Add to this the fact that the overhead of a major capital project can often represent 20-25% of the total cost, and there is clearly room to divert money from the desk back to the site.

Advances are already being made with the deployment of BIM; federated models such as IBM’s Asset Lifecycle Information Management platform enabling asset information to be assembled from a variety of systems and surfaced to a mobile app or other medium via APIs. This makes a wealth of information available at the user’s fingertips without the need to gather and integrate information manually.

But there are all manner of other ancillary business processes that lend themselves to automation, not least the administration of contracts, in particular the kind of standardised forms of contract found on large infrastructure projects.

Contracts are after all at their heart a series of rules in how to execute obligations and entitlements; so with the right data sources, machine logic can be used to execute certain contractual processes.

And for text based information sources that are not traditionally machine-readable, such as a project communications, we now have cognitive (artificial intelligence) APIs such as IBM’s Watson that can learn, understand and reason with natural language.

They won’t replace a human but they will help the work to be done quicker and better.

Data driven decisions


Connecting to external data can help make fast, informed decisions throughout the lifecycle. Feasibility and design processes can be streamlined through connecting to geological, land value and planning restriction data sources. Commodity price feeds may help estimate project costs more accurately whilst a weather data feed can help plan for inclement conditions.

Monetise your data


What exhaust data does your business generate and would it be of value to a third party?

Making live telematics data from your delivery vehicles available to a project manager on a busy site would help them prepare for delivery with precision, much like Uber helps you catch your taxi. Providing cement curing performance information to the supplier could help them optimise their product mix.

A supplier might provide a feed from their product or service catalogue so that cost can be incorporated dynamically into the design of an asset. And capital project benchmarking data can be made available to clients to help them estimate the cost and duration of building a new asset.

Many shared APIs will just make you a more attractive partner to work with, but some make actually generate new revenue streams.

Reasons to be API


Jealously guarding one’s information in a walled garden is on its way out whilst sharing in a controlled, selective and secure way is on its way in. It may take a while in an industry that is traditionally fragmented and adversarial. But the good news is that everyone stands to benefit.