Skip to content

Commit 7f29179

Browse files
authored
Merge pull request #471 from TESTARtool/development
Fix ignoring ValuePattern tag for UIAEdit widgets and remove unused classes
2 parents d0f3e51 + 0281adf commit 7f29179

10 files changed

Lines changed: 137 additions & 256 deletions

File tree

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
#TESTAR v2.8.2 (10-Mar-2026)
2+
- Fix ignoring ValuePattern tag for UIAEdit widgets
3+
- Remove unused comments and classes
4+
5+
16
#TESTAR v2.8.1 (9-Mar-2026)
27
- Refactor TESTAR internals from a single Verdict getVerdict to List<Verdict> getVerdicts
38
- Report all Verdict issues per state independently

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.8.1
1+
2.8.2

core/src/org/testar/monkey/alayer/Verdict.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ public enum Severity {
8787

8888
// SUSPICIOUS GROUP: EXCEPTION
8989
SUSPICIOUS_ALERT(0.19999998, "SUSPICIOUS_ALERT"),
90-
SUSPICIOUS_TITLE(0.19999999, "SUSPICIOUS_TITLE"),
9190

9291
// WARNING GROUP: WEB INVARIANT
9392
WARNING_WEB_INVARIANT_FAULT(0.2, "WARNING_WEB_INVARIANT_FAULT"),

testar/src/org/testar/ActionStatus.java

Lines changed: 0 additions & 92 deletions
This file was deleted.

testar/src/org/testar/JavaOutputParser.java

Lines changed: 0 additions & 102 deletions
This file was deleted.

testar/src/org/testar/SutProfiler.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

testar/src/org/testar/monkey/ConfigException.java

Lines changed: 0 additions & 41 deletions
This file was deleted.

testar/src/org/testar/monkey/DefaultProtocol.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.testar.monkey.alayer.ios.IOSProtocolUtil;
4848
import org.testar.monkey.alayer.visualizers.ShapeVisualizer;
4949
import org.testar.monkey.alayer.webdriver.WdProtocolUtil;
50+
import org.testar.monkey.alayer.windows.UIARoles;
5051
import org.testar.monkey.alayer.windows.WinApiException;
5152
import org.testar.oracles.Oracle;
5253
import org.testar.oracles.OracleSelection;
@@ -534,10 +535,6 @@ void endTestSequence(){
534535
cv.release();
535536
ScreenshotSerialiser.exit();
536537
TestSerialiser.exit();
537-
// String stopDateString = Util.dateString(DATE_FORMAT);
538-
// String durationDateString = Util.diffDateString(DATE_FORMAT, startOfSutDateString, stopDateString);
539-
// LogSerialiser.log("TESTAR stopped execution at " + stopDateString + "\n", LogSerialiser.LogLevel.Critical);
540-
// LogSerialiser.log("Test duration was " + durationDateString + "\n", LogSerialiser.LogLevel.Critical);
541538
LogSerialiser.flush();
542539
LogSerialiser.finish();
543540
LogSerialiser.exit();
@@ -928,23 +925,22 @@ private Verdict suspiciousStringValueMatcher(Widget w) {
928925
String tagValue = "";
929926
// First finding the Tag that matches the TagsToFilter string, then getting the value of that Tag:
930927
for(Tag<?> tag : w.tags()){
928+
// Ignore the ValuePattern tag for UIAEdit widgets
929+
if(tag.name().equals("ValuePattern") && w.get(Tags.Role, Roles.Widget).equals(UIARoles.UIAEdit)) {
930+
continue;
931+
}
932+
931933
if(w.get(tag, null) != null && tag.name().equals(tagForSuspiciousOracle)){
932934
// Force the replacement of new line characters to avoid the usage of (?s) regex in the regular expression
933935
tagValue = w.get(tag).toString().replace("\n", " ").replace("\r", " ");
934936
break;
935-
//System.out.println("DEBUG: tag found, "+tagToFilter+"="+tagValue);
936937
}
937938
}
938939

939940
//Check whether the Tag value is empty or null
940941
if (tagValue == null || tagValue.isEmpty())
941942
continue; //no action
942943

943-
//Ignore value ValuePattern for UIAEdit widgets
944-
if(tagValue.equals("ValuePattern") && w.get(Tags.Role, Roles.Widget).toString().equalsIgnoreCase("UIAEdit")) {
945-
continue;
946-
}
947-
948944
m = this.suspiciousTitlesMatchers.get(tagValue);
949945
if (m == null){
950946
m = this.suspiciousTitlesPattern.matcher(tagValue);
@@ -1016,7 +1012,6 @@ protected Set<Action> deriveActions(SUT system, State state) throws ActionBuildE
10161012
return actions;
10171013
}
10181014

1019-
//TODO is this process handling Windows specific? move to SystemProcessHandling
10201015
/**
10211016
* If unwanted processes need to be killed, the action returns an action to do that. If the SUT needs
10221017
* to be put in the foreground, then the action that is returned is putting it in the foreground.
@@ -1026,8 +1021,6 @@ protected Set<Action> deriveActions(SUT system, State state) throws ActionBuildE
10261021
* @return null if no preSelected actions are needed.
10271022
*/
10281023
protected Set<Action> preSelectAction(SUT system, State state, Set<Action> actions){
1029-
//Assert.isTrue(actions != null && !actions.isEmpty());
1030-
10311024
// TESTAR didn't find any actions in the State of the SUT
10321025
// It is set in a method actionExecuted that is not being called anywhere (yet?)
10331026
if (actions.isEmpty()){

testar/src/org/testar/monkey/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464

6565
public class Main {
6666

67-
public static final String TESTAR_VERSION = "v2.8.1 (9-Mar-2026)";
67+
public static final String TESTAR_VERSION = "v2.8.2 (10-Mar-2026)";
6868

6969
//public static final String TESTAR_DIR_PROPERTY = "DIRNAME"; //Use the OS environment to obtain TESTAR directory
7070
public static final String SETTINGS_FILE = "test.settings";

0 commit comments

Comments
 (0)