TESTARtool / TESTAR_dev

TESTAR, automated testing through the Graphical User Interface
http://www.testar.org
BSD 3-Clause "New" or "Revised" License
37 stars 24 forks source link

Add listening/record mode to Testar so it can make a state model of a SUT while using/testing by other application/user. #367

Open ramondevries opened 1 year ago

ramondevries commented 1 year ago

Add listening/record mode to Testar so it can make a state model of a SUT while a user and/or other testing software (e.g. selenium script) is testing/using the SUT.

The state model can then be used to train a AI to create a Best Next Action Predictor.

ferpasri commented 1 year ago

Research Idea

Scripted approaches are intended to replicate action-by-action the most typical user functionality in the System Under Test (SUT) to verify the SUT responses as expected.

Action 1: Open Bank Application
State 1: Initial Bank State

Action 2: Login with a valid user account
State 2: User Initial Bank State

Action 3: Click on Transfer Funds
State 3: User Transfer Funds Bank State

Action 4: Type a valid amount of money
State 4: User Transfer Funds Bank State with a valid amount of money

Action 5: Click to transfer the money
State 5: User Transfer Complete State

Access to these actions information in TESTAR can be helpful to implement more intelligent action selection decisions in Generate mode.
We can increase the probability of selecting these user-functionality actions in Generate mode to explore the SUT, prioritizing the functionalities that the SUT testers consider fundamental in their applications.
The idea is not to exactly replicate the same scripted actions but to semi-randomly explore around the transitions that are considered important

Implementation

These action-by-action scripts can be considered a model that starts in the initial state of a SUT and transits across states to reach the final desired state that has executed the desired functionality.
If we can extrapolate the action-by-action script information into a TESTAR state model with State1->Action1->State2 transitions, TESTAR will have access to the desired information.

To extrapolate this information, a possible idea is to connect TESTAR with the SUT and start a listening mode that infers information on the actions executed by the scripts.
To do that, we need to distinguish between desktop and web systems and analyze and classify how the scripts are created for different SUTs.

Next branch contains a preliminary implementation that allows TESTAR to start in Record mode to listen the action that user executes on a desktop application:
listening_mode