This application is related to and claims the benefit of Indian Patent Application Number 202041003079 filed on Jan. 23, 2020, the contents of which are herein incorporated by reference in their entirety.
The present invention relates generally to testing of applications, and more particularly, the present invention relates to a system and method for reconstructing regression test case scenarios using post-production user events.
During testing of an application, test cases are derived from requirements provided by users. The testing is done so as to ensure that features are implemented and there is no defect as an application moves to production environment. The test cases are tested manually or are automated. For every application release, a plurality of relevant test cases are derived that are known as regression test cases. The regression test cases are critical test cases of the application that are built over several application releases, and are then, tested in every release. Regression testing is a type of testing to confirm that a recent program or code change has not adversely affected existing features of the application. Regression testing also relates to full or partial selection of already executed test cases which are re-executed to ensure existing functionalities of the application work fine.
However, as the testing of the application grows more complex, the test cases may become more complex, the test cases may become stagnant and may fail to handle relevant user input and behavior. A plurality of post-production tools are used for capturing user activities in the post production environment. Post production refers to the environment where the final application has been released and the user starts using the application navigating through the different features of the application. Post production tools may be used for monitoring, searching, analyzing and visualizing the machine generated data of the post production environment. Further, the post-production tools are used to track activity of the users such as session duration, pages per session, bounce rate etc. over a website along with the information on the source of the traffic. The activities captured by the post-production tools may include sales activity viewed by a user, viewing of a specific page by the user, or downloading a particular file by the user. The post-production tools also provides more advanced features, including user visitor segmentation. However, in the real world, in the production environment, the user activities may not be exactly same as the regression test cases. While the purpose of regression is to ensure that the production release is seamless, it has been observed it really does not reflect the actual user activities.
It has been further observed that the drawback of the current testing techniques is that a lot of manual effort is involved and also the test cases are based on best guess scenario. This results in a lot of testing effort spent on areas that really does not reflect the importance in production of the application. Moreover, a subject matter expert (SME) identifies the test case manually that leads to reduction in efficiency of the testing process. In addition, the user does not go through the same user activities as defined in the test cases. The user goes through multiple user activities which are not captured during the implementation of the test cases. Therefore, the user activities do not correspond to the regression test cases of the testing environment.
In light of the above drawbacks there is a need for a system and a method for automatically and effectively aligning testing environment with post-production events. There is also a need for reconstructing regression test cases based on actual and real-time events associated with user activities.
In various embodiment of the present invention a system for reconstructing regression test cases using post production events is provided. The system comprises a memory storing program instructions and a processor executing program instructions stored in the memory. The system comprises a test case reconstruction engine executed by the processor and configured to extract post-production identifiable elements associated with a post-production event and pre-production identifiable elements associated with a pre-production event. The test case reconstruction engine is configured to determine similarity between the pre-production event and the post-production event based on a comparison of one or more pre-production parent identifiable elements and one or more pre-production child identifiable elements of a subject identifiable element, with the post-production identifiable elements. The subject identifiable element is the pre-production identifiable element that does not match with a corresponding post-production identifiable element. The test case reconstruction engine is configured to reconstruct a regression test case based on a comparison of functions of the extracted pre-production identifiable elements and the post-production identifiable elements after the determination of similarity between the pre-production event and the post-production event.
In various embodiments of the present invention, a method for reconstructing regression test cases using post production events executed by a processor comprising program instructions stored in a memory. The method comprises extracting post-production identifiable elements associated with a post-production event and pre-production identifiable elements associated with a pre-production event. The method comprises determining similarity between the pre-production event and the post-production event based on a comparison of one or more pre-production parent identifiable elements and one or more pre-production child identifiable elements of a subject identifiable element, with the post-production identifiable elements. The subject identifiable element is the pre-production identifiable element that does not match with a corresponding post-production identifiable element. The method further comprises reconstructing a regression test case based on a comparison of functions of the extracted pre-production identifiable elements and the post-production identifiable elements after the determination of similarity between the pre-production event and the post-production event.
In various embodiment of the present invention, a computer program product is provided. The computer program product comprises a non-transitory computer readable medium having computer-readable program code stored thereon, the computer readable program code comprising instructions that, when executed by a processor, cause the processor to extract post-production identifiable elements associated with a post-production event and pre-production identifiable elements associated with a pre-production event. A similarity is determined between the pre-production event and the post-production event based on a comparison of one or more pre-production parent identifiable elements and one or more pre-production child identifiable elements of a subject identifiable element, with the post-production identifiable elements. The subject identifiable element is the pre-production identifiable element that does not match with a corresponding post-production identifiable element. A regression test case is reconstructed based on a comparison of functions of the extracted pre-production identifiable elements and the post-production identifiable elements after the determination of similarity between the pre-production event and the post-production event.
The present invention is described by way of embodiments illustrated in the accompanying drawings wherein:
The present invention discloses a system and a method for reconstructing regression test cases using post-production events. Further, the present invention discloses a system and a method for extracting post-production identifiable elements associated with a post-production event and pre-production identifiable elements associated with a pre-production event. The present invention, further, provides for a system and a method for reconstructing a regression test case based on a comparison of functions of the extracted pre-production identifiable elements and the post-production identifiable elements after the determination of similarity between the pre-production event and the post-production event.
The disclosure is provided in order to enable a person having ordinary skill in the art to practice the invention. Exemplary embodiments herein are provided only for illustrative purposes and various modifications will be readily apparent to persons skilled in the art. The general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the invention. The terminology and phraseology used herein is for describing exemplary embodiments and should not be considered limiting. Thus, the present invention is to be accorded the widest scope encompassing numerous alternatives, modifications and equivalents consistent with the principles and features disclosed herein. For purposes of clarity, details relating to technical material that is known in the technical fields related to the invention have been briefly described or omitted so as not to unnecessarily obscure the present invention.
The present invention would now be discussed in context of embodiments as illustrated in the accompanying drawings.
The test case reconstruction engine 120 communicates with the pre-production tool 102 and the post-production tool 122 via a communication channel (not shown). The communication channel (not shown) may include, but is not limited to, a physical transmission medium, such as, a wire, or a logical connection over a multiplexed medium, such as, a radio channel in telecommunications and computer networking. The examples of radio channel in telecommunications and computer networking may include, but are not limited to, a local area network (LAN), a metropolitan area network (MAN) and a wide area network (WAN).
In an embodiment of the present invention, the post-production tool 122 captures one or more post-production events associated with user activities in real-time in a post-production environment. The post-production events captured by the post-production tool 122 include multiple post-production identifiable elements. The post-production identifiable elements represent actionable steps associated with the post-production events. In an exemplary embodiment of the present invention, the post-production identifiable elements may include, but are not limited to, various steps involved in ecommerce activities of a user, viewing of a specific page by the user, downloading of a file by the user etc. in a post-production environment.
The following is an example of post-production identifiable elements extracted from a post-production event:
In an embodiment of the present invention, each of the post-production identifiable elements include a plurality of functions. Functions represent actionable sub-steps corresponding to each of the post-production identifiable elements. In the above example, one of the functions of the identifiable element ‘Payment’ may include:
Modes of Payment ( )
By card; OR
By e-wallet; OR
Cash on delivery.
In an embodiment of the present invention, the functions in the post-production environment include a plurality of sub-functions. The sub-functions represent actionable sub-steps corresponding to each of the actionable sub-steps (functions) of the post-production identifiable elements. In the above example, one of the actionable sub-step of the function “mode of payment” is ‘By card’ which may have the following sub-function.
In an exemplary embodiment of the present invention, the post-production tool 122 may be a google analytics tool used for capturing the post-production events associated with the user activities in the post-production environment. In another exemplary embodiment of the present invention, the post-production tool 122 may be a dynatrace tool for capturing the post-production events associated with the user activities in the post-production environment. In yet another embodiment of the present invention, the post-production tool 122 may be a splunk tool used for data mining and data extraction for capturing data entered by the user associated with the user activities in the post-production environment. In another exemplary embodiment of the present invention, the post-production data tool 122 may comprise an Application Programming Interface (API) for capturing post-production events and the data entered by user associated with the user activities in the post-production environment. In various embodiments of the present invention, the captured post-production events are stored in the form of logs in the post-production tool 122.
In an embodiment of the present invention, the post-production data synthesizer unit 106 is configured to extract post-production identifiable elements from the events captured by the post-production tool 122 through a log export mechanism. In an exemplary embodiment of the present invention, the log export mechanism comprises downloading logs as a Java Script Object Notation (JSON) or Extensible Markup Language (XML) file from the post-production tool 122. In another exemplary embodiment of the present invention, the log export mechanism may comprise downloading the logs manually. In another exemplary embodiment, the log export mechanism may comprise downloading logs at periodic intervals automatically.
In an embodiment of the present invention, the pre-production tool 102 may include automated regression test cases in a pre-production environment. The automated regression test cases may include multiple test scripts for testing an application. In an embodiment of the present invention, the pre-production data synthesizer unit 104 in the test case reconstruction engine 120 is configured to capture pre-production events corresponding to the automated regression test cases that are executed in the pre-production tool 102. In an exemplary embodiment of the present invention, the pre-production events captured from the regression test cases may include test case name, activity per function of test case, test data and test execution environment information like page visited and actions performed by the pre-defined regression test cases in the pre-production tool 102. In another embodiment of the present invention, the pre-production data synthesizer unit 104 is configured to extract pre-production identifiable elements from the captured pre-production events. The pre-production identifiable elements represent actionable steps associated with the post-production events.
In an example, the pre-production identifiable elements extracted from the pre-production event corresponding to the automated regression test case may include the following:
In an embodiment of the present invention, the pre-production data synthesizer unit 104 classifies the pre-production identifiable elements as a subject identifiable element, parent identifiable element and child identifiable element. The subject identifiable element is an identifiable element which is identified from amongst all other identifiable elements for processing in accordance with various embodiments of the present invention. The processing of subject identifiable element is explained in later part of the specification. The parent identifiable element includes elements which are preceding to the subject identifiable element. The child identifiable elements include elements succeeding the subject identifiable element. In the above example, the subject identifiable element identified is ‘Looking at review comments’ and the parent identifiable elements are ‘Clicking on a product page’, ‘Looking at product configurations’, ‘Looking at similar products’, ‘Home’ and ‘Login’. Further, the subject identifiable element ‘Looking at a review comments’ has child identifiable elements ‘Adding to cart’, ‘Checkout’, and ‘Payment’.
In an embodiment of the present invention, the pre-production identifiable elements may include a plurality of functions. Functions represent actionable sub-steps corresponding to each of the post-production identifiable elements. In the above example, one of the actionable sub-step of the function “mode of payment” for a subject identifiable element ‘payment’ is ‘paying by credit card’.
In an embodiment of the present invention, the functions in the post-production environment include a plurality of sub-functions. The sub-functions represent actionable sub-steps corresponding to each of the actionable sub-steps (functions) of the post-production identifiable elements. In the above example, one of the actionable sub-step of the function ‘mode of payment’ i.e. ‘paying by credit card’ may have the following sub-function.
In an embodiment of the present invention, the pre-production data synthesizer unit 104 is configured to extract pre-production identifiable elements from the automated regression test cases that is executed in the pre-production tool 102 by a code mutation mechanism. In an exemplary embodiment of the present invention, the code mutation mechanism includes extracting pre-production identifiable elements associated with pre-production events from the automated regression test cases by using artificial intelligence and machine learning.
In an embodiment of the present invention, the element comparison unit 108 in the test case reconstruction engine 120 is configured to identify mismatch between the pre-production identifiable elements and the post-production identifiable elements received from the pre-production data synthesizer unit 104 and post-production data synthesizer unit 106 respectively. In particular, the element comparison unit 108 scans and compares the pre-production identifiable elements and post-production identifiable elements. The element comparison unit 108 then determines if the pre-production events and the post production events are relatable. In an embodiment of the present invention, the relatability is found out by ascertaining a position of the subject identifiable element with respect to its parent and child identifiable elements. After the position of the subject identifiable element is ascertained, the element comparison unit 108 traverses through all the parent and child identifiable elements of the pre-production subject identifiable elements to identify post-production identifiable elements that are similar to the parent and child pre-production identifiable elements. If it is determined that at least one of both of parent identifiable elements and child identifiable elements corresponds to the post-production identifiable elements, then the pre-production event corresponding to the subject identifiable element is identified to be relatable to the post-production event. Once the relatability is identified, the pre-production event is marked as similar to the post-production events. The pre-production events and the post-production events are then transferred to the reconstruction unit 110.
In an embodiment of the present invention, the reconstruction unit 110 in the test case reconstruction engine 120 is configured to compare the similar pre-production and post-production identifiable elements received from the element comparison unit 108 at a functional level. The comparison at the functional level comprises comparing the functions of the pre-production identifiable elements to the functions of the post-production identifiable elements. In the event the function of the pre-production identifiable elements matches with the function of the post-production identifiable elements, the pre-production event corresponding to the function of the pre-production identifiable element is considered as a best fit regression test case. In an embodiment of the present invention, the best fit regression test case is reconstructed as a new regression test case. In the event the functions of the pre-production identifiable elements fail to match with the functions of the post-production identifiable elements, the reconstruction unit 110 is configured to compare the sub-functions of the post-production identifiable elements with the sub-functions of the pre-production identifiable elements. In the event of match of the sub functions, the test case reconstruction engine 120 reconstructs a regression test case by combining various sub-functions of the pre-production identifiable elements that match with the post-production identifiable elements.
In an embodiment of the present invention, the gap analyzer unit 112 in the test case reconstruction engine 120 is configured to remove gaps in the reconstructed regression test case received from the reconstruction unit 110. In an embodiment of the present invention, the gap analyzer unit 112 is configured to provide recommendation of missing pre-production functions in the reconstructed regression test cases in case the reconstructed pre-production event cannot be reconstructed completely by reconstruction unit 110. Based on the recommendations provided by the gap analyzer unit 112, a function may be added to the reconstructed regression test case.
In an embodiment of the present invention, the implementation unit 114 in the test case reconstruction engine 120 is configured to further improve the reconstructed regression test case by using the captured end-user data from the post-production environment captured by a tool such as splunk. In an embodiment of the present invention, the end-user data may relate to search criteria used for an event of accessing an application. In another embodiment of the present invention, the end-user data may relate to the number of entries made by the user while accessing a function of the event. In an exemplary embodiment of the present invention, the end-user data may relate to the final product purchased by a user. In another exemplary embodiment of the present invention, the end-user data may relate to the number of times the user clicked on a certain object in a website. Further the implementation unit 114 is configured to implement the improved regression test cases in the pre-production tool 102 such that the implemented regression test cases directly correspond to the post-production events.
At step 202, pre-production identifiable elements and post production identifiable elements are extracted from pre-production events and post-production events respectively. In an embodiment of the present invention, the post-production identifiable elements represent actionable steps associated with the post-production events. In an exemplary embodiment of the present invention, the post-production identifiable elements may include, but are not limited to, various steps involved in ecommerce activities of a user, viewing of a specific page by the user, downloading of a file by the user etc. in a post-production environment. Each of the post-production identifiable elements include a plurality of functions. Functions represent actionable sub-steps corresponding to each of the post-production identifiable elements. The functions in the post-production environment include a plurality of sub-functions. The sub-functions represent actionable sub-steps corresponding to each of the actionable sub-steps (functions) of the post-production identifiable elements. In an embodiment of the present invention, the post-production identifiable elements are extracted from the captured events through a log export mechanism. In an exemplary embodiment of the present invention, the log export mechanism comprises downloading logs as a Java Script Object Notation (JSON) or Extensible Markup Language (XML) file. In another exemplary embodiment of the present invention, the log export mechanism may comprise downloading the logs manually. In another exemplary embodiment, the log export mechanism may comprise downloading logs at periodic intervals automatically.
In an embodiment of the present invention, the pre-production events captured from the regression test cases may include test case name, activity per function of test case, test data and test execution environment information like page visited and actions performed by the pre-defined regression test cases in the pre-production tool. In another embodiment of the present invention, the pre-production identifiable elements are extracted from the captured pre-production events. The pre-production identifiable elements represent actionable steps associated with the post-production events. In an exemplary embodiment of the present invention, the pre-production identifiable elements are extracted from the automated regression test cases by a code mutation mechanism. In an example embodiment of the present invention, the code mutation mechanism includes extracting pre-production identifiable elements associated with pre-production events from the automated regression test cases by using artificial intelligence and machine learning.
In an embodiment of the present invention, the pre-production identifiable elements are classified as a subject identifiable element, parent identifiable element and child identifiable element. The subject identifiable element is an identifiable element which is identified from amongst all other identifiable elements for processing in accordance with various embodiments of the present invention. The parent identifiable element includes elements which are preceding to the subject identifiable element. The child identifiable elements include elements succeeding the subject identifiable element. In an embodiment of the present invention, the pre-production identifiable elements may include a plurality of functions. Functions represent actionable sub-steps corresponding to each of the post-production identifiable elements. The functions in the post-production environment include a plurality of sub-functions. The sub-functions represent actionable sub-steps corresponding to each of the actionable sub-steps (functions) of the post-production identifiable elements.
At step 204, a mismatch is identified between the pre-production identifiable elements and the post-production identifiable elements. In an embodiment of the present invention, the pre-production identifiable elements are scanned and compared with the post-production identifiable elements. It is then determined if the pre-production events and the post production events are relatable. In an embodiment of the present invention, the relatability is found out by ascertaining a position of the subject identifiable element with respect to its parent and child identifiable elements. After the position of the subject identifiable element is ascertained, the parent and child identifiable elements of the pre-production subject identifiable elements are traversed to identify post-production identifiable elements that are similar to the parent and child pre-production identifiable elements. If it is determined that at least one of both of parent identifiable elements and child identifiable elements corresponds to the post-production identifiable elements, then the pre-production event corresponding to the subject identifiable element is identified to be relatable to the post-production event. Once the relatability is identified, the pre-production event is marked as similar to the post-production events.
At step 206, a regression test case is reconstructed based on the comparison of the functions of the similar pre-production identifiable elements and the post-production identifiable elements. In an embodiment of the present invention, the similar pre-production and post-production identifiable elements are compared at a functional level. The comparison at the functional level comprises comparing the functions of the pre-production identifiable elements with the functions of the post-production identifiable elements. In the event the function of the pre-production identifiable elements matches with the function of the post-production identifiable elements, the pre-production event corresponding to the function of the pre-production identifiable element is considered as a best fit regression test case. In an embodiment of the present invention, the best fit regression test case is reconstructed as a new regression test case. In the event the functions of the pre-production identifiable elements fail to match with the functions of the post-production identifiable elements, the sub-functions of the post-production identifiable elements are compared with the sub-functions of the pre-production identifiable elements. In the event of a match of the sub-functions, a regression test case is reconstructed by combining various sub-functions of the pre-production identifiable elements that match with the post-production identifiable elements.
At step 208, gaps are removed in the reconstructed regression test cases and the reconstructed regression test cases are improved. In an embodiment of the present invention, recommendations are provided of missing pre-production functions in the reconstructed regression test cases in case the reconstructed pre-production event cannot be reconstructed completely. Based on the recommendations, a function may be added to the reconstructed regression test case. The reconstructed regression test case are further improved by using the captured end-user data from the post-production environment captured by a tool such as splunk. In an embodiment of the present invention, the end-user data may relate to search criteria used for an event of accessing an application. In another embodiment of the present invention, the end-user data may relate to the number of entries made by the user while accessing a function of the event. In an exemplary embodiment of the present invention, the end-user data may relate to the final product purchased by a user. In another exemplary embodiment of the present invention, the end-user data may relate to the number of times the user clicked on a certain object in a website.
At step 210, the improved regression test cases are implemented in the pre-production environment. In an embodiment of the present invention, the improved regression test cases are implemented such that the implemented regression test cases directly correspond to the post-production user activities.
The communication channel(s) 308 allow communication over a communication medium to various other computing entities. The communication medium provides information such as program instructions, or other data in a communication media. The communication media includes, but not limited to, wired or wireless methodologies implemented with an electrical, optical, RF, infrared, acoustic, microwave, Bluetooth or other transmission media.
The input device(s) 310 may include, but not limited to, a keyboard, mouse, pen, joystick, trackball, a voice device, a scanning device, touch screen or any another device that is capable of providing input to the computer system 302. In an embodiment of the present invention, the input device(s) 310 may be a sound card or similar device that accepts audio input in analog or digital form. The output device(s) 312 may include, but not limited to, a user interface on CRT or LCD, printer, speaker, CD/DVD writer, or any other device that provides output from the computer system 302.
The storage 314 may include, but not limited to, magnetic disks, magnetic tapes, CD-ROMs, CD-RWs, DVDs, flash drives or any other medium which can be used to store information and can be accessed by the computer system 302. In an embodiment of the present invention, the storage 314 contains program instructions for implementing the described embodiments.
The present invention may suitably be embodied as a computer program product for use with the computer system 302. The method described herein is typically implemented as a computer program product, comprising a set of program instructions which is executed by the computer system 302 or any other similar device. The set of program instructions may be a series of computer readable codes stored on a tangible medium, such as a computer readable storage medium (storage 314), for example, diskette, CD-ROM, ROM, flash drives or hard disk, or transmittable to the computer system 302, via a modem or other interface device, over either a tangible medium, including but not limited to optical or analogue communications channel(s) 308. The implementation of the invention as a computer program product may be in an intangible form using wireless techniques, including but not limited to microwave, infrared, Bluetooth or other transmission techniques. These instructions can be preloaded into a system or recorded on a storage medium such as a CD-ROM, or made available for downloading over a network such as the internet or a mobile telephone network. The series of computer readable instructions may embody all or part of the functionality previously described herein.
The present invention may be implemented in numerous ways including as a system, a method, or a computer program product such as a computer readable storage medium or a computer network wherein programming instructions are communicated from a remote location.
While the exemplary embodiments of the present invention are described and illustrated herein, it will be appreciated that they are merely illustrative. It will be understood by those skilled in the art that various modifications in form and detail may be made therein without departing from or offending the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
202041003079 | Jan 2020 | IN | national |
Number | Name | Date | Kind |
---|---|---|---|
10204349 | McCauley | Feb 2019 | B2 |
10423688 | Patton | Sep 2019 | B1 |
20080133210 | Chagoly | Jun 2008 | A1 |
20100205168 | Yang | Aug 2010 | A1 |
20120177121 | Tripathi | Jul 2012 | A1 |
20140101640 | Romdhane | Apr 2014 | A1 |
20150057875 | McGinnis | Feb 2015 | A1 |
20150161529 | Kondaji | Jun 2015 | A1 |
20160218884 | Ebrom | Jul 2016 | A1 |
20180007175 | Tischart | Jan 2018 | A1 |
20190163556 | Kataria | May 2019 | A1 |
20190370089 | Patton | Dec 2019 | A1 |
20210045719 | Götte | Feb 2021 | A1 |
20210357953 | Levi | Nov 2021 | A1 |
Number | Date | Country |
---|---|---|
101329652 | Dec 2010 | CN |
108255699 | Jul 2018 | CN |
109062799 | Dec 2018 | CN |
Entry |
---|
Automating User Journey—An Important Activity While Developing a System, (https://www.360logica.com/blog/automating-user-journey-an-important-activity-while-developing-a-system/), Mar. 4, 2019. |
Number | Date | Country | |
---|---|---|---|
20210232570 A1 | Jul 2021 | US |