US 12,461,845 B2
System and method for detecting software tests that are suspected as tests that always provide false positive
Devin C Moore, Columbus, OH (US); Justin Haas, West Chester, PA (US); Francine Jackson, New York, NY (US); Marco Scata, Bournemouth (GB); and Matthew Andreas, Wilmington, DE (US)
Assigned to JPMORGAN CHASE BANK, N.A., New York, NY (US)
Filed by JPMorgan Chase Bank, N.A., New York, NY (US)
Filed on May 12, 2023, as Appl. No. 18/196,478.
Prior Publication US 2024/0378141 A1, Nov. 14, 2024
Int. Cl. G06F 9/44 (2018.01); G06F 11/3668 (2025.01)
CPC G06F 11/3692 (2013.01) [G06F 11/368 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method for detecting fake software tests in a testing environment in connection with an application prior to submitting the application in a production environment by utilizing one or more processors along with allocated memory, the method comprising:
implementing a platform, language, cloud, and database agnostic fake tests detection module (FTDM), by a language, platform, database, and cloud agnostic fake tests detection device (FTDD), wherein the one or more processors are embedded within the FTDD, wherein the FTDM is configured to detect a software test that is suspected as a fake test that always provide false positive and check for assertions in a pull request which is attempting only to change code with a new fake test, wherein the FTDM includes a detecting module, a storing module, a calling module, a converting module, and a searching module, and wherein each module being called via corresponding application programming interface (API);
detecting changes in a code against a commit timeline by calling the detecting module;
storing onto a database, in response to detecting, historical record of code change differences over time by calling the storing module, wherein the database stores only corresponding changed files including the changes that occurred between each commit and does not store a full version of the files;
calling the calling module to obtain from the database, for only the changed files in a given pull request, a list of the change differences which comes as a structured object;
converting the structured object into a single string value containing all of the change differences by calling the converting module;
searching, by calling the searching module, the single string value for a set of disallowed commands for checking for assertions in the given pull request which is attempting only to change code with the fake test that always passes the code in connection with testing the application;
when such a command is found in response to searching, transmitting a comment back to the given pull request indicating that the given pull request contains the fake test; and
updating the given pull request by removing the detected fake test from the testing environment in response to the comment and revising the code for subsequent testing, thereby increasing processing speed of the one or more processors in testing the code again in the testing environment and increasing production speed of the application in the production environment.