diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index d51f77f3f..4209f42b8 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -20,14 +20,19 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Prepare TESTAR protocols run: ./gradlew init_workflow_test + - name: Build TESTAR with Gradle run: ./gradlew build + - name: Prepare installed distribution of TESTAR with Gradle run: ./gradlew installDist + - name: Run desktop_generic protocol with TESTAR using COMMAND_LINE run: ./gradlew runTestDesktopGenericCommandLineOk - name: Save runTestDesktopGenericCommandLineOk HTML report artifact @@ -35,6 +40,7 @@ jobs: with: name: runTestDesktopGenericCommandLineOk-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_ok + - name: Run desktop_generic protocol that contains SuspiciousTitle with TESTAR run: ./gradlew runTestDesktopGenericCommandLineSuspiciousTitle - name: Save runTestDesktopGenericCommandLineSuspiciousTitle HTML report artifact @@ -42,6 +48,7 @@ jobs: with: name: runTestDesktopGenericCommandLineSuspiciousTitle-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_command_and_suspicious + - name: Run desktop_generic protocol using specific filtering and detect a SuspiciousTitle with TESTAR run: ./gradlew runTestDesktopGenericCommandLineSettingsFilterSuspiciousTitle - name: Save runTestDesktopGenericCommandLineSettingsFilterSuspiciousTitle HTML report artifact @@ -49,6 +56,7 @@ jobs: with: name: runTestDesktopGenericCommandLineSettingsFilterSuspiciousTitle-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_command_settings_filter_and_suspicious + - name: Run desktop_generic protocol but connect using SUT_PROCESS_NAME and detect SuspiciousTitle run: ./gradlew runTestDesktopGenericProcessNameSuspiciousTitle - name: Save runTestDesktopGenericProcessNameSuspiciousTitle HTML report artifact @@ -56,6 +64,7 @@ jobs: with: name: runTestDesktopGenericProcessNameSuspiciousTitle-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_process_and_suspicious + - name: Run desktop_generic protocol but connect using SUT_WINDOW_TITLE and detect SuspiciousTitle run: ./gradlew runTestDesktopGenericTitleNameSuspiciousTitle - name: Save runTestDesktopGenericTitleNameSuspiciousTitle HTML report artifact @@ -63,6 +72,7 @@ jobs: with: name: runTestDesktopGenericTitleNameSuspiciousTitle-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_title_and_suspicious + - name: Run desktop_generic with OrientDB to infer a TESTAR State Model run: ./gradlew runTestDesktopGenericStateModel - name: Save runTestDesktopGenericStateModel HTML report artifact @@ -70,6 +80,15 @@ jobs: with: name: runTestDesktopGenericStateModel-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_state_model + + - name: Run desktop_generic doing a customization in the AbstractIDCustom identifer + run: ./gradlew runTestDesktopGenericStateModelCustomAbstraction + - name: Save runTestDesktopGenericStateModelCustomAbstraction HTML report artifact + uses: actions/upload-artifact@v2 + with: + name: runTestDesktopGenericStateModelCustomAbstraction-artifact + path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/notepad_state_model_custom + - name: Run webdriver protocol and detect SuspiciousTitle run: ./gradlew runTestWebdriverSuspiciousTitle - name: Save runTestWebdriverSuspiciousTitle HTML report artifact @@ -77,6 +96,7 @@ jobs: with: name: runTestWebdriverSuspiciousTitle-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_and_suspicious + - name: Run webdriver to login in parabank app run: ./gradlew runTestWebdriverParabankLogin - name: Save runTestWebdriverParabankLogin HTML report artifact @@ -84,6 +104,7 @@ jobs: with: name: runTestWebdriverParabankLogin-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_login + - name: Run TESTAR Replay mode with a web page to check that replayed correctly run: ./gradlew runTestWebdriverCorrectReplay - name: Save runTestWebdriverCorrectReplay HTML report artifact @@ -91,6 +112,7 @@ jobs: with: name: runTestWebdriverCorrectReplay-artifact path: D:/a/TESTAR_dev/TESTAR_dev/testar/target/install/testar/bin/webdriver_replay + - name: Run TESTAR Replay mode to detect a not replayable button run: ./gradlew runTestWebdriverUnreplayable - name: Save runTestWebdriverUnreplayable HTML report artifact @@ -109,10 +131,13 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Build TESTAR with Gradle run: ./gradlew build + - name: Prepare installed distribution of TESTAR with Gradle run: ./gradlew installDist @@ -126,9 +151,12 @@ jobs: uses: actions/setup-java@v1 with: java-version: 1.8 + - name: Grant execute permission for gradlew run: chmod +x gradlew + - name: Build TESTAR with Gradle run: ./gradlew build + - name: Prepare installed distribution of TESTAR with Gradle run: ./gradlew installDist \ No newline at end of file diff --git a/testar/build.gradle b/testar/build.gradle index 4c8c6178a..c331fbea1 100644 --- a/testar/build.gradle +++ b/testar/build.gradle @@ -340,7 +340,7 @@ task verifyOrientDB(type: Verify, dependsOn: downloadOrientDB) { algorithm 'MD5' checksum 'a0619e5522e7d849d4f1067bf08e3857' } -// Extract LabRecruits binary files +// Extract OrientDB binary files task downloadAndUnzipOrientDB(type: Copy, dependsOn: verifyOrientDB) { group = 'test_testar_workflow' description ='downloadAndUnzipOrientDB' @@ -364,13 +364,20 @@ task createDatabaseOrientDB(type: Exec, dependsOn: downloadAndUnzipOrientDB){ } // Read command line output standardOutput = new ByteArrayOutputStream() + errorOutput = new ByteArrayOutputStream() workingDir 'target/install/testar/bin/orientdb-3.0.34/bin' commandLine 'cmd', '/c', 'console.bat CREATE DATABASE plocal:../databases/testar admin admin' + // Ignore errors creating the database because we check the output buffer message + ignoreExitValue true doLast { String output = standardOutput.toString() - - // Check if testar database created sucessfully - if(output.readLines().any{line->line.contains("Database created successfully.")}) { + + // If error creating database because already exists is ok + if (execResult.getExitValue()==1 && errorOutput.toString().contains("Cannot create new database 'testar' because it already exists")) { + println "\n${output} \ntestar OrientDB database already exists" + } + // Check if testar database created sucessfully + else if(output.readLines().any{line->line.contains("Database created successfully.")}) { println "\n${output} \ntestar OrientDB database created successfully" } else { throw new GradleException("\n${output} \nERROR: Creating testar OrientDB database") @@ -389,7 +396,7 @@ task runTestDesktopGenericStateModel(type: Exec, dependsOn: createDatabaseOrient doLast { String output = standardOutput.toString() - // Check that output contains 3 abstract states in the State Model inference + // Check that output contains 3 abstract states in the State Model inference if(output.readLines().any{line->line.contains("3 abstract states in the model")}) { println "\n${output} \nTESTAR State Model has been inferred sucessfully" } else { @@ -398,6 +405,27 @@ task runTestDesktopGenericStateModel(type: Exec, dependsOn: createDatabaseOrient } } +// Verify that TESTAR can custom the widget and actions identifiers +// Infer a State Model modifying the state and action identifiers +task runTestDesktopGenericStateModelCustomAbstraction(type: Exec, dependsOn: createDatabaseOrientDB) { + // Read command line output + standardOutput = new ByteArrayOutputStream() + group = 'test_testar_workflow' + description ='runTestDesktopGenericStateModelCustomAbstraction' + workingDir 'target/install/testar/bin' + commandLine 'cmd', '/c', 'testar sse=test_gradle_workflow_desktop_generic_custom_abstraction AlwaysCompile=true ApplicationName="notepad_state_model_custom" ShowVisualSettingsDialogOnStartup=false Mode=Generate SUTConnector=COMMAND_LINE SUTConnectorValue="C:\\\\Windows\\\\System32\\\\notepad.exe" Sequences=1 SequenceLength=1' + doLast { + String output = standardOutput.toString() + + // Check that output contains 0 unvisited actions left + if(output.contains("0 unvisited actions left")) { + println "\n${output} \nTESTAR Action AbstractIDCustom has been customized sucessfully" + } else { + throw new GradleException("\n${output} \nERROR: with Action AbstractIDCustom custom identifier") + } + } +} + // Download last win32 chromedriver task downloadChromedriver(type: Download, dependsOn: installDist) { group = 'test_testar_workflow' @@ -474,7 +502,7 @@ task runTestWebdriverParabankLogin(type: Exec, dependsOn: downloadAndUnzipChrome // Verify that TESTAR correctly replays a sequence task runTestWebdriverCorrectReplay(type: Exec, dependsOn: downloadAndUnzipChromedriver) { - // Read command line output + // Read command line output standardOutput = new ByteArrayOutputStream() group = 'test_testar_workflow' description ='runTestWebdriverCorrectReplay' @@ -483,7 +511,7 @@ task runTestWebdriverCorrectReplay(type: Exec, dependsOn: downloadAndUnzipChrome doLast { String output = standardOutput.toString() - // Check that output contains Sequence successfully replayed message to verify the correct replay execution + // Check that output contains Sequence successfully replayed message to verify the correct replay execution if(output.readLines().any{line->line.contains("Sequence successfully replayed")}) { println "\n${output} \nTESTAR sequence has been sucessfully replayed" } else { @@ -494,7 +522,7 @@ task runTestWebdriverCorrectReplay(type: Exec, dependsOn: downloadAndUnzipChrome // Verify that TESTAR correctly detects a not replayable sequence task runTestWebdriverUnreplayable(type: Exec, dependsOn: downloadAndUnzipChromedriver) { - // Read command line output + // Read command line output standardOutput = new ByteArrayOutputStream() group = 'test_testar_workflow' description ='runTestWebdriverUnreplayable' @@ -503,7 +531,7 @@ task runTestWebdriverUnreplayable(type: Exec, dependsOn: downloadAndUnzipChromed doLast { String output = standardOutput.toString() - // Check that TESTAR detects not replayable button + // Check that TESTAR detects not replayable button if(output.readLines().any{line->line.contains("Left Click at 'ParisThree' of the replayed sequence can not been replayed")}) { println "\n${output} \nTESTAR has sucessfully detected a not replayable sequence" } else { diff --git a/testar/resources/settings/desktop_generic_all_features/Protocol_desktop_generic_all_features.java b/testar/resources/settings/desktop_generic_all_features/Protocol_desktop_generic_all_features.java index 43688e3ac..2d2ec5a1c 100644 --- a/testar/resources/settings/desktop_generic_all_features/Protocol_desktop_generic_all_features.java +++ b/testar/resources/settings/desktop_generic_all_features/Protocol_desktop_generic_all_features.java @@ -39,6 +39,8 @@ import org.fruit.monkey.RuntimeControlsProtocol.Modes; import org.testar.protocols.DesktopProtocol; +import es.upv.staq.testar.CodingManager; + /** * This protocol combines different functionalities of TESTAR for testing Windows desktop applications * into one protocol. @@ -260,4 +262,47 @@ protected void stopSystem(SUT system) { protected void postSequenceProcessing() { super.postSequenceProcessing(); } + + /** + * This method allow users to customize the Widget and State identifiers. + * + * By default TESTAR uses the CodingManager to create the Widget and State identifiers: + * ConcreteID, ConcreteIDCustom, AbstractID, AbstractIDCustom, + * Abstract_R_ID, Abstract_R_T_ID, Abstract_R_T_P_ID + * + * @param state + */ + @Override + protected void buildStateIdentifiers(State state) { + CodingManager.buildIDs(state); + } + + /** + * This method allow users to customize the Actions identifiers. + * + * By default TESTAR uses the CodingManager to create the Actions identifiers: + * ConcreteID, ConcreteIDCustom, AbstractID, AbstractIDCustom + * + * @param state + * @param actions + */ + @Override + protected void buildStateActionsIdentifiers(State state, Set actions) { + CodingManager.buildIDs(state, actions); + } + + /** + * This method allow users to customize the environment Action identifiers. + * These are Actions not related to a Widget (ForceToForeground, Keyboard, KillProcess, etc...) + * + * By default TESTAR uses the CodingManager to create the specific environment Action identifiers: + * ConcreteID, ConcreteIDCustom, AbstractID, AbstractIDCustom + * + * @param state + * @param action + */ + @Override + protected void buildEnvironmentActionIdentifiers(State state, Action action) { + CodingManager.buildEnvironmentActionIDs(state, action); + } } diff --git a/testar/resources/workflow/settings/test_gradle_workflow_desktop_generic_custom_abstraction/Protocol_test_gradle_workflow_desktop_generic_custom_abstraction.java b/testar/resources/workflow/settings/test_gradle_workflow_desktop_generic_custom_abstraction/Protocol_test_gradle_workflow_desktop_generic_custom_abstraction.java new file mode 100644 index 000000000..ba04a9584 --- /dev/null +++ b/testar/resources/workflow/settings/test_gradle_workflow_desktop_generic_custom_abstraction/Protocol_test_gradle_workflow_desktop_generic_custom_abstraction.java @@ -0,0 +1,180 @@ +/*************************************************************************************************** + * + * Copyright (c) 2021 Universitat Politecnica de Valencia - www.upv.es + * Copyright (c) 2021 Open Universiteit - www.ou.nl + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + *******************************************************************************************************/ + + +import java.io.File; +import java.util.Set; +import java.util.zip.CRC32; + +import org.apache.commons.io.FileUtils; +import org.fruit.alayer.*; +import org.fruit.alayer.exceptions.*; +import org.fruit.monkey.ConfigTags; +import org.fruit.monkey.Main; +import org.testar.OutputStructure; +import org.testar.protocols.DesktopProtocol; + +import es.upv.staq.testar.CodingManager; +import nl.ou.testar.RandomActionSelector; + +/** + * This protocol is used to test TESTAR by executing a gradle CI workflow. + * + * ".github/workflows/gradle.yml" + */ +public class Protocol_test_gradle_workflow_desktop_generic_custom_abstraction extends DesktopProtocol { + + @Override + protected void buildStateIdentifiers(State state) { + CodingManager.buildIDs(state); + + // Reset widgets AbstractIDCustom identifier values to empty + resetAbstractIDCustom(state); + // Custom the State AbstractIDCustom identifier to ignore Format menu bar widgets + customBuildAbstractIDCustom(state); + + System.out.println("*DEBUG* buildStateIdentifiers: " + state.get(Tags.AbstractIDCustom, "StateHasNoAbstractIDCustom")); + } + + private synchronized void resetAbstractIDCustom(State state) { + for(Widget w : state) { + w.set(Tags.AbstractIDCustom, ""); + } + } + + private synchronized void customBuildAbstractIDCustom(Widget widget){ + if (widget.parent() != null) { + // Skip Format UIAMenu from the state abstraction + if(widget.get(Tags.Role, Roles.Invalid).toString().equals("UIAMenu")) { + if(widget.get(Tags.Title, "NoTitle").contains("Format")) { + return; + } + } + // Skip widgets elements from Format UIAMenu from the state abstraction + if(widget.get(Tags.Role, Roles.Invalid).toString().equals("UIAMenuItem")) { + // Skip Word Wrap widget (English and Spanish) + if(widget.get(Tags.Title, "NoTitle").contains("Word Wrap") || widget.get(Tags.Title, "NoTitle").contains("Ajuste de")) { + return; + } + // Skip Font widget (English and Spanish) + if(widget.get(Tags.Title, "NoTitle").contains("Font") || widget.get(Tags.Title, "NoTitle").contains("Fuente")) { + return; + } + } + widget.set(Tags.AbstractIDCustom, CodingManager.ID_PREFIX_WIDGET + CodingManager.ID_PREFIX_ABSTRACT_CUSTOM + lowCollisionID(widget.get(Tags.Title, "NoTitle"))); + } else if (widget instanceof State) { + StringBuilder abstractIdCustom; + abstractIdCustom = new StringBuilder(); + for (Widget childWidget : (State) widget) { + if (childWidget != widget) { + customBuildAbstractIDCustom(childWidget); + abstractIdCustom.append(childWidget.get(Tags.AbstractIDCustom)); + } + } + widget.set(Tags.AbstractIDCustom, CodingManager.ID_PREFIX_STATE + CodingManager.ID_PREFIX_ABSTRACT_CUSTOM + lowCollisionID(abstractIdCustom.toString())); + } + } + + @Override + protected void buildStateActionsIdentifiers(State state, Set actions) { + CodingManager.buildIDs(state, actions); + + // Custom the Action AbstractIDCustom identifier + for(Action a : actions) { + // Action Custom Identifier based on OriginWidget Title (ignoring State) + // This means that an action that opens/closes a menubar will be consider the same in both states + String customIdentifier = CodingManager.ID_PREFIX_ACTION + CodingManager.ID_PREFIX_ABSTRACT_CUSTOM + lowCollisionID(a.get(Tags.OriginWidget).get(Tags.Title)); + a.set(Tags.AbstractIDCustom, customIdentifier); + + System.out.println("*DEBUG* Available action: " + a.get(Tags.Desc, "No description") + ", AbstractIDCustom: " + a.get(Tags.AbstractIDCustom, "NoAbstractIDCustom")); + } + } + + private String lowCollisionID(String text){ // reduce ID collision probability + CRC32 crc32 = new CRC32(); + crc32.update(text.getBytes()); + return Integer.toUnsignedString(text.hashCode(), Character.MAX_RADIX) + + Integer.toHexString(text.length()) + + crc32.getValue(); + } + + @Override + protected Set deriveActions(SUT system, State state) throws ActionBuildException{ + + //The super method returns a ONLY actions for killing unwanted processes if needed, or bringing the SUT to + //the foreground. You should add all other actions here yourself. + // These "special" actions are prioritized over the normal GUI actions in selectAction() / preSelectAction(). + Set actions = super.deriveActions(system,state); + + + // Derive left-click actions, click and type actions, and scroll actions from + // top level (highest Z-index) widgets of the GUI: + actions = deriveClickTypeScrollActionsFromTopLevelWidgets(actions, system, state); + + if(actions.isEmpty()){ + // If the top level widgets did not have any executable widgets, try all widgets: + // Derive left-click actions, click and type actions, and scroll actions from + // all widgets of the GUI: + actions = deriveClickTypeScrollActionsFromAllWidgetsOfState(actions, system, state); + } + + //return the set of derived actions + return actions; + } + + @Override + protected Action selectAction(State state, Set actions){ + + //Call the preSelectAction method from the AbstractProtocol so that, if necessary, + //unwanted processes are killed and SUT is put into foreground. + Action retAction = preSelectAction(state, actions); + if (retAction== null) { + //if no preSelected actions are needed, then implement your own action selection strategy + //using the action selector of the state model: + retAction = stateModelManager.getAbstractActionToExecute(actions); + } + if(retAction==null) { + System.out.println("State model based action selection did not find an action. Using random action selection."); + // if state model fails, use random (default would call preSelectAction() again, causing double actions HTML report): + retAction = RandomActionSelector.selectAction(actions); + } + return retAction; + } + + @Override + protected void closeTestSession() { + super.closeTestSession(); + try { + File originalFolder = new File(OutputStructure.outerLoopOutputDir).getCanonicalFile(); + File artifactFolder = new File(Main.testarDir + settings.get(ConfigTags.ApplicationName,"")); + FileUtils.copyDirectory(originalFolder, artifactFolder); + } catch(Exception e) {System.out.println("ERROR: Creating Artifact Folder");} + } +} diff --git a/testar/resources/workflow/settings/test_gradle_workflow_desktop_generic_custom_abstraction/test.settings b/testar/resources/workflow/settings/test_gradle_workflow_desktop_generic_custom_abstraction/test.settings new file mode 100644 index 000000000..e261eb12b --- /dev/null +++ b/testar/resources/workflow/settings/test_gradle_workflow_desktop_generic_custom_abstraction/test.settings @@ -0,0 +1,155 @@ +################################################################# +# TESTAR mode +# +# Set the mode you want TESTAR to start in: Spy, Generate, Replay +################################################################# + +Mode = Generate + +################################################################# +# Connect to the System Under Test (SUT) +# +# Indicate how you want to connect to the SUT: +# +# SUTCONNECTOR = COMMAND_LINE, 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 = SUT_WINDOW_TITLE, then SUTConnectorValue property must be the title displayed +# in the SUT main window. The SUT must be manually started and closed. +# +# SUTCONNECTOR = SUT_PROCESS_NAME: SUTConnectorValue property must be the process name of the SUT. +# The SUT must be manually started and closed. +################################################################# +SUTConnector = COMMAND_LINE +SUTConnectorValue = c:\\windows\\system32\\notepad.exe + +################################################################# +# Sequences +# +# Number of sequences and the length of these sequences +################################################################# + +Sequences = 1 +SequenceLength = 1 + +################################################################# +# Oracles based on suspicious titles +# +# Regular expression +################################################################# + +SuspiciousTitles = .*[eE]rror.*|.*[eE]xcepti[o?]n.* + +################################################################# +# Oracles based on Suspicious Outputs detected by Process Listeners +# +# 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.* + +################################################################# +# Process Logs +# +# 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 = .*.* + +################################################################# +# Actionfilter +# +# Regular expression. More filters can be added in Spy mode, +# these will be added to the protocol_filter.xml file. +################################################################# + +ClickFilter = .*[sS]ystem.*|.*[cC]lose.*|.*[mM]inimize.*|.*[mM]aximize.*|Text Editor|File|Edit|View|Help|Word Wrap|.*Font.*|.*[sS]istema.*|.*[cC]errar.*|.*[mM]inimizar.*|.*[mM]aximizar.*|Editor de texto|Archivo|.*Edici.*|Ver|Ayuda|.*Ajuste.*|.*Fuente.* + +################################################################# +# Processfilter +# +# Regular expression. Kill the processes that your SUT can start up +# but that you do not want to test. +################################################################# + +SUTProcesses = + +################################################################# +# Protocolclass +# +# Indicate the location of the protocol class for your specific SUT. +################################################################# + +ProtocolClass = test_gradle_workflow_desktop_generic_custom_abstraction/Protocol_test_gradle_workflow_desktop_generic_custom_abstraction + +################################################################# +# State model inference settings +################################################################# +StateModelEnabled = true +DataStore = OrientDB +DataStoreType = plocal +DataStoreServer = localhost +DataStoreDirectory = orientdb-3.0.34\\databases +DataStoreDB = testar +DataStoreUser = admin +DataStorePassword = admin +DataStoreMode = instant +ApplicationName = notepad +ApplicationVersion = 1 +ActionSelectionAlgorithm = unvisited +StateModelStoreWidgets = true + +################################################################# +# State identifier attributes +# +# Specify the widget attributes that you wish to use in constructing +# the widget and state hash strings. Use a comma separated list. +################################################################# +AbstractStateAttributes = WidgetControlType + +################################################################# +# Other more advanced settings +################################################################# + +ProcessesToKillDuringTest = +OutputDir = ./output +PathToReplaySequence = ./output/temp +TempDir = ./output/temp +UseRecordedActionDurationAndWaitTimeDuringReplay = false +ForceForeground = true +LogLevel = 1 +ExecuteActions = true +FaultThreshold = 0.000000001 +DrawWidgetUnderCursor = true +MyClassPath = ./settings +OnlySaveFaultySequences = false +ActionDuration = 0.5 +ShowVisualSettingsDialogOnStartup = true +ReplayRetryTime = 30.0 +Delete = +MaxTime = 3.1536E7 +ShowSettingsAfterTest = true +TimeToWaitAfterAction = 2.0 +StartupTime = 20.0 +DrawWidgetInfo = false +TimeToFreeze = 30.0 +StopGenerationOnFault = true +CopyFromTo = +VisualizeActions = false +VisualizeSelectedAction = true +TestGenerator = random +MaxReward = 9999999 +Discount = .95 \ No newline at end of file diff --git a/testar/src/org/fruit/monkey/SettingsDialog.java b/testar/src/org/fruit/monkey/SettingsDialog.java index d75e4cc77..3001ca9ca 100644 --- a/testar/src/org/fruit/monkey/SettingsDialog.java +++ b/testar/src/org/fruit/monkey/SettingsDialog.java @@ -70,7 +70,7 @@ public class SettingsDialog extends JFrame implements Observer { private static final long serialVersionUID = 5156320008281200950L; - static final String TESTAR_VERSION = "2.3.3 (17-Jun-2021)"; + static final String TESTAR_VERSION = "2.3.4 (1-Jul-2021)"; private String settingsFile; private Settings settings;