US10289536B2ActiveUtilityA1

Distinguishing public and private code in testing environments

44
Assignee: SYNOPSYS INCPriority: Aug 31, 2016Filed: Aug 31, 2017Granted: May 14, 2019
Est. expiryAug 31, 2036(~10.2 yrs left)· nominal 20-yr term from priority
Inventors:Tamir Shavro
G06F 11/3676G06F 11/3672G06F 11/3684G06F 11/3688
44
PatentIndex Score
0
Cited by
17
References
18
Claims

Abstract

A code testing system identifies code for an application as being related to publically-available code, and modifies testing for the application for the code segments corresponding to the publically-available code. The code testing system identifies code segments in the application and generates a signature of the code segment. The signature is matched against signatures for publically-available code, and code segments for the application that match the publically-available code are identified. The matching segments may be tested with different analysis than the code which does not match publically-available code and thus correspond to privately developed code by an application developer.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method for automated application testing of computer code comprising:
 identifying an application for analysis by an automated code testing system; 
 identifying a plurality of code segments corresponding to the application, wherein each code segment is a separate logical portion of the application; 
 generating a signature of each code segment in the plurality of code segments, in which the signature includes a hash value generated from applying a hash function to the code segment and a namespace; 
 comparing the signature of each code segment in the plurality of code segments to a set of signatures associated with publicly-available code to determine whether there is an identical match between the signature of the code segment and any of the signatures of the set of signatures; 
 assigning each code segment of the plurality of code segments to a primary test group when the comparison determines no identical match or to a secondary test group when the comparison determines an identical match; and performing a first set of code analysis tests by the automated code testing system on the primary test group of code segments and a second set of code analysis tests by the automated code testing system on the secondary test group of code segments, wherein the first set of code analysis tests differs from the second set of code analysis tests. 
 
     
     
       2. The method of  claim 1 , wherein the code segments of the plurality of code segments are functions. 
     
     
       3. The method of  claim 1 , wherein the code segments of the plurality of code segments are classes. 
     
     
       4. The method of  claim 1 , wherein no testing is performed for the second set of code analysis tests. 
     
     
       5. The method of  claim 1  wherein the second set of code analysis tests comprises identifying public code from a public repository corresponding to a set of one or more matching code segments for the match and identifying known defects of the matching segments. 
     
     
       6. The method of  claim 1 , wherein no testing is performed for the first set of code analysis tests. 
     
     
       7. A non-transitory computer-readable storage medium for automated application testing of computer code containing computer program code for:
 identifying an application for analysis by an automated code testing system; 
 identifying a plurality of code segments corresponding to the application, wherein each code segment a separate logical portion of the application; 
 generating a signature of each code segment in the plurality of code segments, in which the signature includes a hash value generated from applying a hash function to the code segment and a namespace; 
 comparing the signature of each code segment in the plurality of code segments to a set of signatures associated with publicly-available code to determine whether there is a match between the signature of the code segment and any of the signatures of the set of signatures; 
 assigning each code segment of the plurality of code segments to a primary test group when the comparison determines no identical match or to a secondary test group when the comparison determines an identical match; and 
 performing a first set of code analysis tests by the automated code testing system on the primary test group of code segments and a second set of code analysis tests by the automated code testing system on the secondary test group of code segments, wherein the first set of code analysis tests differs from the second set of code analysis tests. 
 
     
     
       8. The non-transitory computer-readable medium of  claim 7 , wherein the code segments of the plurality of code segments are functions. 
     
     
       9. The non-transitory computer-readable medium of  claim 7 , wherein the code segments of the plurality of code segments are classes. 
     
     
       10. The non-transitory computer-readable medium of  claim 7 , wherein no testing is performed for the second set of code analysis tests. 
     
     
       11. The non-transitory computer-readable medium of  claim 7 , wherein the second set of code analysis tests comprises identifying public code from a public repository corresponding to a set of one or more matching code segments for the match and identifying known defects of the matching segments. 
     
     
       12. The non-transitory computer-readable medium of  claim 7 , wherein no testing is performed for the first set of code analysis tests. 
     
     
       13. A system for automated application testing of computer code, the system comprising:
 a processor configured to execute instructions; and 
 a non-transitory computer-readable medium containing instructions executed by the processor, the instructions causing the processor to: 
 identify an application for analysis by an automated code testing system; 
 identify a plurality of code segments corresponding to the application, wherein each code segment a separate logical portion of the application; 
 generating a signature of each code segment in the plurality of code segments, in which the signature includes a hash value generated from applying a hash function to the code segment and a namespace; 
 compare the signature of each code segment in the plurality of code segments to a set of signatures associated with publicly-available code to determine whether there is a match between the signature of the code segment and any of the signatures of the set of signatures; 
 assign each code segment of the plurality of code segments to a primary test group when the comparison determines no identical match or to a secondary test group when the comparison determines an identical match; and 
 perform a first set of code analysis tests by the automated code testing system on the primary test group of code segments and a second set of code analysis tests by the automated code testing system on the secondary test group of code segments, wherein the first set of code analysis tests differs from the second set of code analysis tests. 
 
     
     
       14. The system of  claim 13 , wherein the code segments of the plurality of code segments are functions. 
     
     
       15. The system of  claim 13 , wherein the code segments of the plurality of code segments are classes. 
     
     
       16. The system of  claim 13 , wherein no testing is performed for the second set of code analysis tests. 
     
     
       17. The system of  claim 13 , wherein the second set of code analysis tests comprises identifying public code from a public repository corresponding to a set of one or more matching code segments for the match and identifying known defects of the matching segments. 
     
     
       18. The system of  claim 13 , wherein no testing is performed for the first set of code analysis tests.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.