Sign In to Follow Application
View All Documents & Correspondence

Method And System For Generating Test Scripts

Abstract: METHOD AND SYSTEM FOR GENERATING TEST SCRIPTS ABSTRACT The method and system for generating test script from product requirements is disclosed. The method may include classifying a product requirement into a corresponding category of a plurality of predefined categories, using a first pre-trained machine learning (ML) model and obtaining a set of predefined questions corresponding to the product requirement, based on the category associated with the product requirement, from a database. The method may further include determining an answer-value corresponding to each predefined question of the set of predefined questions, using a second pre-trained machine learning (ML) model and generating a test script based on the set of predefined questions and the answer value corresponding to each question of the set of questions. [To be published with FIG. 3]

Get Free WhatsApp Updates!
Notices, Deadlines & Correspondence

Patent Information

Application #
Filing Date
13 April 2023
Publication Number
22/2023
Publication Type
INA
Invention Field
COMPUTER SCIENCE
Status
Email
Parent Application

Applicants

HCL Technologies Limited
806, Siddharth, 96, Nehru Place, New Delhi - 110019, INDIA

Inventors

1. Sourabh Prakash
HCL Technologies Limited Bangalore SEZ, No. 129, Jigani Bomasandra, Link Road, Jigani Industrial Area Bangalore 562106, India
2. Rakesh Kumar Sidharthan
HCL Technologies Limited No 602/3 Elcot Economic Zone, Sholinganallur Village, Medavakkam High Road, Chennai, Tamil Nadu, India, 600119
3. Siva Sakthivel S
HCL Technologies Limited No 602/3 Elcot Economic Zone, Sholinganallur Village, Medavakkam High Road, Chennai, Tamil Nadu, India, 600119
4. Sujeet Kumar
HCL Technologies Limited No 602/3 Elcot Economic Zone, Sholinganallur Village, Medavakkam High Road, Chennai, Tamil Nadu, India, 600119

Specification

Description:in English language. Further, symbols such as “=”, “@”, “$”, and “#” need to be identified and replaced with their equivalent English substitute text tokens, such as “equal to”, “at the rate”, “dollar”, and “hash”, respectively, for greater accuracy.
[033] An example product requirement 400A is depicted in FIG. 4A. As shown in FIG. 4A, the example product requirement 400A includes the text “The operational software shall be able to vary the Temperature sensor ranges at the minimum range as 25 and maximum range as 100”.
[034] At step 304, the product requirement may be classified into a corresponding category of a plurality of predefined categories, using a first pre-trained machine learning (ML) model. The product requirement may be classified into a corresponding category of the plurality of predefined categories based on a context associated with each of the one or more product requirements. In some embodiments, the context associated with each of the one or more product requirements may be determined using a natural language processing (NLP) model.
[035] The product requirements may be classified into corresponding categories using a text classification model (for example, a machine learning (ML)-based model) that classifies the text into different categories by analyzing the content (i.e. context of the text), using natural language processing (NLP). The text may be classified based on the complexity of requirements, using any conventional text classification model. The text classification model may be a deep learning neural network (i.e. the first pre-trained ML model), which is trained to categorize the product requirements. The data corresponding to input and expected output of the first pre-trained ML model needs to be acquired. As such, for the first pre-trained ML model, the product requirement and corresponding category are set as input and output, respectively.
[036] FIG. 4B shows a category 400B into which the product requirement 400A is classified into. For example, as shown in FIG. 4B, the category 400B is category “C-11” related to “Analog sensor with range of values”.
[037] At step 306, a set of predefined questions corresponding to the product requirement may be obtained. The predefined questions may be obtained based on the category associated with the product requirement, from a database. For example, each category may be mapped to the set of predefined questions.
[038] FIG. 4C shows a set of predefined questions 400C obtained based on the category 400B associated with the product requirement 400A. As shown, the set of predefined questions 400C include “Which sensor?”, “What is the maximum range?” and “What is the minimum range?”.
[039] At step 308, an answer-value corresponding to each predefined question of the set of predefined questions may be determined, using a second pre-trained machine learning (ML) model. In other words, at step 308, answers corresponding to the set of predefined questions may be detected. For example, in some embodiments, in order to detect the answer-values, a second pre-trained ML model, i.e. different from the first pre-trained ML model may be used. Alternately, in some embodiments, the second pre-trained ML model may be the same as the first pre-trained ML model. The second pre-trained ML model may retrieve information from the product requirement documents and prepare the answer-values. The answer-values may describe variables and the values that need to be set, to test the product requirements. As such, the second pre-trained ML model may use the predefined questions and corresponding answers that need to be derived from the product requirements as output. After receiving answer-values, the answer-values may be sent to a prewritten skeleton (i.e. a predetermined template) of the test script (as explained in conjunction with steps 310A-310B).
[040] The first ML model and the second ML model may be trained using training data based on supervisory training. Further, a pre-trained model or a new model can be trained for better accuracy. As will be understood, a pre-trained ML model is one which is already trained on data.
[041] FIG. 4D shows answer values 400D corresponding to the set of predefined questions 400C. As shown, for the predefined question “Which sensor?” the corresponding answer value determined is “Temperature sensor”; for the predefined question “What is the maximum range?”, the corresponding answer value determined is “100”; and for the predefined question “What is the minimum range?”, the corresponding answer value determined is “25”.
[042] At step 310, a test script may be generated based on the set of predefined questions and the answer value corresponding to each question of the set of questions. In some embodiments, in order to generate the test script, the method 300 may include additional steps 310A-310B. At step 310A, a predetermined test-script template corresponding to the category associated with the product requirement may be obtained. At step 310B, the predetermined template associated with the test script may be populated with answer values corresponding to the set of predefined questions, to generate a test script map. The test script map may include one or more question values associated with each of the set of predefined questions. The test script map may further include the answer value corresponding to each of the one or more question values associated with each of the set of predefined questions. The predetermined template may include place holders to populate various parameters and arguments. Further, the predetermined template may have different labels to identify the corresponding locations that need to be filled.
[043] At step 312, the test script may be generated based on the test script map. As such, the predetermined template is transformed to an actual test script with populated variables.
[044] FIG. 4E show a test script 400E generated based on the set of predefined questions 400C and the answer values 400D corresponding to each question of the set of questions 400C.
[045] Referring now to FIGs. 5A-5B, a process flow diagram of an example process 500 of generating test script from product requirements is illustrated, in accordance with some embodiments. The process 500 is explained with respect to example functional requirements of a water dispenser.
[046] At step 502, product requirements associated with the water dispenser are received. For example, as shown in FIG. 5, three different functional requirements describing the logical functions of the product may be considered.
[047] At step 504, the product requirements are classified into a corresponding category of a plurality of predefined categories, using the first pre-trained machine learning (ML) model. The product requirements may be classified into a corresponding category of the plurality of predefined categories based on the context associated therewith. For example, the context associated with the product requirements may be determined using a Natural Language Processing (NLP) model. The text of the product requirements may be classified based on the complexity of product requirements, using any ML-based conventional text classification model. Further, at step 504, a set of predefined questions corresponding to the product requirements may be obtained. The predefined questions may be obtained based on the category associated with the product requirements, from a database. The product requirements may be categorized according to the complexity of the logic described by them. For example, logical condition “C-1” indicates “lesser complexity”, and logical condition “C-3” indicates “greater complexity”. Each category may have a set of predefined questions. In the example process 500, the number of logical conditions and the corresponding variables that need to be tested are queried using the predefined questions.
[048] At step 506, an answer-value corresponding to each predefined question of the set of predefined questions may be determined, using the second pre-trained machine learning (ML) model. As such, answers corresponding to the set of predefined questions may be detected, at step 506. The answer-values may describe variables and the values that need to be set, to test the product requirements. As such, the second pre-trained ML model may use the predefined questions and corresponding answers that need to be derived from the product requirements as output. After receiving answer-values, the answer-values may be sent to a predetermined template of the test script.
[049] As such, answers are extracted for the set of predefined questions from the requirement descriptions. For example, the answer for the first question “What shall be set?” enables to identify the variable name, and the values that needs to be tested. Similarly, the question “What is C1-4?” provides answers from the variables that need to be set and their corresponding values. The variables and the values are populated in the predetermined template of the test script.
[050] At step 508, a test script is generated based on the set of predefined questions and the answer value corresponding to each question of the set of questions. In some embodiments, in order to generate the test script, first, the predetermined test-script template corresponding to the category associated with the product requirement may be obtained. Thereafter, the predetermined template associated with the test script may be populated with answer values corresponding to the set of predefined questions, to generate a test script map. The test script map may include one or more question values associated with each of the set of predefined questions. The test script map may further include the answer value corresponding to each of the one or more question values associated with each of the set of predefined questions. The predetermined template may include place holders to populate various parameters and arguments. Further, the predetermined template may have different labels to identify the corresponding locations that need to be filled. The test script may be generated based on the test script map. In other words, the predetermined template is transformed to an actual test script with populated variables.
[051] Referring now to FIG. 6, an exemplary computing system 600 that may be employed to implement processing functionality for various embodiments (e.g., as a SIMD device, client device, server device, one or more processors, or the like) is illustrated. Those skilled in the relevant art will also recognize how to implement the invention using other computer systems or architectures. The computing system 600 may represent, for example, a user device such as a desktop, a laptop, a mobile phone, personal entertainment device, DVR, and so on, or any other type of special or general-purpose computing device as may be desirable or appropriate for a given application or environment. The computing system 600 may include one or more processors, such as a processor 602 that may be implemented using a general or special purpose processing engine such as, for example, a microprocessor, microcontroller or other control logic. In this example, the processor 602 is connected to a bus 604 or other communication media. In some embodiments, the processor 602 may be an Artificial Intelligence (AI) processor, which may be implemented as a Tensor Processing Unit (TPU), or a graphical processor unit, or a custom programmable solution Field-Programmable Gate Array (FPGA).
[052] The computing system 600 may also include a memory 606 (main memory), for example, Random Access Memory (RAM) or other dynamic memory, for storing information and instructions to be executed by the processor 602. The memory 606 also may be used for storing temporary variables or other intermediate information during the execution of instructions to be executed by processor 602. The computing system 600 may likewise include a read-only memory (“ROM”) or other static storage device coupled to bus 604 for storing static information and instructions for the processor 602.
[053] The computing system 600 may also include storage devices 608, which may include, for example, a media drive 610 and a removable storage interface. The media drive 610 may include a drive or other mechanism to support fixed or removable storage media, such as a hard disk drive, a floppy disk drive, a magnetic tape drive, an SD card port, a USB port, a micro-USB, an optical disk drive, a CD or DVD drive (R or RW), or other removable or fixed media drive. A storage media 612 may include, for example, a hard disk, magnetic tape, flash drive, or other fixed or removable media that is read by and written to by the media drive 610. As these examples illustrate, the storage media 612 may include a computer-readable storage medium having stored therein particular computer software or data.
[054] In alternative embodiments, the storage devices 608 may include other similar instrumentalities for allowing computer programs or other instructions or data to be loaded into the computing system 600. Such instrumentalities may include, for example, a removable storage unit 614 and a storage unit interface 616, such as a program cartridge and cartridge interface, a removable memory (for example, a flash memory or other removable memory module) and memory slot, and other removable storage units and interfaces that allow software and data to be transferred from the removable storage unit 614 to the computing system 600.
[055] The computing system 600 may also include a communications interface 618. The communications interface 618 may be used to allow software and data to be transferred between the computing system 600 and external devices. Examples of the communications interface 618 may include a network interface (such as an Ethernet or other NIC card), a communications port (such as for example, a USB port, a micro-USB port), Near field Communication (NFC), etc. Software and data transferred via the communications interface 618 are in the form of signals which may be electronic, electromagnetic, optical, or other signals capable of being received by the communications interface 618. These signals are provided to the communications interface 618 via a channel 620. The channel 620 may carry signals and may be implemented using a wireless medium, wire or cable, fiber optics, or other communications medium. Some examples of the channel 620 may include a phone line, a cellular phone link, an RF link, a Bluetooth link, a network interface, a local or wide area network, and other communications channels.
[056] The computing system 600 may further include Input/Output (I/O) devices 622. Examples may include, but are not limited to a display, keypad, microphone, audio speakers, vibrating motor, LED lights, etc. The I/O devices 622 may receive input from a user and also display an output of the computation performed by the processor 602. In this document, the terms “computer program product” and “computer-readable medium” may be used generally to refer to media such as, for example, the memory 606, the storage devices 608, the removable storage unit 614, or signal(s) on the channel 620. These and other forms of computer-readable media may be involved in providing one or more sequences of one or more instructions to the processor 602 for execution. Such instructions, generally referred to as “computer program code” (which may be grouped in the form of computer programs or other groupings), when executed, enable the computing system 600 to perform features or functions of embodiments of the present invention.
[057] In an embodiment where the elements are implemented using software, the software may be stored in a computer-readable medium and loaded into the computing system 600 using, for example, the removable storage unit 614, the media drive 610 or the communications interface 618. The control logic (in this example, software instructions or computer program code), when executed by the processor 602, causes the processor 602 to perform the functions of the invention as described herein.
[058] One or more techniques for generating test script from product requirements are disclosed. The above techniques do away with the requirement of Behavior-driven development (BDD) or keyword-based method to generate test script from the test cases. BDD requires creation of keywords and its corresponding test scripts manually. Instead, the techniques of the present disclosure directly generate the test scripts from the requirements, thereby ensuring comprehensive test coverage and lesser manual effort. Further, the techniques provide for creation of a test script template, and rely on predefined questions and answer-values to populate the variables to create a test script automatically from the test script template. As such, the product requirements or test cases can be written in the normal plain language (e.g. English language) while requiring minimal programming skills or product knowledge. Further, tester effort is significantly reduced since manual intervention is minimal. Furthermore, chances of errors induced due to manual work in defining variables and values for test scripts are reduced.
[059] It is intended that the disclosure and examples be considered as exemplary only, with a true scope and spirit of disclosed embodiments being indicated by the following claims.
, Claims:CLAIMS
We claim:
1. A method generating test script from product requirements, the method comprising:
classifying, by a test script generating device, a product requirement into a corresponding category of a plurality of predefined categories, using a first pre-trained machine learning (ML) model;
obtaining, by the test script generating device, a set of predefined questions corresponding to the product requirement, based on the category associated with the product requirement, from a database;
determining, by the test script generating device, an answer-value corresponding to each predefined question of the set of predefined questions, using a second pre-trained machine learning (ML) model; and
generating, by the test script generating device, a test script based on the set of predefined questions and the answer value corresponding to each question of the set of questions.

2. The method as claimed in claim 1, wherein the product requirement is classified into a corresponding category of the plurality of predefined categories based on a context associated with each of the one or more product requirements.

3. The method as claimed in claim 2, wherein the context associated with each of the one or more product requirements is determined using a natural language processing (NLP) model.

4. The method as claimed in claim 2, wherein generating the test script comprises:
obtaining a predetermined test-script template corresponding to the category associated with the product requirement;
populating the predetermined template associated with the test script with answer values corresponding to the set of predefined questions, to generate a test script map comprising:
one or more question values associated with each of the set of predefined questions; and
the answer value corresponding to each of the one or more question values associated with each of the set of predefined questions; and
generating the test script based on the test script map.

5. The method as claimed in claim 1, further comprising:
pre-processing the product requirement, the pre-processing comprising replacing a symbol within a text of the product requirement with a substitute text token.

6. A system for generating test script from product requirements, the system comprising:
a processor; and
a memory communicatively coupled to the processor, wherein the memory stores a plurality of processor-executable instructions, which upon execution by the processor, cause the processor to:
classify a product requirement into a corresponding category of a plurality of predefined categories, using a first pre-trained machine learning (ML) model;
obtain a set of predefined questions corresponding to the product requirement, based on the category associated with the product requirement, from a database;
determine an answer-value corresponding to each predefined question of the set of predefined questions, using a second pre-trained machine learning (ML) model; and
generate a test script based on the set of predefined questions and the answer value corresponding to each question of the set of questions.

7. The system as claimed in claim 6, wherein the product requirement is classified into a corresponding category of the plurality of predefined categories based on a context associated with each of the one or more product requirements.

8. The system as claimed in claim 6, wherein the context associated with each of the one or more product requirements is determined using a natural language processing (NLP) model.

9. The system as claimed in claim 6, wherein generating the test script comprises:
obtaining a predetermined test-script template corresponding to the category associated with the product requirement;
populating the predetermined template associated with the test script with answer values corresponding to the set of predefined questions, to generate a test script map comprising:
one or more question values associated with each of the set of predefined questions; and
the answer value corresponding to each of the one or more question values associated with each of the set of predefined questions; and
generating the test script based on the test script map.

10. The system as claimed in claim 5, wherein the processor-executable instructions further cause the processor to:
pre-processing the product requirement, the pre-processing comprising replacing a symbol within a text of the product requirement with a substitute text token.

Documents

Application Documents

# Name Date
1 202311027481-STATEMENT OF UNDERTAKING (FORM 3) [13-04-2023(online)].pdf 2023-04-13
2 202311027481-REQUEST FOR EXAMINATION (FORM-18) [13-04-2023(online)].pdf 2023-04-13
3 202311027481-REQUEST FOR EARLY PUBLICATION(FORM-9) [13-04-2023(online)].pdf 2023-04-13
4 202311027481-PROOF OF RIGHT [13-04-2023(online)].pdf 2023-04-13
5 202311027481-POWER OF AUTHORITY [13-04-2023(online)].pdf 2023-04-13
6 202311027481-FORM-9 [13-04-2023(online)].pdf 2023-04-13
7 202311027481-FORM 18 [13-04-2023(online)].pdf 2023-04-13
8 202311027481-FORM 1 [13-04-2023(online)].pdf 2023-04-13
9 202311027481-FIGURE OF ABSTRACT [13-04-2023(online)].pdf 2023-04-13
10 202311027481-DRAWINGS [13-04-2023(online)].pdf 2023-04-13
11 202311027481-DECLARATION OF INVENTORSHIP (FORM 5) [13-04-2023(online)].pdf 2023-04-13
12 202311027481-COMPLETE SPECIFICATION [13-04-2023(online)].pdf 2023-04-13
13 202311027481-Power of Attorney [17-10-2023(online)].pdf 2023-10-17
14 202311027481-Form 1 (Submitted on date of filing) [17-10-2023(online)].pdf 2023-10-17
15 202311027481-Covering Letter [17-10-2023(online)].pdf 2023-10-17
16 202311027481-CERTIFIED COPIES TRANSMISSION TO IB [17-10-2023(online)].pdf 2023-10-17
17 202311027481-FER.pdf 2024-03-15
18 202311027481-FORM 3 [01-05-2024(online)].pdf 2024-05-01
19 202311027481-OTHERS [16-05-2024(online)].pdf 2024-05-16
20 202311027481-FER_SER_REPLY [16-05-2024(online)].pdf 2024-05-16
21 202311027481-DRAWING [16-05-2024(online)].pdf 2024-05-16
22 202311027481-CORRESPONDENCE [16-05-2024(online)].pdf 2024-05-16
23 202311027481-COMPLETE SPECIFICATION [16-05-2024(online)].pdf 2024-05-16
24 202311027481-CLAIMS [16-05-2024(online)].pdf 2024-05-16
25 202311027481-US(14)-HearingNotice-(HearingDate-18-12-2025).pdf 2025-11-21

Search Strategy

1 202311027481E_28-12-2023.pdf