Local recording for demonstration of web-based software applications

In embodiments of the present invention, a processor executing a web browser detects a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first HTTP request includes a first Uniform Resource Locator (URL). In the browser-executable code, a second request to a second server for a web resource and including a second URL is identified, and the second URL in the browser-executable code is modified so as to reference a third server. The first URL is modified so as to reference a fourth server, and the modified browser-executable code is stored on the fourth server so as to be referenced by the modified first URL.

FIELD OF THE INVENTION

The present invention relates generally to demonstration software, and specifically to recording and presenting (i.e., executing) a recorded demonstration of a web-based software application.

BACKGROUND OF THE INVENTION

A product demonstration (i.e., “demo”) is typically used to present a software application such as a business-to-business software as a service application. The product demo can be used to show the value of a software application to a current or prospective customer, and typically involves a demonstration of the application's core features and capabilities.

SUMMARY OF THE INVENTION

There is provided, in accordance with an embodiment of the present invention, a method including executing, by a processor, a web browser, detecting, by the processor, a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first request includes a first Uniform Resource Locator (URL), identifying, in the browser-executable code, a second request to a second server for a web resource and including a second URL, modifying, in the browser-executable code, the second URL so as to reference a third server, modifying the first URL so as to reference a fourth server, and storing, on the fourth server, the modified browser-executable code so as to be referenced by the modified first URL.

In one embodiment, the servers have respective domain names, and the domain name for the first server matches the domain name for the second server.

In another embodiment, the first server and the second server have respective domain names, and the domain name for the first server does not match the domain name for the second server.

In an additional embodiment, the third server and the fourth server have respective domain names, and the domain name for the third server matches the domain name for the second server.

In a further embodiment, the third server and the second server have respective domain names, and wherein the domain name for the first server does not match the domain name for the second server.

In a supplemental embodiment, the processor and the second server communicate via a private network.

In a first playback embodiment, the method further includes receiving, by the fourth server from a client computer subsequent to storing the modified browser-executable code, a third request including an HTTP request including the modified first URL, conveying, by the fourth server responsively to the third request, the modified browser-executable code to the client computer, and subsequent to conveying the modified browser-executable code, receiving, by the third server from the client computer, a fourth request for the web resource and including the modified second URL.

In a second playback embodiment, the method further includes detecting, by the processor prior to receiving the third request, an additional request conveyed by the browser to the second server for the web resource, and detecting a response received from the second server including the requested web resource.

In a third playback embodiment, the method further includes storing the web resource to the third server so as to be referenced by the modified second URL.

In a fourth playback embodiment, the method further includes conveying, by the third server responsively to the fourth request, the stored web resource to the client computer.

In a first resource embodiment, the browser-executable code includes a first browser-executable code, and the web resource includes a second browser-executable code.

In a second resource embodiment, the executable code includes HyperText Markup Language (HTML) code.

In a third resource embodiment, the browser executable code includes JavaScript code.

In a fourth resource embodiment, the browser executable code includes Cascading. Style Sheet (CSS) code.

In a fifth resource embodiment, the browser executable code includes executable binary code.

In a sixth resource embodiment, the web resource includes a font.

In a seventh resource embodiment, the web resource includes an image.

In an eighth resource embodiment, the web resource includes cleartext.

In one embodiment, the second request includes an application program interface (API) call, and the web resource includes an API service.

In a another embodiment, the second request includes a database query, and the web resource includes database data.

In a further embodiment, the browser-executable code for a web-based application references a first set of resources, and the method further includes detecting, by the client computer, an additional request from the modified browser-executable code to access or manipulate a given resource, and providing, by the client computer a response simulating the given resource.

There is also provided, in accordance with an embodiment of the present invention, an apparatus, including a memory configured to store a web browser, and a processor configured to execute the web browser, to detect a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first request includes a first Uniform Resource Locator (URL), to identify, in the browser-executable code, a second request to a second server for a web resource and including a second URL, to modify, in the browser-executable code, the second URL so as to reference a third server, to modify the first URL so as to reference a fourth server, and to store, on the fourth server, the modified browser-executable code so as to be referenced by the modified first URL.

There is additionally provided, in accordance with an embodiment of the present invention, a computer software product, including a non-transitory computer-readable medium, in which program instructions are stored, which instructions, when read by a computer, cause the computer to execute a web browser, to detect a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first request includes a first Uniform Resource Locator (URL), to identify, in the browser-executable code, a second request to a second server for a web resource and including a second URL, to modify, in the browser-executable code, the second URL so as to reference a third server, to modify the first URL so as to reference a fourth server, and to store, on the fourth server, the modified browser-executable code so as to be referenced by the modified first URL.

There is further provided, in accordance with an embodiment of the present invention, a method, including executing, by a processor, a web browser, detecting, by the web browser, a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first request includes a first Uniform Resource Locator (URL), detecting, by the browser, a second request to a second server for a web resource and including a second URL), and a response from the second server including the requested web resource, storing, by the browser, the browser executable code and the web resource to a recording, retrieving, by the web browser, the browser-executable code from the recording, detecting, by the web browser subsequent to retrieving the browser-executable code, a third request for the web resource and including the second URL, and retrieving, by the web browser in response to the third request, the web resource from the recording.

In some embodiments, the web browser includes a first web browser, the steps of executing the first web browser, detecting the first and the second requests, and storing the browser executable code and the web resource are performed by a first processor, detecting the third request includes detecting, by a second browser executing on a second processor, the third request, and retrieving the web resource includes retrieving, by the second web browser, the web resource.

There is also provided, in accordance with an embodiment of the present invention, an apparatus, including a memory configured to store a web browser, and a processor configured to execute the web browser, detecting, by the web browser, a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first request includes a first Uniform Resource Locator (URL), to detect, by the browser, a second request to a second server for a web resource and including a second URL, and a response from the second server including the requested web resource, to store, by the browser, the browser executable code and the web resource to a recording, to retrieve, by the web browser, the browser-executable code from the recording, to detect, by the web browser subsequent to retrieving the browser-executable code, a third request for the web resource and including the second URL, and to retrieve, by the web browser in response to the third request, the web resource from the recording.

There is additionally provided, in accordance with an embodiment of the present invention, a computer software product, including a non-transitory computer-readable medium, in which program instructions are stored, which instructions, when read by a computer, cause the computer to execute a web browser, to detect, by the web browser, a first request including a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page including browser-executable code for a web-based application, and a response received from the first server including the requested browser-executable code, wherein the first request includes a first Uniform Resource Locator (URL), to detect, by the browser, a second request to a second server for a web resource and including a second URL, and a response from the second server including the requested web resource, to store, by the browser, the browser executable code and the web resource to a recording, to retrieve, by the web browser, the browser-executable code from the recording, to detect, by the web browser subsequent to retrieving the browser-executable code, a third request for the web resource and including the second UPI, and to retrieve, by the web browser in response to the third request, the web resource from the recording.

DETAILED DESCRIPTION OF EMBODIMENTS

Embodiments of the present invention provide methods and systems for generating and executing demonstration versions of web-based software applications. In embodiments herein, the web-based application comprises any software application that is accessed, by a computing device, over a network connection using Hypertext Transfer Protocol (HTTP), rather than existing within a device's memory. Web-based applications often run inside a web browser.

As described hereinbelow, while executing, a web browser, a processor detects a first request comprising a Hypertext Transfer Protocol (HTTP) request conveyed by the web browser to a first server for a web page comprising browser-executable code for a web-based application, and a response received from the first server comprising the requested browser-executable code, wherein the first request comprises a first Uniform Resource Locator (URL). A second request to a second server for a web resource and comprising a second URL are identified in the browser-executable code, and the second URL modified in the browser-executable code so as to reference a third server. The first URL is modified so as to reference a fourth server, and the modified browser-executable code is stored on the fourth server so as to be referenced by the modified first URL.

In some embodiments, an additional request conveyed by the browser to the second server for the web resource, and a response received from the second server comprising the requested web resource may be detected. Upon detecting and receiving the response, the web resource can be stored to the third server so as to be referenced by the modified second URL.

The steps described hereinabove can be repeated multiple times so as to create a demonstration version (referred to herein as a “demo recording”) of the web-based application. In embodiments described herein, the demonstration version comprises a restricted clone of the web-based application (i.e., the web-based code of the web-based application and any web assets used by the application) that can then be executed (i.e., “played back”) by a standard web browser.

Demonstration versions (i.e., of web-based application) created using embodiments described herein are functional applications that can be executed in standard or custom browsers, as described hereinbelow. As opposed to “recorded” demonstrations which play back interactions in the same order (i.e., a specific sequence of user input) as they were recorded, embodiments of the present invention enable users to interact with demonstration versions in any order.

As described hereinbelow, the demo recording can be played back in response to receiving, by the fourth server from a client computer (i.e., subsequent to storing the modified browser-executable code), a third request comprising an HTTP request (i.e., comprising the modified first URL). In response to the third request, the fourth server can convey the modified browser-executable code to the client computer. Subsequent to conveying the modified browser-executable code, upon the third server receiving from the client computer, a fourth request (i.e., comprising the modified second URL) for the web resource, the third server can convey the web resource to the client computer in response to the fourth request.

In one embodiment, the recording may comprise request/response pairs generated (a) in response to a user accessing one or more web pages in the web-based application, (b) in response to the user interacting with the web-based application, or (c) upon any other implicit/explicit activity invoked by browser-executable code in the web-based application. In another embodiment, the processor can execute the browser-based code so as to “crawl” (i.e., access) multiple web pages in the web-based application.

In some embodiments, the demo recording is created using a custom browser comprising a modified network layer that can capture the request/response pairs, and then store the captured request/response pairs to the demo recording. By executing the custom browser on a client computer behind a firewall (i.e., on a private network), embodiments of the present invention enable the modified network layer to record HTTP requests to servers behind (e.g., servers coupled to a corporate network) and/or servers beyond (e.g., servers on the Internet) the firewall, and record responses from those servers.

In an additional embodiment described hereinbelow, the user can execute the demo recording in a custom browser executing on a client computer that also stores the demo recording.

System Description

FIG.1is a block diagram that schematically shows an example or a computing facility20comprising a client computer22that can execute a demo application24configured to generate a demo recording26for a web-based application28, in accordance with an embodiment of the present invention. Client computer22is coupled to a local area network30that enables the client computer to communicate with multiple servers32having respective Internet Protocol (IP) addresses34and domain names36. Hardware and software components of client computer22are described in the description referencingFIG.4hereinbelow.

InFIG.1, servers32and their respective hardware and software components, IP addresses34and domain names36can be differentiated by appending a letter to the identifying numeral, so that the servers comprise application server32A having a corresponding IP address34A and a corresponding domain name36A, demo server32B having a corresponding. IP address34B and a corresponding domain name36B, and resource servers320having a corresponding IP address340and a corresponding domain name36C. Application server32A is described in the description referencingFIG.2hereinbelow, resource server32C is described in the description referencingFIG.3hereinbelow, and demo server32B is described in the description referencingFIG.5hereinbelow.

Computing facility20also comprises a firewall38that is coupled to a data network such as LAN30(also referred to herein as private network30), thereby enabling client computer22to access a public network such as Internet40. Therefore, in the configuration shown inFIG.1client computer22can access servers32that are behind firewall38(thereby enabling the client computer to communicate with a first subset of resource servers32C coupled to private network30) and servers32that are beyond the firewall (i.e., application server32A, demo server32B and a second subset of resource servers32C). While embodiments herein describe computing facility comprising LAN30, the computing facility comprising other types of data networks is considered to be within the spirit and scope of the present invention. For example, the data network may comprise a virtual private cloud (VPC) or any type of limited-access data network.

In embodiments described herein, client computer22conveys server requests42to servers32and receives corresponding server responses41from the servers. Each server request42typically comprises a Uniform Resource Locator (URL)46referencing a given server42. In some embodiments, requests42may comprise (and therefore be referred to as) HTTP requests42. In embodiments herein, HTTP requests42may comprise HTTP requests42, HTTP/2 requests42, and Hypertext Transfer Protocol Secure (HTTPS) requests42.

FIG.2is a block diagram that schematically shows hardware and software components of application server32A, in accordance with an embodiment of the present invention. Application server32A may comprise an application memory.50A that stores web-based application28, and an application processor52A that can execute the web-based application from the application memory.

In the configuration shown inFIG.2, web-based application28comprises a set of web pages54, a homepage URL56(i.e., a web address), and one or more software libraries58. Examples of software libraries58include, but are not limited to, JavaScript libraries/frameworks such as REACT, ANGULAR and VUE. In embodiments herein web pages54comprise an example of web resources stored by servers32.

Each web page54may comprise a web page URL60, browser executable code62and one or more assets64. Examples of browser-executable code62include HyperText Markup Language (HTML) code, JavaScript code, Cascading Style Sheet (CSS) code and binary executable code. Examples of assets64include fonts and images, API calls to APIs72and cleartext (e.g., redirect notices, JSON data etc.).

Home URL56typically comprises the web page URL for a given web page54that is a home (i.e., start) page for web-based application28.

FIG.3is a block diagram that schematically shows hardware and software components of a given resource server32C that can host additional web resources (i.e., in addition to the web pages54in web-based application28as described in the description referencingFIG.2hereinabove), that can be accessed by web-based application28, in accordance with an embodiment of the present invention. Examples of the additional web resources include database management systems (DBMS) and application programming interface (API) services such as GOOGLE MAPS™ (produced by ALPHABET INC., Mountain View, CA, USA).

In the configuration shown inFIG.3, the given resource server comprises resource processor520that can execute resource application70(e.g., a DBMS application) from resource memory50C. In one embodiment, resource application70comprises an API72. In this embodiments, web-based application28can access resource application70via API calls to API72. In another embodiment, web-based application28can access resource application70via a given HTTP request42(e.g., a DBMS query embedded in an HTTP request). A given web resource that can be accessed via a given API72may also be referred to as an API resource.

FIG.4is a block diagram that schematically shows hardware and software components client computer22, in accordance with an embodiment of the present invention. Client computer22may comprise a client processor80, a client memory82, a display84and one or more input devices such as a keyboard86and a mouse88.

Memory82can store a stock web browser90, demo application24and demo recording26. In embodiments described herein, processor80executes, from memory82, stock browser90and demo application24and its respective modules. Stock web browser90may comprise any commercially available web browser such as EDGE™ (produced by MICROSOFT CORPORATION, Redmond WA, USA), or other types of browsers such as headless browsers or applications developed using a URL transfer library such as cURL. In one embodiment, as described in the descriptions referencingFIGS.16and17hereinbelow, browser90can retrieve and replay a version of demo recording26stored on demo server32B.

In the configuration shown inFIG.4, demo application24comprises a custom browser module92, a recording module94, a web crawler bot96, a rewrite module98and a local playback module100. In one embodiment custom browser92may be developed using any library that enables a user to develop software applications having web-browser functionality, and may comprise a custom network layer102that is configured to “capture” web resource requests42(i.e., requests42generated by browser-executable code62) to servers32and the respective responses44from the servers. As described in the description referencingFIGS.6-11hereinbelow, recording module94can generate demo recording26by storing the server requests and the responses captured by modified network layer102.

When executing, stock web browser90and custom browser92can present, on display84, a browser frame104comprising a browser address bar106. In response to a user108inputting (e.g., using keyboard86) a given URL46into address bar106, browsers90and92can access a web page (e.g., a given web page54in web-based application28) indicated by the given URL, and present a rendering110of the web page in browser frame104.

In a first recording embodiment, recording module94is configured to create demo recording26by storing requests42and responses44captured by modified network layer102as user108interacts with web-based application28. Creating demo recording26using the first recording embodiment is described in the description referencingFIG.10hereinbelow.

In a second recording embodiment, recording module94is configured to create a recording by storing requests42and responses44captured by modified network layer102as web crawler bot96“crawls” through all web pages54of web-based application28so as to identify all requests42in the web-based application, to convey the identified server requests to their respective servers32, receive responses44to the requests, and store the “crawled” request/response pairs to demo recording26. Creating demo recording26using the second recording embodiment is described in the description referencing.FIG.11hereinbelow.

Rewrite module98is configured to modify demo recording26so that it can be hosted by demo server32B and executed by stock web browser90. Rewriting demo recording26is described in the description referencingFIG.12hereinbelow.

Local playback module100is configured to play back a non-modified version of demo recording26. Using local replay module100to play back demo recording.26is described in the description referencingFIGS.13and14hereinbelow.

In the configuration shown inFIG.4, browser frame104may also comprise a recording button112that toggles (i.e., starts/stops) execution of recording module94, a crawl button114that initiates execution of web crawler bot96, a rewrite button116that initiates execution of rewrite module96and a replay button118that toggles execution of local playback module100.

In some embodiments, memory82may also comprise a cookie store97comprising a set of one or more cookies99that web-based application28and/or recording26can read and/or write when executing on stock browser90or custom browser92. Cookies99typically comprise small blocks of data created by server32while user108is browsing a website and stored to memory82. While not shown in the Figures, servers34may comprise respective cookie stores97.

FIG.5is a block diagram that schematically shows hardware and software components of demo server32B, in accordance with an embodiment of the present invention. Demo server32B may comprise demo processor52B and demo memory50C that can store a remote playback application120. As described in the description referencing.FIGS.15and16hereinbelow, remote playback application120comprises a web-based application comprising browser-executable code that stock browser90can execute so as to enable the stock web browser to access and play back a modified version of demo recording26stored on demo server32B.

Processors52and80comprises general-purpose central processing units (CPU) or special-purpose embedded processors, which are programmed in software or firmware to carry out the functions described herein. This software may be downloaded to client computer22or servers32in electronic form, over a network, for example. Additionally or alternatively, the software may be stored on tangible, non-transitory computer-readable media, such as optical, magnetic, or electronic memory media. Further additionally or alternatively, at least some of the functions of processors52and80may be carried out by hard-wired or programmable digital logic circuits.

In some embodiments, tasks described herein performed by client computer22and servers32may be split among multiple physical and/or virtual computing devices such as physical and/or virtual servers. In other embodiments, these tasks may be performed by a managed cloud service.

FIG.6is a block diagram that schematically shows data components of demo recording26, in accordance with an embodiment of the present invention. In the configuration shown inFIG.6, demo recording26comprises a set of records130, each of the records comprising a request132, a given response134and a flag136. As described hereinbelow, each request132stores a non-modified or modified copy of a given request42, and each response134stores a non-modified or modified copy of a given response44.

In embodiments described herein, demo recording.26comprises two records130for each pair of requests42and responses44captured by modified network layer102. In the first record in the pair, recording module can store a given captured request42(i.e., to a given server32) to request132and store the corresponding captured response44(i.e., from the given server) to response134. Recording module94can then set flag136in the first record to LOCAL, indicating that the first record in the pair can be replayed by local playback module100.

Each request42(and therefore each request132) comprises a given request42for a given web resource138. Examples of web resources138include browser executable code62, assets64, data (e.g., database data that can be requested via a database query) and API services (that can be requested by API calls to respective APIs72). In some embodiments, as shown inFIG.6, response134comprises the requested resource138.

Upon completing recording demo recording26, rewrite module116can store, to the second record in the pair, a rewritten (i.e., modified) request42(i.e., to demo server32B) to request132and store a rewritten response44to response134. Recording module94can then set flag136in the first record to REMOTE, indicating that the second record in the pair can be replayed by stock web browser90. Rewriting records130is described in the description referencingFIG.12hereinbelow.

FIG.7is a block diagram that schematically shows a given response134comprising original browser-executable code140, in accordance with a first response embodiment of the present invention. In the first response embodiment, original browser-executable code140comprises a non-modified copy of a browser-executable code62of a given web page54. Original browser-executable code140typically comprises one or more (non-modified) requests42comprising respective URLs46.

FIG.8is a block diagram that schematically shows a given response134comprising rewritten browser-executable code150, in accordance with a second response embodiment of the present invention. In the second response embodiment, rewritten browser-executable code150comprises a modified copy (i.e., using embodiments described in the description referencingFIG.12hereinbelow) of a browser-executable code62of a given web page54rewritten browser-executable code140typically comprises one or more rewritten requests42comprising respective rewritten URLs46, as described in the description referencingFIG.12hereinbelow).

In a second response embodiment, rewritten browser-executable code150, may comprise a real-time request monitor152that can modify, in real-time, new requests42generated by the rewritten browser-executable code executing on stock web browser90, as described in the description referencingFIGS.15and16hereinbelow. In one second response embodiment, rewrite module98may store real-time request monitor152in responses134(as shown inFIG.8). In another second response embodiment where client computer22requests to execute demo recording26via playback application120, the demo playback application may insert real-time request monitor152in responses134(i.e., comprising rewritten browser-executable code) processor52conveys to the workstation.

FIG.9is a block diagram that schematically shows a given response234comprising an asset160, in accordance with a third response embodiment of the present invention. In the third response embodiment, asset160comprises a copy of a given asset64of a given web page54.

Demo Recording Creation

FIG.10is a flow diagram that schematically illustrates a method of using recording module94to create demo recording26, in accordance with an embodiment of the present invention. In the steps forFIG.10hereinbelow, processor80is executing demo application28.

In step170, demo application24receives a (local) request to create a new demo recording26. In some embodiments, the request comprises a signal from custom browser92indicating mouse88clicked on recording button112.

In step172, demo application24initializes demo recording26. To start recording demo recording26, custom browser starts executing web-based application28by receiving and executing the browser executable code in the web page indicated by home URL56.

In step174, if modified network layer102detects a given request42(i.e., from custom browser92) to a given server32, then in step176, the modified network layer detects the response from the given server. As described supra, the given response may comprise one or more web resources138such as browser executable code62and/or one or more assets64.

When accessing web-based application28when generating (i.e., “recording”) demo recording26, examples of requests42that modified network layer102can detect include:A given HTTP request42from user108indicating a given URL46. For example, custom browser92may generate the given HTTP request in response to user108entering the given URL in address bar106.A given request42for a given web resource138(i.e., additional browser-executable code140or a given asset160) generated by browser-executable code140executing in the custom browser. For example, the browser-executable code executing in the custom browser may comprise an HTML tag that requests an image from a given server32C.

In step178, modified network layer102creates a new record130in demo recording26, and in step180, the modified network layer sets recording flag136in the new record to LOCAL.

In step182, modified network layer102stores, to the new record, the detected server request to request132and stores the detected response (i.e., original browser-executable code140) to server response134.

In step184, custom browser92processes the received response. In one example, if the response comprises browser-executable code62, the custom browser92processes the received response by executing the browser-executable code. In another example, if the response comprises an asset such as an image, the browser-executable code can present the received image in rendering110.

In step186, if recording module94receives a stop recording request42(e.g., the recording module received a signal from custom browser indicating mouse88clicked on recording button.112while generating demo recording26), then in step188, the recording module starts executing rewrite module98so as to modify demo recording26so that it can be stored on demo server32B and executed by stock web browser90. Rewrite module98modifying demo recording26is described in the description referencingFIG.12hereinbelow.

In another embodiment, demo application24can execute rewrite module98in response to receiving a signal from custom browser92indicating mouse88clicked on rewrite but115.

Finally, in step190, recording module conveys (i.e., stores) demo recording26to demo server32B, and the method ends.

Returning to step186, if recording module94does not receive a stop recording request42, then the method returns to step174. Returning to step174, if modified network layer102does not detect a given request42, then the method continues with step186.

While embodiments referenced inFIG.10describe network modified layer102detecting pairs of server requests42and server responses44, other types of software executing on processor80are considered to be within the spirit and scope of the present invention. In a first alternative embodiment, processor80may execute software application such as a browser extension (i.e., for stock web browser90), a network traffic analyzer such as a sniffer or virtual private network software that can detect (and record) the request/response pairs. In an additional embodiment, using a hardware component (i.e., within or coupled to a the client computer generating demo recording26) to detect the request/response pairs is also considered to be within the spirit and scope of the present invention.

FIG.11is a flow diagram that schematically illustrates a method of using recording module94to create demo recording by using web crawler bot96, in accordance with an embodiment of the present invention. In this embodiment, there is no interaction needed from user106to create demo recording for web-based application26. While embodiments described inFIG.100have web crawler bot96crawling multiple web pages54in web-based application.28, executing any software application that can retrieve the multiple web pages so as to generate demo recording26is considered to be within the spirit and scope of the present invention.

In step200, demo application24receives a (local) request, e.g., from user108, to create a new recording by “crawling” web application28. In some embodiments, the request comprises a signal from custom browser indicating mouse88clicked on crawl button114.

In step202, demo application24initializes demo recording26, and in step204, recording module94conveys home URL56to web crawler bot96.

In step206, web crawler bot96retrieves, from application server32A, the web page indicated by home URL56, identifies one or more requests42in the browser-executable code of the retrieved web page, and creates a set comprising the one or more identified server requests.

In step208, web crawler bot96selects the first server request in the set, and in step210, the web crawler bot conveys the selected server request to the server indicated in the selected server request (e.g., the selected server request may comprise a given request42to application server32A or a given resource server323).

In step212, web crawler bot96receives a given response44to the conveyed server request. In embodiments herein, the received response may comprise one or more web resources138such as browser-executable code62and/or one or more assets64.

In step214, if the received response comprises browser-executable code62, then web crawler bot96analyzes the received browser-executable code to see if there are any requests42in the received browser-executable code. If web crawler bot96identifies any requests42in the received browser-executable code, then the web crawler bot adds the identified HPPT request(s) to the set.

In step216, web crawler bot96adds a new record130to demo recording26, and in step218, the web crawler bot stores, to the new record, the selected (i.e., from the set) request (i.e., to request132) and the received response (i.e., to response134).

In step220, if web crawler bot96detects that there are any non-conveyed requests42in the set, then in step222, the web crawler bot selects the next request42in the set, and the method continues with step210.

Returning to step220, if web crawler but96does not detects any non-conveyed requests42in the set, then in step224, the recording module starts executing rewrite module98so as to modify the demo recording so that it can be stored on demo server32B and executed by stock web browser90. Rewrite module98modifying demo recording26is described in the description referencingFIG.12hereinbelow.

In another embodiment, demo application28can execute rewrite module98in response to receiving a signal from custom browser indicating mouse88clicked on rewrite button116.

Finally, in step226, recording module conveys (i.e., stores) demo recording26to demo server32B, and the method ends.

The description referencingFIGS.10and11hereinabove describe two different embodiments for generating demo recording26. When detecting the pairs of requests42and responses44, browser executable code62′ and assets64may referenced via a single domain name36(i.e., for a given server32) or via multiple different domain names36(i.e., for a single server32or for respective servers32).

FIG.12is a flow diagram that schematically illustrates a method of rewriting the responses in demo recording26, in accordance with an embodiment of the present invention. As described supra, demo recording26comprises a pair of records130for each request42and its corresponding response44. Upon completing the embodiments described in the description referencingFIGS.10and11hereinabove, recording module94generated the first records of the pairs comprising non-modified copies of requests42and their corresponding responses44. The steps hereinbelow described generating the second records of the pairs that store rewritten requests42and rewritten responses44.

The following are two examples of requests42that may be stored in demo recording26. The first example is a given HTTP request42for a given web page54and the second example is a given HTTP request42for a Given asset64(note that the HTTP requests may be stored in a given HTTP request132or embedded in browser-executable code62in a given response134):GET /pageX.html HTTP/1.1Host: www.webappX.comGET /assetX HTTP/1.1Host: www.serverX.com

In step230, rewrite module98retrieves request132and response from the first record in demo recording26.

In step232, rewrite module98adds and initializes a new record130to demo recording26, and in step234the rewrite module sets flag136in the first record to REMOTE, indicating that the new record (i.e., the second record in the pair) can be replayed by stock web browser90.

In step236rewrite module98rewrites retrieved request132. In some embodiments, rewrite module98rewrites the server requests so that demo recording26can be stored on demo server32B, and upon client computer22executing stock web browser90to replay the demo recording (i.e., from the demo server), all the server requests in the demo recording are proxied (i.e., redirected) to the demo recording stored on the demo server. For example, if URL46for demo server32B is www.demox.com, then rewrite module98can rewrite the HTTP request examples described supra as follows:GET /www.webappX.com/pageX.html HTTP/1.1Host: www.demox.comGET /www.serverX.com/assetX HTTP/1.1Host: www.demox.comIn these rewritten HTTP requests, the modified URL46is:www.demox.com/www.webappX.com

In step238, rewrite module98stores the rewritten request to request132in the new record.

In step240, rewrite module98analyzes the retrieved response so as to determine whether or not there are any requests42in the retrieved response. If rewrite module98detects any requests42in the retrieved response, then in step242, the rewrite module rewrites the detected requests using embodiments described in step236.

In step244, rewrite module98stores the rewritten response (i.e., rewritten browser-executable code150) to response134in the new record.

In step246rewrite module98analyzes the retrieved response so as to determine whether or not the retrieved response comprises browser-executable code62that comprises JavaScript code or HTML code. If rewrite module98detects any JavaScript code in the retrieved response, then in step248, rewrite module98adds and/or registers to code hooks in the JavaScript code (and in case of HTML adds real-time request monitor monitor152to the JavaScript code), and saves the modified JavaScript and/or modified HTML code (i.e., with the real-time request monitor) to response134in the new record.

In step250, if rewrite module98detects any non-accessed records130in demo recording26, then in step252, the rewrite module retrieves request132and response134from the next record in the demo recording, and the method continues with step232.

Returning to step250, if rewrite module98does not detect any non-accessed records130in demo recording26, then the method ends.

Returning to step246, if rewrite module98does not detect any JavaScript or HTML code in the retrieved response, then the method continues with step250.

Returning to step240, if rewrite module98does not detect any requests42in the retrieved response, then in step254, then rewrite module copies the retrieved response to response134in the new record, and the method continues with step246.

Demo Recording Playback

FIG.13is a flow diagram that schematically illustrates a method of using local playback module100to play back demo recording26on client computer22, andFIG.14is a block diagram that schematically illustrates data flowing through modified network layer102of custom browser92executing on processor80when playing back the demo recording on the client computer, in accordance with an embodiment of the present invention.

In step260, demo application24receives a (local) request to play back demo recording26. In some embodiments, the request comprises a signal from custom browser indicating mouse88clicked on replay button118. In a first playback embodiment demo26recording may be stored on (and retrieved from) demo server32(or any other server that can communicate with client computer22). In a second playback embodiment, demo recording26may be stored on (and retrieved from) memory82in client computer22. When demo recording26is stored on client computer22, demo application24can execute the recording when the client computer is offline (i.e., not connected to any data network such as LAN30).

In step262, custom browser92receives browser-executable code62, and initiates execution of the browser-executable code62in web-based application20. In some embodiments, custom browser92can initiate execution of web-based application28in response to local playback module conveying, to modified network layer102, a request to retrieve, from demo recording26, response134in the first record whose respective flag136is set to LOCAL, and the modified network layer conveying the requested response to the custom browser.

In step264, the browser-executable code executing on custom browser92conveys a given request42to a given server32, and in step266modified network layer102detects (i.e., “captures”) the conveyed server request.

In step268, modified network layer102searches demo recording26so as to find a given record130whose request132matches the conveyed request. In some embodiments, modified network layer102can restrict the search by only searching records130whose respective flags136are set to LOCAL.

In step270modified network layer102detected a matching record130, then in step272, the modified network layer conveys response134in the matching record to the browser-executable code, and the method ends.

Returning to step270, if modified network layer102does not detect a matching record, then in step274, the modified network layer can generate an error message, and the method ends. In some embodiments, upon modified network layer102generating the error message, modified network layer can present the error message in rendering110on display84.

While the steps for local recording and local playback described in the descriptions referencingFIGS.10and14are performed by processor80(i.e., a single client computer22), having processor80generate demo recording26(i.e., as described in the description referencingFIG.10hereinabove), and having an additional processor80in an additional client22(not shown) play back the demo recording (i.e., as described in the description referencingFIG.14hereinabove) is considered to be within the spirit and scope of the present invention.

FIG.15is a flow diagram that schematically illustrates a method of client computer22playing back demo recording26stored on a demo server32B, andFIG.16is a block diagram that schematically illustrates data flowing between the stock browser executing on client computer22and the demo server when playing back the demo recording, in accordance with an embodiment of the present invention.

In embodiments described hereinbelow, processor80executes stock browser90, which can access, via playback application120, demo recording26on demo server32E. When executing demo recording26via playback application120, the playback application may “wrap” real-time request monitor152around rewritten browser-executable code150, thereby enable the real-time request monitor to “trap” any requests42dynamically generated by the rewritten browser-executable code.

In step280, processor52E receives, from stock web browser90executing on processor80, a request to play back demo recording26. In one embodiment, the request may comprise:A first request from stock browser90to execute (i.e., download and execute) playback application120.A second request from playback application120to demo recording26.

In step282, processor52B identifies, in demo recording26in response to receiving the request, the first record130whose respective flag136is set to REMOTE and in step284, the demo processor conveys, to client computer, response134in the first record. Since the first record is typically the starting point for the demo recording, response134in the first record may rewritten browser-executable code150.

Upon receiving response134, in step286, stock web browser90initiates execution of the (rewritten) browser-executable code in the received response. While executing the (rewritten) browser-executable code, stock web browser90may convey, to demo server323, one or more requests42that are in the executing code. Upon receiving the each conveyed request.42, processor623identifies a given record130whose respective request.132matches the received request, and conveys response44(comprising response134in the identified record) to (the stock web browser executing in) client computer22.

While the server requests were conveyed to application server32A and possibly to one or more resource servers32C during the recording process, the records130created by rewrite module98comprise requests132that are rewritten (using embodiments describes supra) so that the server requests are conveyed to demo server32B during remote playback. This can be implemented by restricting stock web browser90to only access records130whose respective flags136are set to REMOTE.

In some embodiments, when stock browser90executes rewritten browser-executable code150, the rewritten browser-executable code may dynamically generate a given request42that attempts to access or manipulate a resource that is not available to processor80executing the stock browser. These dynamic requests may not be detected by static code analysis methods used by the rewrite embodiments described in the description referencingFIG.12hereinabove.

In step288, if real-time request monitor152detects, while executing the (rewritten) browser-executable code, any requests42to access or manipulate a resource not available to processor to processor80executing the stock browser, then in step290the real-time request monitor invokes rewrite module98so as to modify (i.e., rewrite) the one or more detected server requests using embodiments described supra, and in step292, stock web browser90executes the modified request. In some embodiments, modifying a given request may comprise generating a simulated response to the request.

As described supra, real-time request monitor152may be inserted into rewritten browser-executable code150by rewrite module98(during the rewrite process) or playback application120(when conveying, to the workstation the rewritten code in a given response44). In some embodiments rewrite module98may insert a first instance of real-time request monitor152into browser-executable code150, and playback application120may insert a second (and different) instance of the real-time request monitor into the browser-executable code.

In one example, rewritten browser executable code159may dynamically generate a given request42to retrieve the IP address currently being accessed by stock browser90, and compare the retrieved IP address to one or more valid IP addresses. In this example, real-time request monitor152can dynamically (i.e., while executing the browser executable code comprising the real-time request monitor) modify the given request so that the corresponding response44comprises a given valid IP address.

In another example, rewritten browser executable code159may dynamically generate a given request42to access a given browser frame104that may not exist during playback. In this example, real-time request monitor152can modify the given request so that the corresponding response44indicates successful access to the given browser frame.

In an additional example, rewritten browser executable code150may dynamically generate a given request42to write (i.e., convey) a given cookie97to a given server34(i.e., other than demo server34B). In this example, real-time request monitor152can modify the given request so that either (a) the executing rewritten browser executable code150conveys the given cookie to demo server34B, or (b) the real-time request monitor can provide, to the rewritten browser executable code159, and indication that the given cookie was successfully written to the given server.

In some embodiments, monitor152can detect a given dynamically generated request by detecting, while executing the (rewritten) browser-executable code, any new Document Object Model (DOM) elements300in DOM302(FIG.16), and analyzing the new DOM element(s) so as to determine whether or not any of the new DOM element(s) comprise any new (i.e., not rewritten) requests42.

Returning to step288, if real-time request monitor152does not detect, while executing the (rewritten) browser-executable code, any requests42to access or manipulate a resource not available to processor to processor80executing the stock browser, then the method ends.

During remote playback, requests132in records130in demo recording26may be referenced via a single domain name36(i.e., for a given server32) or via multiple different domain names36(i.e., for a single server32or for respective servers32). For example, records130comprising rewritten browser-executable code150may be stored on a first given server32, and records130comprising assets160can be stored on the first given server and/or a second given server32.