Automated software testing using natural language-based form completion
Aspects of the disclosure include methods and systems for performing automated software testing. The method can include executing software under test and determining that the user interface of the software includes a textual input field. The method includes identifying a label of the textual input field, inputting into a natural language processing system the label as a query and receiving, from the natural language processing system in response to the query, a first input text. The method also includes inputting the first input text into the textual input field and recording a first response of the software to the first input text.
1 . A method for automated software testing, the method comprising:
executing software under test;
determining that a user interface of the software includes a textual input field;
identifying a label of the textual input field;
identifying additional information regarding the textual input field, the additional information comprising hover-over text that is displayed when a cursor is over the textual input field;
inputting into a natural language processing system a query comprising the label, the additional information, and an instruction to generate a sample input for the textual input field;
receiving, from the natural language processing system in response to the query, a first input text comprising the sample input;
inputting the first input text into the textual input field;
recording a first response of the software to the first input text;
determining that the first response of the software includes a first error message related to the first input text entered in the textual input field, the first error message comprising a constraint for the textual input field;
inputting into the natural language processing system an updated query comprising the label, the additional information, and an instruction to generate a second sample input for the textual input field subject to the constraint;
receiving, from the natural language processing system in response to the updated query, a second input text comprising the second sample input;
inputting the second input text into the textual input field; and
recording a second response of the software to the second input text.
2 . The method of claim 1 , further comprising:
determining that the first response of the software does not include an error message related to the textual input field; and
storing the label associated with the textual input field and the first input text in one or more of a testing log associated with the software and a textual input database.
3 . The method of claim 1 , wherein the determination that the first response of the software includes the first error message is based on a comparison of the user interface before the inputting the first input text into the textual input field and after inputting the first input text into the textual input field.
4 . The method of claim 1 , further comprising:
determining that the second response of the software does not include a second error message related to the textual input field; and
storing the label associated with the textual input field and the second input text in one or more of a testing log associated with the software and a textual input database.
5 . The method of claim 1 , wherein the second response of the software to the second input text includes a second error message related to the textual input field.
6 . The method of claim 5 , further comprising:
determining that the first error message and the second error message are different;
inputting, into the natural language processing system the label, the first error message, and information about the second error message as a third query;
receiving, from the natural language processing system in response to the third query, a third input text;
inputting the third input text into the textual input field; and
recording a third response of the software to the third input text.
7 . The method of claim 6 , further comprising:
determining that the first error message and the second error message are identical; and
transmitting an error notification.
8 . The method of claim 6 , wherein the third response of the software includes a third error message related to the textual input field, and the method further comprises transmitting an error notification.
9 . The method of claim 1 , wherein the natural language processing system is a large language model.
10 . A method for automated software testing, the method comprising:
executing software under test;
determining that a user interface of the software includes a textual input field;
identifying a label of the textual input field;
identifying additional information regarding the textual input field, the additional information comprising hover-over text that is displayed when a cursor is over the textual input field;
obtaining a first input text from a textual input database based on the label;
inputting the first input text into the textual input field;
determining that a first response of the software to the first input text includes a first error message related to the textual input field, the first error message comprising a constraint for the textual input field;
inputting into a natural language processing system the label, information about the first error message, and the additional information as a query that includes an instruction to generate a second sample input for the textual input field subject to the constraint;
receiving, from the natural language processing system in response to the query, a second input text comprising the second sample input;
inputting the second input text into the textual input field; and
recording a second response of the software to the second input text.
11 . The method of claim 10 , further comprising:
determining that the second response of the software does not include an error message related to the textual input field; and
updating the textual input database to include the second input text.
12 . The method of claim 10 , wherein the second response of the software to the second input text includes a second error message related to the textual input field.
13 . The method of claim 12 , further comprising:
inputting, into the natural language processing system the label, the first error message, and information about the second error message as a second query;
receiving, from the natural language processing system in response to the second query, a third input text;
inputting the third input text into the textual input field; and
recording a third response of the software to the third input text.
14 . The method of claim 13 , wherein the third response of the software includes a third error message related to the textual input field, the method further comprises comparing the third error message to one or more of the first error message and the second error message.
15 . The method of claim 14 , further comprising:
determining that the third error message is identical to one or more of the first error message and the second error message; and
transmitting an error notification to a user.
16 . A system having a memory, computer readable instructions, and a processing system for executing the computer readable instructions, the computer readable instructions control the processing system to perform operations comprising:
executing software under test;
determining that a user interface of the software includes a textual input field;
identifying a label of the textual input field;
identifying additional information regarding the textual input field, the additional information comprising hover-over text that is displayed when a cursor is over the textual input field;
inputting into a natural language processing system the label and the additional information as a first query, the first query including an instruction to generate a sample input for the textual input field;
receiving, from the natural language processing system in response to the first query, a first input text comprising the sample input;
inputting the first input text into the textual input field;
determining that a first response of the software includes a first error message related to the textual input field, the first error message comprising a constraint for the textual input field;
inputting into the natural language processing system the label and information about the first error message as a second query, the second query including an instruction to generate a second sample input for the textual input field subject to the constraint;
receiving, from the natural language processing system in response to the second query, a second input text comprising the second sample input;
inputting the second input text into the textual input field; and
recording a second response of the software to the second input text.
17 . The system of claim 16 , wherein the operations further comprise:
determining that the second response of the software includes a second error message related to the textual input field; and
comparing the first error message to the second error message.