主权项 |
1. A method for testing of software automation scripts, the method comprising:
obtaining at least one software automation script, wherein the software automation script comprises a sequence of executable tasks configured to automatically place a computing system into a target state comprising one or more state properties; executing a plurality of test cases for the software automation script, wherein each of the plurality of test cases is a separate executable instance of the software automation script configured to test the software automation script; analyzing the software automation script; identifying, based on the analyzing, a plurality of tasks to be performed during execution of the software automation script; determining a set of possible states of the computing system and a set of expected state transitions associated with each of the plurality of tasks; generating a state transition graph based on the set of possible states and the set of expected state transitions, wherein the state transition graph comprises:
a set of nodes, wherein each of the set of nodes represents one of the set of possible states of the computing system,a set of directed edges, wherein each of the set of directed edges connects two in the set of nodes,a first subset of the set of nodes, wherein each of the first subset of the set of nodes represents an initial state of the computing system when the software automation script is executed,a second subset of the set of nodes, wherein each of the second subset of the set of nodes represents a post state of the computing system after the software automation script has been executed, anda third subset of the of the set of nodes, wherein each of the third subset of the set of nodes is situated between at least one of the first subset and the second subset of the set of nodes,wherein a path between one of the first subset and one of the second subset of the set of nodes represents an execution of the software automation script, andwherein a transition edge between any two of the set of nodes represents an execution of one of the plurality of tasks; andat least one of
determining, based on executing the plurality of test cases, that the software automation script is one of idempotent and non-idempotent, anddetermining, based on executing the plurality of test cases, that the software automation script is one of convergent and non-convergent. |