IP Library › Granted Patent US 12,298,890
Granted Patent B2
US 12,298,890 · App. 17/823,199 · Granted May 13, 2025

Generation device, method of generation, and computer program product

Inventors: Takeshi Sakoda (Tokyo, JP); Yumiko Sakai (Fujisawa Kanagawa, JP); Tomonori Maegawa (Tokyo, JP)
Assignee: Kabushiki Kaisha Toshiba
G06F11/3684G06F11/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 12,298,890
App. No.
17/823,199
Granted
May 13, 2025
Kind
B2
Abstract

According to an embodiment, a generation device includes an analysis unit, a test scenario generation unit, and a test code generation unit. The analysis unit is configured to analyze a definition file that defines a structure of web application programming interface (Web API) and generate structure analysis data of the Web API. The test scenario generation unit is configured to generate test scenario data of the Web API from a test setting file and the structure analysis data. The test setting file including a test type of the Web API and a test item depending on the test type. The test code generation unit is configured to generate test code for testing the Web API based on the test scenario data.

Claims (35)

1. A generation device comprising:

an analysis unit configured to analyze a definition file that defines a structure of web application programming interface (Web API) and generate structure analysis data of the Web API;

a test scenario generation unit configured to generate test scenario data of the Web API from a test setting file and the structure analysis data, the test setting file including a test type of the Web API and a test item depending on the test type; and

a test code generation unit configured to generate test code for testing the Web API based on the test scenario data,

wherein

the structure analysis data includes parameter information of the Web API;

the test type includes a parameter type of the Web API;

the test item depending on the parameter type includes at least one of an upper limit, a lower limit, a standard value, and an abnormal value according to the parameter type; and

the test scenario generation unit generates test scenario data in which a parameter specified from the parameter information of the Web API is tested, as a test item depending on the parameter type, at least for one of the upper limit, the lower limit, the standard value, and the abnormal value according to the parameter type.

2. The device according to claim 1 , wherein

the structure analysis data includes flow information of the Web API;

the test type includes a flow type of the Web API; and

the test scenario generation unit generates test scenario data in which a flow specified from the structure analysis data of the Web API is tested with a test item depending on the flow type.

3. The device according to claim 2 , wherein the test item depending on the flow type includes a test for confirming an execution sequence of a series of processing included in the flow.

4. The device according to claim 1 , wherein the definition file is written in machine-readable format.

5. The device according to claim 4 , wherein the machine-readable format includes OpenAPI, Web Services Description Language (WSDL), and Simple Object Access Protocol (SOAP).

6. The device according to claim 1 , wherein the test setting file is written in Domain-Specific Language (DSL).

7. A method of generation implemented by a computer, the method comprising:

analyzing a definition file that defines a structure of web application programming Interface (Web API) and generating structure analysis data of the Web API, with a generation device;

generating test scenario data of the Web API from a test setting file and the structure analysis data, with the generation device, the test setting file including a test type of the Web API and a test item depending on the test type; and

generating test code for testing the Web API based on the test scenario data, with the generation device,

wherein

the structure analysis data includes parameter information of the Web API;

the test type includes a parameter type of the Web API;

the test item depending on the parameter type includes at least one of an upper limit, a lower limit, a standard value, and an abnormal value according to the parameter type; and

generating of the test scenario data includes generating test scenario data in which a parameter specified from the parameter information of the Web API is tested, as a test item depending on the parameter type, at least for one of the upper limit, the lower limit, the standard value, and the abnormal value according to the parameter type.

8. A computer program product comprising a non-transitory computer-readable medium including programmed instructions stored therein, the instructions causing a computer to function as:

an analysis unit that analyzes a definition file that defines a structure of web application programming interface (Web API) and generates structure analysis data of the Web API;

a test scenario generation unit that generates test scenario data of the Web API from a test setting file and the structure analysis data, the test setting file including a test type of the Web API and a test item depending on the test type; and

a test code generation unit that generates test code for testing the Web API based on the test scenario data,

wherein

the structure analysis data includes parameter information of the Web API;

the test type includes a parameter type of the Web API;

the test item depending on the parameter type includes at least one of an upper limit, a lower limit, a standard value, and an abnormal value according to the parameter type; and

the test scenario generation unit generates test scenario data in which a parameter specified from the parameter information of the Web API is tested, as a test item depending on the parameter type, at least for one of the upper limit, the lower limit, the standard value, and the abnormal value according to the parameter type.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 7, 2023
From: SAKODA, TAKESHI; SAKAI, YUMIKO; MAEGAWA, TOMONORI
To: KABUSHIKI KAISHA TOSHIBA
Reel/Frame 062903/0707 →
Priority Claims (1)
JP 2021-182566 · Nov 9, 2021 · national
Continuity (1)
Related Publication 20230141619A1 · May 11, 2023
References Cited (15)
US 10361944B2 · Chavda · 2019 [cited by examiner]
US 10409711B2 · Dolby · 2019 [cited by examiner]
US 11675691B2 · Sathianarayanan · 2023 [cited by examiner]
US 20050166186A1 · Cabrera et al. · 2005 [cited by applicant]
US 20210216443A1 · Park et al. · 2021 [cited by applicant]
JP 2005235094A · 2005 [cited by applicant]
JP 5008829B2 · 2012 [cited by applicant]
JP 5379526B2 · 2013 [cited by applicant]
JP 201432535A · 2014 [cited by applicant]
JP 6724673B2 · 2020 [cited by applicant]
JP 2021111367A · 2021 [cited by applicant]
Zhu et al., “Mining API Usage Examples from Test Code”, 2014, IEEE, pp. 301-310. (Year: 2014). [cited by examiner]
Wang et al., “Poster: Cloud API Testing”, 2017, IEEE, pp. 385-386. (Year: 2017). [cited by examiner]
Kuldeep Rana., “Test Scenario”, 2020, https://artoftesting.com, 6 pages. (Year: 2020). [cited by examiner]
Japan Patent Office, Office Action in JP App. No. 2021-182566, 2 pages, and machine translation, 3 pages (Dec. 24, 2024). [cited by applicant]