Abstract: Systems and methods for performing unit testing are described. During code level testing of the software code, the software code is scanned and converted into compiled code which is received by the system. The system further converts back the compiled code into its source code which comprises several units of source. However, the system filters out only user-defined units of source code for testing. The system further identifies rules for the units of source to be tested. Further, based on the rules and content of the units of source code, the system determines expected parameters. Further, the system utilizes the expected parameters for generating test cases for units of source code. The test cases generated may be a combination of positive and/or negative test case. This way, the system automatically generates the test cases and performs unit testing by using the generated test cases. FIG. 1
Claims:We Claim:
1. A method of performing unit testing, the method comprising:
generating, by a testing system (102), a source code (212) based on a compiled code (101) received from a user;
classifying, by the testing system (102), the source code (212) into testable components and non-testable components, wherein the testable components comprise units of source code;
identifying, by the testing system (102), one or more rules from a set of organized rules (214) based on the units of source code;
determining, by the testing system (102), one or more expected parameters (216) corresponding to a unit of source code based on the one or more rules and content of the unit of source code, wherein the content comprises one or more input fields;
generating, by the testing system (102), one or more test cases (103), (218) for each of the one or more input fields of the unit of source code by using the one or more expected parameters (216); and
performing, by the testing system (102), a script-less unit testing of the compiled code (101) by executing the one or more test cases (103), (218).
2. The method as claimed in claim 1, wherein the compiled code (101) comprises at least one of an executable code and any compiled code associated with a programming language.
3. The method as claimed in claim 1, wherein the units of source code comprises at least one of a subroutine, a procedure, a function, a method, a callable unit, or a subprogram associated with the compiled code (101).
4. The method as claimed in claim 1, wherein the one or more test cases (103), (218) are associated with at least one of a positive test case and a negative test case.
5. The method as claimed in claim 1 further comprising receiving values corresponding to the one or more expected parameters (216) and one or more testing parameters from the user through a user-interface.
6. The method as claimed in claim 1 further comprising dynamically updating a newly added unit of source code into the testable components.
7. A testing system (102) for performing unit testing, the system (102) comprising:
a processor (204); and
a memory (206) communicatively coupled to the processor (204), wherein the memory (206) stores processor-executable instructions, which, on execution, causes the processor (204) to:
generate a source code (212) based on a compiled code (101) received from a user;
classify the source code (212) into testable components and non-testable components, wherein the testable components comprise units of source code;
identify one or more rules from a set of organized rules (214) based on the units of source code;
determine one or more expected parameters (216) corresponding to a unit of source code based on the one or more rules and content of the unit of source code, wherein the content comprises one or more input fields;
generate one or more test cases (103), (218) for each of the one or more input fields of the unit of source code by using the one or more expected parameters (216); and
perform a script-less unit testing of the compiled code (101) by executing the one or more test cases (103), (218).
8. The testing system (102) as claimed in claim 7, wherein the compiled code (101) comprises at least one of an executable code and any compiled code associated with a programming language.
9. The testing system (102) as claimed in claim 7, wherein the units of source code comprises at least one of a subroutine, a procedure, a function, a method, a callable unit, and a subprogram associated with the compiled code (101).
10. The testing system (102) as claimed in claim 7, wherein the one or more test cases (103), (218) are associated with at least one of a positive test case and a negative test case.
11. The testing system (102) as claimed in claim 7, wherein the processor (204) is further configured to receive values corresponding to the one or more expected parameters (216) and one or more testing parameters from the user through a user-interface.
12. The testing system (102) as claimed in claim 7, wherein the processor (204) is further configured to dynamically update a newly added unit of source code into the testable components.
Dated this 8th day of February 2017
Swetha SN
Of K&S Partners
Agent for the Applicant , Description:TECHNICAL FIELD
The present disclosure relates in general to software testing. More particularly, but not exclusively, the present disclosure discloses a method and system for performing script-less unit testing.
| # | Name | Date |
|---|---|---|
| 1 | Power of Attorney [08-02-2017(online)].pdf | 2017-02-08 |
| 2 | Form 5 [08-02-2017(online)].pdf | 2017-02-08 |
| 3 | Form 3 [08-02-2017(online)].pdf | 2017-02-08 |
| 4 | Form 18 [08-02-2017(online)].pdf_320.pdf | 2017-02-08 |
| 5 | Form 18 [08-02-2017(online)].pdf | 2017-02-08 |
| 6 | Drawing [08-02-2017(online)].pdf | 2017-02-08 |
| 7 | Description(Complete) [08-02-2017(online)].pdf_319.pdf | 2017-02-08 |
| 8 | Description(Complete) [08-02-2017(online)].pdf | 2017-02-08 |
| 9 | Other Patent Document [21-02-2017(online)].pdf | 2017-02-21 |
| 10 | Correspondence by Agent_Certified Copy of US Priority_23-02-2017.pdf | 2017-02-23 |
| 11 | 201744004636-Proof of Right (MANDATORY) [11-12-2017(online)].pdf | 2017-12-11 |
| 12 | Correspondence by Agent_Form 1_13-12-2017.pdf | 2017-12-13 |
| 13 | 201744004636-PETITION UNDER RULE 137 [21-01-2021(online)].pdf | 2021-01-21 |
| 14 | 201744004636-Information under section 8(2) [21-01-2021(online)].pdf | 2021-01-21 |
| 15 | 201744004636-FORM 3 [21-01-2021(online)].pdf | 2021-01-21 |
| 16 | 201744004636-FER_SER_REPLY [21-01-2021(online)].pdf | 2021-01-21 |
| 17 | 201744004636-DRAWING [21-01-2021(online)].pdf | 2021-01-21 |
| 18 | 201744004636-CLAIMS [21-01-2021(online)].pdf | 2021-01-21 |
| 19 | 201744004636-FER.pdf | 2021-10-17 |
| 20 | 201744004636-US(14)-HearingNotice-(HearingDate-21-08-2023).pdf | 2023-07-20 |
| 21 | 201744004636-POA [24-07-2023(online)].pdf | 2023-07-24 |
| 22 | 201744004636-FORM 13 [24-07-2023(online)].pdf | 2023-07-24 |
| 23 | 201744004636-Correspondence to notify the Controller [24-07-2023(online)].pdf | 2023-07-24 |
| 24 | 201744004636-AMENDED DOCUMENTS [24-07-2023(online)].pdf | 2023-07-24 |
| 25 | 201744004636-Written submissions and relevant documents [05-09-2023(online)].pdf | 2023-09-05 |
| 26 | 201744004636-FORM 3 [05-09-2023(online)].pdf | 2023-09-05 |
| 27 | 201744004636-PatentCertificate25-10-2023.pdf | 2023-10-25 |
| 28 | 201744004636-IntimationOfGrant25-10-2023.pdf | 2023-10-25 |
| 1 | 201744004636_searchE_17-08-2020.pdf |