Microsoft patents AI tool that writes and runs software tests from text
This patent describes a system where users describe software features in plain English, and a large language model generates specific test scenarios. Once a user selects a test, the model writes the actual code to run it, executes the test, and checks the results against expected outcomes.
In the filing’s own words
The techniques disclosed herein enhance software testing through automated test case generation and implementation. This is accomplished through utilizing a natural language interface and a generative probabilistic model, such as a large language model. A first user input can provide descriptions of a software feature to be tested and various use cases for the software feature. Accordingly, the probabilistic model generates a plurality of test cases for evaluating various aspects of the software feature in accordance with the first user input. The natural language descriptions can be accompanied by a contextual input to constrain the probabilistic model and ensure consistent outputs. Subsequently, a second user input selects a test case from the generated test cases to be implemented. In response, the probabilistic model generates a software implementation of the selected test case. The software implementation is then executed with log data extracted from the testing environment for processing results.
What exactly they claim (claim 1)
1. A method comprising: receiving, via a natural language interface, a first user input including a first natural language description defining an expected functionality of a software feature and a second natural language description defining a process for using the software feature; generating, based on the first natural language description and the second natural language description, a first probabilistic model query including a first contextual input defining an expected test case output format; providing the first probabilistic model query to a probabilistic model; receiving, from the probabilistic model, a first model output comprising a plurality of test cases for the software feature in accordance with the first contextual input defining the expected test case output format, an individual test case defining a sequence of natural language steps for evaluating an aspect of the expected functionality of the software feature; causing the plurality of test cases, each defining a sequence of natural language steps, to be displayed via the natural language interface for review and selection; receiving, via the natural language interface, a second user input selecting a test case from the plurality of test cases displayed via the natural language interface; generating, based on the second user input selecting the test case, a second probabilistic model query and a second contextual input defining an expected software implementation output format; providing the second probabilistic model query to the probabilistic model; receiving, from the probabilistic model, a second model output comprising a software implementation of the test case; causing the software implementation of the test case to be displayed via the natural language interface with a request to confirm the software implementation; receiving, via the natural language interface, a third user input confirming the software implementation; executing, based on the third user input confirming the software implementation, the software implementation to perform the sequence of natural language steps, defined by the test case, for evaluating the aspect of the expected functionality of the software feature; extracting log data defining an outcome of the execution of the software implementation; comparing the log data against a success condition defining an expected outcome of the sequence of natural language steps, defined by the test case, for evaluating the aspect of the expected functionality of the software feature; and classifying the execution of the software implementation as passed or not passed based on the comparison of the log data against the success condition.
Facts
- Company
- Microsoft (MICROSOFT TECHNOLOGY LICENSING, LLC)
- Official title
- Automation of software test case generation and implementation
- Patent number
- US12724699B2
- Application number
- 18471986
- Filed
- Sep 21, 2023
- Granted
- Sep 1, 2026
- Inventors
- 4
- Claims
- 14
Classified under
G06F 11/3684 Physics & computingG06F 11/3608 Physics & computingG06F 11/3698 Physics & computingMore from Microsoft in AI & software
- Microsoft patents method to check AI answers against verified facts Oct 20, 2026
- Microsoft patents AI that presents PowerPoint slides for you Sep 3, 2026
- Microsoft patents method to check if LLM answers are based on real data Sep 10, 2026
- Microsoft patents system to blend multiple AI agents into one chat Oct 1, 2026
- Microsoft patents system that answers questions using your screen history Oct 15, 2026
Summaries are simplified from the filing’s own abstract and first claim. A patent filing is not a product announcement.
Patent data and drawings: U.S. Patent and Trademark Office (USPTO). Nebula is not affiliated with or endorsed by the USPTO.