IP Library Granted Patent US 9,098,636
Granted Patent B2
US 9,098,636 · App. 14/132,794 · Granted Aug 4, 2015

White-box testing systems and/or methods in web applications

Inventors: Rocco De Angelis (Schwalbach, DE); Vittorio De Angelis (Schwalbach, DE)
Assignee: SOFTWARE AG
G06F11/3688G06F11/3692
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,098,636
App. No.
14/132,794
Granted
Aug 4, 2015
Kind
B2
Abstract

Certain example embodiments relate to white-box testing techniques, e.g., for graphical user interfaces (GUIs). Responsive to a first parameter received from a test suite executer, test bootstrap code included in an application is executed, where the application and the test suite executer run in the same browser. A test case to be run on the application and a test case executer to execute the test case are retrieved by the executed test bootstrap code. The retrieved test case is executed in a same context of the browser as the application. Results from executing the test case are stored.

Claims (60)

1. A method of testing an application on a computer system that includes at least one hardware processor, the method comprising:

loading, within a first context of a web browser, client-side code for an application, the client-side code including test bootstrap code;

responsive to a first parameter received from a test suite executer, executing, within the first context of the web browser, the test bootstrap code included in the web application by using the computer system, wherein the web application and the test suite executer run in the web browser;

retrieving, by the executed test bootstrap code, a test case to be run on the web application and a test case executer to execute the test case, wherein the retrieving comprises:

dynamically requesting, based on execution of the test bootstrap code, the test case from a remote computer;

responsive to the dynamic request, receiving the test case and the test case executer, the test case and the test case executer being client-side code that is to be loaded within the first context of the web browser; and

injecting the client-side code of the received test case and the test case executer within the first context of the web browser;

executing the injected client-side code within the first context of the web browser; and

storing results based on execution of the retrieved test case.

2. The method according to claim 1 , wherein the test bootstrap code is compiled together with other client-side code for the web application.

3. The method of according to claim 1 , wherein the injected test case and the injected test case executer are compiled and/or obfuscated together with the web application.

4. The method according to claim 1 , wherein the executing the test case comprises performing said execution of the test case by the injected test case executer.

5. The method according to claim 4 , wherein the performing execution of the test case comprises:

inputting to the web application, by the injected test case executer, user actions that cause execution of processing steps by the web application; and

validating the results, wherein the results are based upon the executed processing steps.

6. The method according to claim 1 , wherein, as part of executing the test case, one or more internal functions of the web application is/are called from within the injected test case code.

7. The method according to claim 1 , wherein the received test case code is received as a separate file.

8. The method according to claim 1 , further comprising starting the test suite executer in the browser, wherein the starting includes:

loading code of the test suite executer from a computer;

injecting the loaded code of the test suite executer to a page of the web browser; and

executing the injected code of the test suite executer to provide the first parameter.

9. The method according to claim 8 , further comprising:

obtaining, responsive to requests from the test suite executer, one or more test case definitions including a test case definition for the test case, wherein the test case definition for the test case comprises an identifier for the test case and an address of the web application; and

configuring one or more data structures in a shared memory for storing the results.

10. The method according to claim 9 , wherein the test case code is not included in the obtained test definitions.

11. The method according to claim 9 , further comprising:

upon obtaining a test case definition for the test case, generating a new browser context that is separate from the context in which the test suite executer is running; and

accessing, by the test case executer, the web application from within the generated new browser context to cause said test bootstrap code included in the web application to execute within the first context.

12. The method according to claim 9 , further comprising:

detecting completion of the execution of the test case; and

reporting the results from the shared memory.

13. The method according to claim 1 , wherein the client-side code of the web application comprises compiled and/or obfuscated code.

14. The method according to claim 1 , wherein the testing includes white-box testing.

15. A computer system for testing a web application, the computer system comprising:

first processing resources including at least one processor and a memory;

second processing resources communicatively connected to the first processing resources over a network; and

storage connected to the second processing resources, the storage being configured to store a plurality of test cases, each said test case including (a) interactions between the web application and components external to the web application that were gathered during a run of the web application and received user input from a user, and (b) assertions to be made to the web application once the web application reaches a desired test state,

the at least one processor configured to perform operations comprising:

responsive to a first parameter being received from a test suite executer, execute, within a first context of a web browser that is running on the computer system, test bootstrap code included in the web application, wherein the web application and the test suite executer are both run within the web browser;

retrieve, in accordance with the executed test bootstrap code, a test case to be run on the web application and a test case executer to execute the test case, the retrieved test case and the retrieved test case executer being client-side code that is loaded within the first context of the web browser;

execute the retrieved test case within the first context of the web browser, which is the same context in which the web application is executing, or to be executed; and

store, to a storage medium, results from executing the retrieved test case,

wherein retrieval of the test case comprises:

requesting, in accordance with the executed test bootstrap code, the test case from the second processing resources;

responsive to the requesting, receiving the test case and the test case executer from the storage; and

injecting the received test case and the test case executer to the web application as client-side code that is to be executed within the first context of the web browser.

16. The computer system according to claim 15 , wherein the injected test case and the injected test case executer are compiled and/or obfuscated together with other client-side code of the web application.

17. The computer system according to claim 15 , wherein the executing the retrieved test case comprises performing said execution of the test case by the injected test case executer.

18. The computer system according to claim 15 , wherein the at least one processor is configured to perform operations further comprising starting the test suite executer in the web browser, wherein the starting includes:

receiving code of the test suite executer from the second processing resources;

injecting the received code of the test suite executer to a page of the web browser; and

executing the injected code of the test suite executer to provide the first parameter.

19. A non-transitory computer readable storage medium having stored thereon instructions, that when executed by a computer, cause the computer to perform operations comprising:

loading, within a first context of a web browser, client-side code for a web application, the client-side code including test bootstrap code;

responsive to a first parameter received from a test suite executer, executing, within the first context of the web browser that is running on the computer system, the test bootstrap code included in the web application, wherein the web application and the test suite executer are both run within the web browser;

dynamically requesting, based on execution of the test bootstrap code, a test case from another computer that is remotely located from the computer system on which the web browser is running, the test case and a test case executer being client-side code that is to be loaded within the first context of the web browser;

receiving the requested test case;

dynamically injecting the client-side code of the received test case and the test case executer within the first context of the web browser;

executing the test case within the first context of the web browser; and

storing, to a storage medium, results from executing the test case.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 9, 2025
From: SOFTWARE GMBH
To: SAG ARIS GMBH
Reel/Frame 072867/0138 →
MERGER Recorded Dec 17, 2024
From: SOFTWARE AG
To: MOSEL BIDCO AG
Reel/Frame 069888/0666 →
CHANGE OF NAME Recorded Dec 17, 2024
From: MOSEL BIDCO AG
To: SOFTWARE GMBH
Reel/Frame 069888/0673 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 18, 2013
From: DE ANGELIS, ROCCO; DE ANGELIS, VITTORIO
To: SOFTWARE AG
Reel/Frame 031812/0445 →
Continuity (1)
Related Publication 20150169434A1 · Jun 18, 2015