Testing web applications using clusters
AssigneeInternational Business Machines Corporation
InventorsIlan Ben-Bassat, Daniel Dubnikov, Sagi Kedmi, Erez Rokah
Life of this patent
Estimating the term…
Abstract
An example system includes a processor to crawl a plurality of web pages of a web application to be tested. The processor is to also receive an intercepted input to the web application and an output from a web application associated with each crawled web page. The processor is to further detect testable elements in the intercepted input and the output. The processor is also to generate a fingerprint for each web page based on the detected testable elements. The processor is to generate a list of clusters comprising one or more similar web pages based on the fingerprints. The processor is to test a single web page from each cluster.
Claims20
A computer system for testing web applications, the computer system comprising:
- one or more computer processors;
- one or more computer readable storage media;
- and
- program instructions, stored on the one or more computer readable storage media for execution by at least one of the one or more computer processors, the program instructions comprising:
- program instructions to receive an intercepted input to a web application;
- program instructions to cause the intercepted input to be sent to the web application as a request input where a similarity score between the intercepted input and any one of one or more web page requests is less than a maximal distance score of a given web cluster of a list of web page clusters, wherein the similarity score is between the intercepted input and one or more web page requests, where each web page request is associated with a web page of the given web cluster;
- program instructions to receive the output for the intercepted input from the web application;
- program instructions to detect testable elements in the intercepted input and output;
- program instructions to generate a combined fingerprint for the intercepted input and output based on the detected testable elements from the intercepted input and the output by counting the number of occurrences of the detected testable elements in the intercepted input and the output;
- program instructions to add the output to one cluster of the list of web page clusters based on similarity between the combined fingerprint and the one cluster;
- and
- program instructions to test a single web page from each cluster of the list of web page clusters.
A computer-implemented method for testing web applications, the method comprising the steps of:
- receiving, by one or more computer processors, an intercepted input to a web application where the intercepted input is configured to cause the web application to provide a responsive web page as an output for the intercepted input;
- causing, by one or more computer processors, the intercepted input to be sent to the web application as a request input where a similarity score between the intercepted input and any one of one or more web page requests is less than a maximal distance score of a given web cluster of a list of web page clusters, wherein the similarity score is between the intercepted input and one or more web page requests, where each web page request is associated with a web page of the given web cluster;
- receiving, by one or more computer processors, the output for the intercepted input from the web application;
- detecting, by one or more computer processors, testable elements in the received request and response;
- generating, via a processor, a combined fingerprint for each web page based on a first fingerprint generated from the detected testable elements from the intercepted request and a second fingerprint generated from the detected testable elements of the response by counting the number of occurrences of the detected testable elements in the intercepted input and the output;
- adding, by one or more computer processors, the output to one cluster of the list of web page clusters based on similarity between the combined fingerprint and the one cluster;
- and
- testing, by one or more computer processors, a single web page from each cluster of the list of web page clusters.
A computer program product for testing web applications, the computer program product comprising:
- one or more computer readable storage media;
- and
- program instructions stored on the one or more computer readable storage media, the program instructions comprising:
- program instructions to receive an intercepted input to a web application, where the intercepted input is configured to cause the web application to provide a responsive web page as an output for the intercepted input;
- program instructions to cause the intercepted input to be sent to the web application as a request input where a similarity score between the intercepted input and any one of one or more web page requests is less than a maximal distance score of a given web cluster of a list of web page clusters, wherein the similarity score is between the intercepted input and one or more web page requests, where each web page request is associated with the web page of the given web cluster;
- program instructions to receive the output for the intercepted input from the web application;
- program instructions to detect testable elements in the intercepted input and the output;
- program instructions to generate a combined fingerprint for each web page based on a first fingerprint of the detected testable elements from the intercepted input and a second fingerprint of the detected testable element from the output by counting the number of occurrences of the detected testable elements in the intercepted input and the output;
- program instructions to add the output to one cluster of the list of web page clusters comprising one or more similar web pages based on similarity between the combined fingerprint and the one cluster;
- and
- program instructions to test a single web page from each cluster of the list of web page clusters.
Dependencies are inferred from the claim text.