Skip to content

Commit a248a0e

Browse files
committed
Update autolink protocols
1 parent 4978d82 commit a248a0e

File tree

10 files changed

+117
-22
lines changed

10 files changed

+117
-22
lines changed

testar/resources/settings/android_b00_spark/Protocol_android_b00_spark.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ protected Action triggeredTypeAction(State state, Widget widget, String textToTy
150150
Action typeAction = new AndroidActionType(state, widget,
151151
textToType,
152152
widget.get(AndroidTags.AndroidAccessibilityId,""),
153-
widget.get(AndroidTags.AndroidText,""),
154153
widget.get(AndroidTags.AndroidClassName,""));
155154
return typeAction;
156155
}
@@ -219,7 +218,6 @@ protected Set<Action> deriveActions(SUT system, State state) throws ActionBuildE
219218
new AndroidActionType(state, widget,
220219
InputDataManager.getRandomTextInputData(widget),
221220
widget.get(AndroidTags.AndroidAccessibilityId,""),
222-
widget.get(AndroidTags.AndroidText,""),
223221
widget.get(AndroidTags.AndroidClassName,""))
224222
);
225223
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Feature: Complete the Welcome Survey
2+
As a signed-in user
3+
I want to complete the Welcome Survey
4+
So that my question responses are sent
5+
6+
Background:
7+
Given I am signed in
8+
And I can see the Welcome Survey
9+
10+
Scenario: Complete the Welcome Survey
11+
When I start the Welcome Survey
12+
And I arrived at 3:15 AM
13+
And I dont feel in a good mood today
14+
And I plan to come back again tomorrow
15+
And I have sent all responses
16+
Then the Welcome Survey should be completed

testar/resources/settings/android_b00_spark_llm/Protocol_android_b00_spark_llm.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ protected void initialize(Settings settings) {
9393
setupTestGoals(settings.get(ConfigTags.LlmTestGoals));
9494

9595
// Initialize the LlmActionSelector using the LLM settings
96-
llmActionSelector = new LlmActionSelector(settings, new ActionStandardPromptGenerator(AndroidTags.AndroidText));
96+
llmActionSelector = new LlmActionSelector(settings, new ActionStandardPromptGenerator(AndroidTags.AndroidText, true));
9797

9898
// Initialize the LlmOracle using the LLM settings
99-
llmOracle = new LlmOracle(settings, new OracleAndroidPromptGenerator());
99+
llmOracle = new LlmOracle(settings, new OracleAndroidPromptGenerator(true));
100100
}
101101

102102
private void setupTestGoals(List<String> testGoalsList) {
@@ -199,7 +199,7 @@ protected void beginSequence(SUT system, State state){
199199
// Type username
200200
waitLeftClickAndTypeIntoWidgetWithMatchingTag(AndroidTags.AndroidHint, "username", "testar", state, system, 5, 2);
201201
// Type password
202-
waitLeftClickAndTypeIntoWidgetWithMatchingTag(AndroidTags.AndroidHint, "•••••••••", "testar", state, system, 5, 2);
202+
waitLeftClickAndTypeIntoWidgetWithMatchingTag(AndroidTags.AndroidHint, "••••", "testar", state, system, 5, 2);
203203
// Click Sign In
204204
waitAndLeftClickWidgetWithMatchingTag(AndroidTags.AndroidText, "Submit", state, system, 5, 2);
205205
}
@@ -220,7 +220,6 @@ protected Action triggeredTypeAction(State state, Widget widget, String textToTy
220220
Action typeAction = new AndroidActionType(state, widget,
221221
textToType,
222222
widget.get(AndroidTags.AndroidAccessibilityId,""),
223-
widget.get(AndroidTags.AndroidText,""),
224223
widget.get(AndroidTags.AndroidClassName,""));
225224
return typeAction;
226225
}
@@ -306,7 +305,6 @@ protected Set<Action> deriveActions(SUT system, State state) throws ActionBuildE
306305
new AndroidActionType(state, widget,
307306
InputDataManager.getRandomTextInputData(widget),
308307
widget.get(AndroidTags.AndroidAccessibilityId,""),
309-
widget.get(AndroidTags.AndroidText,""),
310308
widget.get(AndroidTags.AndroidClassName,""))
311309
);
312310
}

testar/resources/settings/android_b00_spark_llm/test.settings

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ SUTConnectorValue = ./settings/android_b00_spark_llm/DesiredCapabilities.json
3232
#################################################################
3333

3434
Sequences = 1
35-
SequenceLength = 10
35+
SequenceLength = 20
3636

3737
#################################################################
3838
# Oracles based on suspicious tag values
@@ -122,7 +122,7 @@ ResetDataStore = false
122122
# Specify the widget attributes that you wish to use in constructing
123123
# the widget and state hash strings. Use a comma separated list.
124124
#################################################################
125-
AbstractStateAttributes = WidgetTitle
125+
AbstractStateAttributes = WidgetTitle,WidgetPath
126126

127127
#################################################################
128128
# LLM agents settings
@@ -132,9 +132,10 @@ AbstractStateAttributes = WidgetTitle
132132
#################################################################
133133

134134
LlmPlatform = OpenAI
135-
LlmModel = gemma2:9b
136-
LlmHostUrl = http://10.102.0.41:11434/v1/chat/completions
137-
LlmAuthorizationHeader =
135+
LlmModel = gpt-5
136+
LlmReasoning = low
137+
LlmHostUrl = https://api.openai.com/v1/chat/completions
138+
LlmAuthorizationHeader = Bearer %OPENAI_API%
138139
LlmActionFewshotFile = prompts/fewshot_openai_action.json
139140
LlmOracleFewshotFile = prompts/fewshot_openai_oracle.json
140141
LlmTemperature = 0.2

testar/resources/settings/webdriver_axini_llm_abstractor_modeler/Protocol_webdriver_axini_llm_abstractor_modeler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.testar.llm.LlmTestGoal;
3535
import org.testar.llm.prompt.AbstractionWebPromptGenerator;
3636
import org.testar.llm.prompt.ActionWebPromptGenerator;
37-
import org.testar.llm.prompt.OracleImagePromptGenerator;
3837
import org.testar.managers.InputDataManager;
3938
import org.testar.monkey.ConfigTags;
4039
import org.testar.monkey.Main;

testar/resources/settings/webdriver_axini_llm_bdd_modeler/Protocol_webdriver_axini_llm_bdd_modeler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.testar.llm.LlmTestGoal;
3535
import org.testar.llm.prompt.AbstractionWebPromptGenerator;
3636
import org.testar.llm.prompt.ActionWebPromptGenerator;
37-
import org.testar.llm.prompt.OracleImagePromptGenerator;
37+
import org.testar.llm.prompt.OracleWebPromptGenerator;
3838
import org.testar.managers.InputDataManager;
3939
import org.testar.monkey.ConfigTags;
4040
import org.testar.monkey.Main;
@@ -99,7 +99,7 @@ protected void initialize(Settings settings) {
9999
llmActionSelector = new LlmActionSelector(settings, new ActionWebPromptGenerator());
100100

101101
// Initialize the LlmOracle using the LLM settings
102-
llmOracle = new LlmOracle(settings, new OracleImagePromptGenerator());
102+
llmOracle = new LlmOracle(settings, new OracleWebPromptGenerator(true));
103103

104104
// Initialize the LlmStateAbstraction using the LLM settings
105105
llmStateAbstraction = new LlmStateAbstraction(settings, new AbstractionWebPromptGenerator());
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
Feature: Create Welcome Survey
2+
As a signed-in user
3+
I want to create a new Welcome Survey
4+
So that users will be able to create questions
5+
6+
Background:
7+
Given I am signed in
8+
And I can see my dashboard
9+
10+
Scenario: Create a new Welcome Survey
11+
When I navigate to the Emotional State Questionnaires
12+
And I select to add a new question set
13+
And I set the survey title to 'Welcome Survey'
14+
And I set the survey ID to 'welcome123'
15+
And I set the description to 'This is a Welcome Survey'
16+
And I click the 'Continue' button
17+
Then the 'Welcome Survey' should be created
18+
And the question set editor should be displayed
19+
;
20+
Feature: Add a Time Question to the Welcome Survey
21+
As a signed-in user
22+
I want to create and save a new Time question
23+
So that it becomes part of the Welcome survey
24+
25+
Background:
26+
Given I am signed in
27+
And I have access to the Welcome survey in the Emotional State Questionnaires
28+
29+
Scenario: Successful creation of a Time question in the Welcome survey
30+
When I navigate to the Welcome survey
31+
And I select a new Time question
32+
And I add a new question with the ID 'time123'
33+
And I set the question text to 'What time did you arrive?'
34+
And I save the question set
35+
Then a message appears indicating the survey activity has been updated
36+
;
37+
Feature: Add a Short Answer Question to the Welcome Survey
38+
As a signed-in user
39+
I want to create and save a Short Answer new question
40+
So that it becomes part of the Welcome survey
41+
42+
Background:
43+
Given I am signed in
44+
And I have access to the Welcome survey in the Emotional State Questionnaires
45+
46+
Scenario: Successful creation of a Short Answer question in the Welcome survey
47+
When I navigate to the Welcome survey
48+
And I select a new Short Answer question
49+
And I add a new question with the ID 'feel123'
50+
And I set the question text to 'Describe how do you feel today'
51+
And I save the question set
52+
Then a message appears indicating the survey activity has been updated
53+
;
54+
Feature: Add a Boolean Question to the Welcome Survey
55+
As a signed-in user
56+
I want to create and save a new Boolean question
57+
So that it becomes part of the Welcome survey
58+
59+
Background:
60+
Given I am signed in
61+
And I have access to the Welcome survey in the Emotional State Questionnaires
62+
63+
Scenario: Successful creation of a Boolean question in the Welcome survey
64+
When I navigate to the Welcome survey
65+
And I select a new Boolean question
66+
And I add a new question with the ID 'tomorrow123'
67+
And I set the question text to 'Are you coming tomorrow?'
68+
And I save the question set
69+
Then a message appears indicating the survey activity has been updated
70+
;
71+
Feature: Publish the Welcome Survey
72+
As a signed-in user
73+
I want to publish the Welcome Survey
74+
So that users will be able to complete it
75+
76+
Background:
77+
Given I am signed in
78+
And I have access to the Welcome survey in the Emotional State Questionnaires
79+
80+
Scenario: Successful publication of the Welcome survey
81+
When I navigate to the Welcome survey
82+
And I select to publish the three questions
83+
And I observe the new Question Set
84+
Then the Welcome Survey appears as Published
85+

testar/resources/settings/webdriver_b00_spark_llm/Protocol_webdriver_b00_spark_llm.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import org.testar.llm.LlmTestGoal;
3636
import org.testar.llm.prompt.OracleWebPromptGenerator;
3737
import org.testar.llm.prompt.ActionWebPromptGenerator;
38-
import org.testar.llm.prompt.OracleImagePromptGenerator;
3938
import org.testar.managers.InputDataManager;
4039
import org.testar.monkey.ConfigTags;
4140
import org.testar.monkey.Util;
@@ -84,10 +83,10 @@ protected void initialize(Settings settings) {
8483
setupTestGoals(settings.get(ConfigTags.LlmTestGoals));
8584

8685
// Initialize the LlmActionSelector using the LLM settings
87-
llmActionSelector = new LlmActionSelector(settings, new ActionWebPromptGenerator());
86+
llmActionSelector = new LlmActionSelector(settings, new ActionWebPromptGenerator(true));
8887

8988
// Initialize the LlmOracle using the LLM settings
90-
llmOracle = new LlmOracle(settings, new OracleImagePromptGenerator());
89+
llmOracle = new LlmOracle(settings, new OracleWebPromptGenerator(true));
9190
}
9291

9392
private void setupTestGoals(List<String> testGoalsList) {

testar/resources/settings/webdriver_mendix_llm/Protocol_webdriver_mendix_llm.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.testar.action.priorization.llm.LlmActionSelector;
3535
import org.testar.llm.LlmTestGoal;
3636
import org.testar.llm.prompt.ActionWebPromptGenerator;
37-
import org.testar.llm.prompt.OracleImagePromptGenerator;
37+
import org.testar.llm.prompt.OracleWebPromptGenerator;
3838
import org.testar.managers.InputDataManager;
3939
import org.testar.monkey.ConfigTags;
4040
import org.testar.monkey.Util;
@@ -84,7 +84,7 @@ protected void initialize(Settings settings) {
8484
llmActionSelector = new LlmActionSelector(settings, new ActionWebPromptGenerator());
8585

8686
// Initialize the LlmOracle using the LLM settings
87-
llmOracle = new LlmOracle(settings, new OracleImagePromptGenerator());
87+
llmOracle = new LlmOracle(settings, new OracleWebPromptGenerator(true));
8888
}
8989

9090
/**

testar/resources/settings/webdriver_newspark_drawnames_llm/Protocol_webdriver_newspark_drawnames_llm.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
import org.testar.action.priorization.llm.LlmActionSelector;
3535
import org.testar.llm.LlmTestGoal;
3636
import org.testar.llm.prompt.OracleWebPromptGenerator;
37-
import org.testar.llm.prompt.OracleImagePromptGenerator;
3837
import org.testar.llm.prompt.ActionWebPromptGenerator;
3938
import org.testar.managers.InputDataManager;
4039
import org.testar.monkey.ConfigTags;
@@ -86,7 +85,7 @@ protected void initialize(Settings settings) {
8685
llmActionSelector = new LlmActionSelector(settings, new ActionWebPromptGenerator());
8786

8887
// Initialize the LlmOracle using the LLM settings
89-
llmOracle = new LlmOracle(settings, new OracleImagePromptGenerator());
88+
llmOracle = new LlmOracle(settings, new OracleWebPromptGenerator(true));
9089
}
9190

9291
private void setupTestGoals(List<String> testGoalsList) {

0 commit comments

Comments
 (0)