-
Notifications
You must be signed in to change notification settings - Fork 22
3 TESTAR configuration and settings
All these settings can be added and modified in the specific file test.settings
file or used if we launch TESTAR through CLI
test.setting
file example:
CLI execution example:
testar sse=desktop_generic ShowVisualSettingsDialogOnStartup=false Sequences=5 SequenceLength=100 Mode=Generate SUTConnectorValue=" ""C:\\Windows\\notepad.exe"" " SuspiciousTitles=".[eE]rror.|.[eE]xcep[ct]ion."
IMPORTANT Inside setting file we use space as ident to declare the values Mode = Generate
, but with CLI mode we need to declare the values without space Mode=Generate
Select a specific protocol to run
sse=desktop_generic
Enable or disable TESTAR GUI.
ShowVisualSettingsDialogOnStartup = true
Set the mode you want TESTAR to start in: Spy, Generate, Replay
Mode = Generate
Indicate how you want to connect to the SUT:
- When SUTConnector is COMMAND_LINE then SUTConnectorValue property must be a command line that starts the SUT.
It should work from a Command Prompt terminal window (e.g. java - jar SUTs/calc.jar ).
For web applications, follow the next format: web_browser_path SUT_URL.
SUTConnector = COMMAND_LINE
SUTConnectorValue = c:\\windows\\system32\\notepad.exe
- When SUTConnector is SUT_WINDOW_TITLE the SUTConnectorValue property must be the title displayed in the SUT main window. The SUT must be manually started and closed.
SUTConnector = SUT_WINDOW_TITLE
SUTConnectorValue = Untitled
- When SUTConnector is SUT_PROCESS_NAME then SUTConnectorValue property must be the process name of the SUT. The SUT must be manually started and closed.
SUTConnector = SUT_PROCESS_NAME
SUTConnectorValue = notepad.exe
Indicate with regular expressions which processes conform to the SUT
This also works for SUTs that invoke the primary process using a launcher
SUTProcesses = .*notepad.exe.*
Activate the Java Access Bridge in your Windows System in order to test Java Swing applications
(Control Panel / Ease of Access / Ease of Access Center / Make the computer easier to see)
Enable the variable Access Bridge Enabled in TESTAR as true
AccessBridgeEnabled = true
Number of sequences and the length of these sequences
Sequences = 1
SequenceLength = 100
Regular expression to detect sequences suspicioustitle
SuspiciousTitles = .*[eE]rror.*|.*[eE]xcepti[o?]n.*
Maximum time TESTAR will wait for an application to respond before throwing the error sequences unresponsive
TimeToFreeze = 30.0
Requires ProcessListenerEnabled (Only available for desktop applications through COMMAND_LINE)
Regular expression SuspiciousProcessOutput contains the specification of what is considered to be suspicious output.
ProcessListenerEnabled = false
SuspiciousProcessOutput = .*[eE]rror.*|.*[eE]xcep[ct]i[o?]n.*
Requires ProcessListenerEnabled (Only available for desktop applications through COMMAND_LINE)
Allow TESTAR to store execution logs coming from the processes.
You can use the regular expression ProcessLogs below to filter
the logs. Use .*.*
if you want to store all the outputs of the
process.
ProcessLogs = .*.*
Regular expression. More filters can be added in Spy mode, these will be added to the protocol_filter.xml file.
ClickFilter = .*[sS]ave.*|.*[gG]uardar.*|.*[fF]ormat.*|.*[fF]ormatear.*|.*[pP]rint.*|.*[iI]mprimir.*|.*[eE]mail.*|.*[fF]ile.*|.*[aA]rchivo.*|.*[mM]inimize.*|.*[mM]inimizar.*|.*[dD]isconnect.*|.*[dD]esconectar.*
Regular expression. Kill the processes that your SUT can start up but that you do not want to test.
ProcessesToKillDuringTest = firefox.exe
Indicate the location of the protocol class for your specific SUT, and if you want to always compile the Java protocol file before TESTAR starts is execution.
ProtocolClass = web_generic/Protocol_web_generic
AlwaysCompile = true
Enable or disable this feature
StateModelEnabled = true
The graph database we use to store the State Model
DataStore = OrientDB
remote mode uses a network connection that allows TESTAR to connect to the database using an IP address.
plocal mode connects to the database at the file level, reading andwriting directly to disk
DataStoreType = remote
|| DataStoreType = plocal
IP address to connect if we desired to use remote mode
DataStoreServer = localhost
Path of the directory on which local OrientDB exists, if we use plocal mode
DataStoreDirectory = C:\\Users\\testar\\Desktop\\orientdb-3.0.34\\databases
The name of the desired database on which we want to store the State Model. OrientDB allow us to create multiple databases in the same server.
DataStoreDB = testar
User and password credential to authenticate TESTAR
DataStoreUser = testar
DataStorePassword = testar
Indicate how TESTAR should store the model objects in the database (instant, delayed, hybrid, none)
DataStoreMode = instant
Name and version to identify the SUT. This is an important parameter for the State Model because it will determine if we connect with an existing model or if we create a new one
ApplicationName = Notepad
ApplicationVersion = 1
State Model offer an Action Selection mechanism to explore the SUT using random or unvisited actions. This will also need the correct implementation of the protected Action selectAction(State state, Set<Action> actions)
method in the Java protocols:
ActionSelectionAlgorithm = unvisited
Save all widget tree information in the graph database every time TESTAR discovers a new Concrete State.
WARNING This feature needs extra time and memory in the runtime execution.
StateModelStoreWidgets = false
Delete all existing State Models from the selected database before creating a new one.
ResetDataStore = true
Specify the widget attributes that you wish to use in constructing the widget and state hash strings. Use a comma separated list.
AbstractStateAttributes = WidgetControlType
Overrides the displayscale obtained from the system.
Can solve problems when the mouse clicks are not aligned with the elements on the screen. This can easily be detected when running the spy mode. For example hover over a text element and the popup window should appear with information about the element, if the popup window is not shown or when the mouse is located somewhere else you can try to override the displayscale Values should be provided as doubles (1.5).
OverrideWebDriverDisplayScale = 1.0
OutputDir = ./output
TempDir = ./output/temp
Select the desired testar sequence file to be used by Replay Mode
PathToReplaySequence = ./output/temp
Force the SUT to be in the foreground of the Desktop. If the SUT is no longer in the foreground, TESTAR will try to use Windows API or ALT+TAB for this purpose
ForceForeground = true
Customize the Action time in seconds at which an UI action is performed, also the time to wait after executing it
ActionDuration = 0.1
TimeToWaitAfterAction = 0.1
Maximum time TESTAR can take to generate a sequence
MaxTime = 3.1536E7
VisualizeActions = false
VisualizeSelectedAction = true
Maximum time TESTAR will wait for an application to start, after that time an exception will be thrown.
StartupTime = 10.0
QLearning values to be used in the desktop_qlearning protocol
MaxReward = 9999999
Discount = .95