Abstract: The present disclosure is related in general to software testing and a method and a system for generating a valid set of test configurations for test scenarios. A test configuration generation system retrieves one or more test parameters from each of one or more test scenarios associated with a corresponding requirement and a requirement criticality. Further, the test configuration generation system identifies data values corresponding to each of the one or more test parameters. Further, it generates a valid set of test configurations for each test scenario based on requirement risk and eliminates one or more invalid test configuration combinations detected and finally a valid set of test configurations for each test scenario is generated. The present disclosure ensures right coverage with right set of configurations that can be executed within the limited time available and reduces 80% of manual efforts in generating the test configurations. FIG.2A
Claims:We claim:
1. A method for generating a valid set of test configurations for test scenarios, the method comprising:
retrieving, by a test configuration generation system, one or more test parameters from each of one or more test scenarios received from one or more data sources, wherein each of the one or more test scenarios is associated with a corresponding requirement and a requirement criticality;
identifying, by the test configuration generation system, one or more data values corresponding to each of the one or more test parameters and storing the one or more data values in a first data set;
generating, by the test configuration generation system, one or more test configurations based on the one or more test parameters, the corresponding requirement and the requirement criticality of each of the one or more test scenarios and each of the one or more data values corresponding to the one or more test parameters;
detecting, by the test configuration generation system, one or more invalid test configuration combinations from the one or more test configurations by correlating the one or more test parameters selected by a user and each of the one or more data values corresponding to the one or more test parameters; and
replacing, by the test configuration generation system, the one or more invalid test configuration combinations from the one or more test configurations with a valid test configuration combination to generate a valid set of test configurations for each of the one or more test scenarios.
2. The method as claimed in claim 1, wherein the requirement criticality is one of “High”, “Medium” and “Low”.
3. The method as claimed in claim 1, wherein each of the one or more data values is tagged with a flag comprising “New” flag and “Expected” flag.
4. The method as claimed in claim 3 further comprises setting, by the test configuration generation system the “New” flag to one of:
“True” if the one or more data values are provided to the test configuration generation system for a first time; and
“False” if the one or more data values are already available in the test configuration generation system.
5. The method as claimed in claim 3 further comprises setting, by the test configuration generation system, the “Expected” flag to one of:
“True” if the one or more data values are used for testing a positive flow; and
“False” if the one or more data values are used for testing a negative flow.
6. The method as claimed in claim 1, wherein each of the one or more data values is associated with a data criticality comprising one of “High”, “Medium” and “Low”.
7. The method as claimed in claim 1, wherein generating the one or more test configurations comprises:
creating, by the test configuration generation system, a second dataset by selecting the one or more data values corresponding to each of the one or more test parameters of each of the one or more test scenarios from the first dataset based on the corresponding requirement criticality of each of the one or more test scenarios;
receiving, by the test configuration generation system, a type of test case flow from the user based on which the one or more data values are tested, wherein the type of the test case flow is at least one of a positive flow or a negative flow;
selecting, by the test configuration generation system, each of the one or more data values in the second dataset having:
“Expected” flag set to “True” if the type of test case flow received is the positive flow and storing in a third dataset; or
“Expected” flag set to “False” if the type of test case flow received is the negative flow and storing in a fourth dataset;
obtaining, by the test configuration generation system, the one or more data values having the “New” flag set to “True” from the first dataset if available in the first dataset for updating at least one of the third dataset or the fourth dataset based on the obtained one or more data values;
detecting, by the test configuration generation system, one of the one or more test parameters having highest frequency of the one or more data values from the first dataset; and
generating, by the test configuration generation system, the one or more test configurations equal to the highest frequency based on at least one of the third dataset and the fourth dataset.
8. The method as claimed in claim 7, wherein creating the second dataset comprises:
selecting, by the test configuration generation system, each of the one or more data values associated with data criticality “High”, “Medium” and “Low”, if the corresponding requirement criticality is “High”;
selecting, by the test configuration generation system, each of the one or more data values associated with data criticality “High” and “Medium”, if the corresponding requirement criticality is “Medium”; and
selecting, by the test configuration generation system, each of the one or more data values associated with data criticality “High”, if the corresponding requirement criticality is “Low”.
9. The method as claimed in claim 1, wherein the invalid test configuration combinations are predefined by the user.
10. A test configuration generation system for generating a valid set of test configurations for test scenarios, the test configuration generation system comprising:
a processor; and
a memory communicatively coupled to the processor, wherein the memory stores the processor-executable instructions, which, on execution, causes the processor to:
retrieve one or more test parameters from each of one or more test scenarios received from one or more data sources, wherein each of the one or more test scenarios is associated with a corresponding requirement and a requirement criticality;
identify one or more data values corresponding to each of the one or more test parameters and storing the one or more data values in a first data set;
generate one or more test configurations based on the one or more test parameters, the corresponding requirement and the requirement criticality of each of the one or more test scenarios and each of the one or more data values corresponding to the one or more test parameters;
detect one or more invalid test configuration combinations from the one or more test configurations by correlating the one or more test parameters selected by a user and each of the one or more data values corresponding to the one or more test parameters; and
replace the one or more invalid test configuration combinations from the one or more test configurations with a valid test configuration combination to generate a valid set of test configurations for each of the one or more test scenarios.
11. The test configuration generation system as claimed in claim 10, wherein the requirement criticality is one of “High”, “Medium” and “Low”.
12. The test configuration generation system as claimed in claim 10, wherein the processor tags each of the one or more data values with a flag comprising “New” flag and “Expected” flag.
13. The test configuration generation system as claimed in claim 12, wherein the processor further sets the “New” flag to one of:
“True” if the one or more data values are provided to the test configuration generation system for a first time; and
“False” if the one or more data values are already available in the test configuration generation system.
.
14. The test configuration generation system as claimed in claim 12, wherein the processor further sets the “Expected” flag to one of:
“True” if the one or more data values are used for testing a positive flow; and
“False” if the one or more data values are used for testing a negative flow.
15. The test configuration generation system as claimed in claim 10, wherein each of the one or more data values is associated with a data criticality comprising at least one of “High”, “Medium” or “Low”.
16. The test configuration generation system as claimed in claim 10, wherein to generate the one or more test configurations, the instructions cause the processor to:
create a second dataset by selecting the one or more data values corresponding to each of the one or more test parameters of each of the one or more test scenarios from the first dataset based on the corresponding requirement criticality of each of the one or more test scenarios;
receive a type of test case flow from the user based on which the one or more data values are tested, wherein the type of the test case flow is at least one of a positive flow or a negative flow;
select each of the one or more data values in the second dataset having:
“Expected” flag set to “True” if the type of test case flow received is the positive flow and storing in a third dataset; or
“Expected” flag set to “False” if the type of test case flow received is the negative flow and storing in a fourth dataset;
obtain the one or more data values having the “New” flag set to “True” from the first dataset if available in the first dataset for updating at least one of the third dataset or the fourth dataset based on the obtained one or more data values;
detect one of the one or more test parameters having highest frequency of the one or more data values from the first dataset; and
generate the one or more test configurations equal to the highest frequency based on at least one of the third dataset and the fourth dataset.
17. The test configuration generation system as claimed in claim 16, wherein to create the second dataset, the instructions cause the processor to:
select each of the one or more data values associated with the data criticality “High”, “Medium” and “Low”, if the corresponding requirement criticality is “High”;
select each of the one or more data values associated with the data criticality “High” and “Medium”, if the corresponding requirement criticality is “Medium”; and
select each of the one or more data values associated with the data criticality “High”, if the corresponding requirement criticality is “Low”;
18. The test configuration generation system as claimed in claim 10, wherein the invalid test configuration combinations are predefined by the user.
Dated this 28th day of August 2016
SWETHA S.N
OF K & S PARTNERS
AGENT FOR THE APPLICANT
, Description:TECHNICAL FIELD
The present subject matter relates generally to software testing, and more particularly, but not exclusively to a method and a system for generating a valid set of test configurations for test scenarios.