Skip to content

Commit 35c3027

Browse files
ASPS002Ujjwal Srivastava
and
Ujjwal Srivastava
authored
added test spec to disable gif encoder (#687)
<!-- Please provide brief information about the PR, what it contains & its purpose, new behaviours after the change. And let us know here if you need any help: https://github.com/microsoft/HydraLab/issues/new --> ## Description This Pull request adds a new test configuration `disableGifEncoder ` having default value as false. It disables the collection of screenshots during the test runs by blocking the calls to `startGifEncoder `and `stopGifEncoder` methods when the `disableGifEncoder` is set to true. ### Linked GitHub issue ID: # ## Pull Request Checklist <!-- Put an x in the boxes that apply. This is simply a reminder of what we are going to look for before merging your code. --> - [ ] Tests for the changes have been added (for bug fixes / features) - [x] Code compiles correctly with all tests are passed. - [x] I've read the [contributing guide](https://github.com/microsoft/HydraLab/blob/main/CONTRIBUTING.md#making-changes-to-the-code) and followed the recommended practices. - [ ] [Wikis](https://github.com/microsoft/HydraLab/wiki) or [README](https://github.com/microsoft/HydraLab/blob/main/README.md) have been reviewed and added / updated if needed (for bug fixes / features) ### Does this introduce a breaking change? *If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.* - [ ] Yes - [x] No ## How you tested it *Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.* Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Technical design - [ ] Build related changes - [ ] Refactoring (no functional changes, no api changes) - [ ] Code style update (formatting, renaming) or Documentation content changes - [ ] Other (please describe): ### Feature UI screenshots or Technical design diagrams *If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...* --------- Co-authored-by: Ujjwal Srivastava <[email protected]>
1 parent 3c55831 commit 35c3027

File tree

19 files changed

+84
-28
lines changed

19 files changed

+84
-28
lines changed

agent/src/main/java/com/microsoft/hydralab/agent/runner/appium/AppiumListener.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ public void startRecording(int maxTime) {
6666
if (!testTask.isDisableRecording()) {
6767
testRunDeviceOrchestrator.startScreenRecorder(testRunDevice, testRun.getResultFolder(), maxTime <= 0 ? 30 * 60 : maxTime, logger);
6868
}
69-
logger.info("Start gif frames collection");
70-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
69+
if (!testTask.isDisableGifEncoder()) {
70+
logger.info("Start gif frames collection");
71+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
72+
}
7173
logger.info("Start logcat collection");
7274
testRunDeviceOrchestrator.startLogCollector(testRunDevice, pkgName, testRun, logger);
7375
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
@@ -206,7 +208,9 @@ public void testRunFinished(Result result) {
206208
testRun.addNewTimeTag("testRunEnded", System.currentTimeMillis() - recordingStartTimeMillis);
207209
testRun.onTestEnded();
208210
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
209-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
211+
if (!testTask.isDisableGifEncoder()) {
212+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
213+
}
210214
if (!testTask.isDisableRecording()) {
211215
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), logger);
212216
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/appium/Junit5Listener.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ public void startRecording(int maxTime) {
6969
if (!testTask.isDisableRecording()) {
7070
testRunDeviceOrchestrator.startScreenRecorder(testRunDevice, testRun.getResultFolder(), maxTime <= 0 ? 30 * 60 : maxTime, logger);
7171
}
72-
logger.info("Start gif frames collection");
73-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
72+
if (!testTask.isDisableGifEncoder()) {
73+
logger.info("Start gif frames collection");
74+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
75+
}
7476
logger.info("Start logcat collection");
7577
testRunDeviceOrchestrator.startLogCollector(testRunDevice, pkgName, testRun, logger);
7678
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
@@ -123,7 +125,9 @@ public void testPlanExecutionFinished(TestPlan testPlan) {
123125
testRun.addNewTimeTag("testRunEnded", System.currentTimeMillis() - recordingStartTimeMillis);
124126
testRun.onTestEnded();
125127
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
126-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
128+
if (!testTask.isDisableGifEncoder()) {
129+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
130+
}
127131
if (!testTask.isDisableRecording()) {
128132
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), logger);
129133
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/espresso/EspressoTestInfoProcessorListener.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ private void startTools(String runName) {
102102
} catch (Exception exception) {
103103
exception.printStackTrace();
104104
}
105-
logger.info("Start gif frames collection");
106-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
105+
if(!testTask.isDisableGifEncoder()) {
106+
logger.info("Start gif frames collection");
107+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
108+
}
107109
}
108110

109111
private void infoLogEnter(Object... args) {
@@ -242,7 +244,9 @@ private void releaseResource() {
242244
if (testTask.isEnableNetworkMonitor()) {
243245
testRunDeviceOrchestrator.stopNetworkMonitor(testRunDevice, logger);
244246
}
245-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
247+
if (!testTask.isDisableGifEncoder()) {
248+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
249+
}
246250
if (!testTask.isDisableRecording()) {
247251
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), logger);
248252
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/maestro/MaestroListener.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ public void startRecording(int maxTime) {
8484
if (!testTask.isDisableRecording()) {
8585
testRunDeviceOrchestrator.startScreenRecorder(testRunDevice, testRun.getResultFolder(), maxTime <= 0 ? 30 * 60 : maxTime, logger);
8686
}
87-
logger.info("Start gif frames collection");
88-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
87+
if (!testTask.isDisableGifEncoder()) {
88+
logger.info("Start gif frames collection");
89+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
90+
}
8991
logger.info("Start logcat collection");
9092
testRunDeviceOrchestrator.startLogCollector(testRunDevice, pkgName, testRun, logger);
9193
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
@@ -146,7 +148,9 @@ public void testRunEnded() {
146148
testRun.addNewTimeTag("testRunEnded", System.currentTimeMillis() - recordingStartTimeMillis);
147149
testRun.onTestEnded();
148150
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
149-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
151+
if (!testTask.isDisableGifEncoder()) {
152+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
153+
}
150154
if (!testTask.isDisableRecording()) {
151155
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), logger);
152156
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/monkey/AdbMonkeyRunner.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,10 @@ public void startTools(TestRunDevice testRunDevice, TestTask testTask, TestRun t
101101
testRunDeviceOrchestrator.startLogCollector(testRunDevice, testTask.getPkgName(), testRun, logger);
102102
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
103103

104-
logger.info("Start gif frames collection");
105-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
104+
if (!testTask.isDisableGifEncoder()) {
105+
logger.info("Start gif frames collection");
106+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
107+
}
106108
}
107109

108110
public long runMonkeyTestOnce(TestRunDevice testRunDevice, TestTask testTask, TestRun testRun, AndroidTestUnit ongoingMonkeyTest, Logger logger) {
@@ -165,7 +167,9 @@ public long runMonkeyTestOnce(TestRunDevice testRunDevice, TestTask testTask, Te
165167

166168
public void releaseResource(TestTask testTask, TestRunDevice testRunDevice, TestRun testRun) {
167169
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
168-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
170+
if (!testTask.isDisableGifEncoder()) {
171+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
172+
}
169173
if (!testTask.isDisableRecording()) {
170174
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), testRun.getLogger());
171175
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/monkey/AppiumMonkeyRunner.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ protected File runAndGetGif(File appiumJarFile, String appiumCommand, TestRunDev
4848
testRunDeviceOrchestrator.startScreenRecorder(testRunDevice, deviceTestResultFolder, testTask.getTimeOutSecond(), logger);
4949
}
5050
testRunDeviceOrchestrator.startLogCollector(testRunDevice, pkgName, testRun, logger);
51-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
51+
if(!testTask.isDisableGifEncoder()) {
52+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
53+
}
5254
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
5355
testRun.setTotalCount(1);
5456

@@ -77,7 +79,9 @@ protected File runAndGetGif(File appiumJarFile, String appiumCommand, TestRunDev
7779

7880
runAppiumMonkey(testRunDevice, pkgName, testTask.getMaxStepCount(), logger);
7981

80-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
82+
if (!testTask.isDisableGifEncoder()) {
83+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
84+
}
8185
if (!testTask.isDisableRecording()) {
8286
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), logger);
8387
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/python/PythonRunner.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,17 @@ public void startTools(TestRunDevice testRunDevice, TestTask testTask, TestRun t
109109
testRunDeviceOrchestrator.startLogCollector(testRunDevice, testTask.getPkgName(), testRun, logger);
110110
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
111111

112-
logger.info("Start gif frames collection");
113-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
112+
if (!testTask.isDisableGifEncoder()) {
113+
logger.info("Start gif frames collection");
114+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
115+
}
114116
}
115117

116118
public void releaseResource(TestTask testTask, TestRunDevice testRunDevice, TestRun testRun) {
117119
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
118-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
120+
if (!testTask.isDisableGifEncoder()) {
121+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
122+
}
119123
if (!testTask.isDisableRecording()) {
120124
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), testRun.getLogger());
121125
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/smart/SmartRunner.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ public void startTools(TestRunDevice testRunDevice, TestTask testTask, TestRun t
9696
testRun.addNewTimeTag(initializing, 0);
9797
testRun.setTestStartTimeMillis(System.currentTimeMillis());
9898

99-
logger.info("Start gif frames collection");
100-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
99+
if (!testTask.isDisableGifEncoder()) {
100+
logger.info("Start gif frames collection");
101+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
102+
}
101103
}
102104

103105
public void runSmartTestOnce(int i, TestRunDevice testRunDevice, TestTask testTask, TestRun testRun, SmartTestParam smartTestParam, Logger logger) {
@@ -180,7 +182,9 @@ public void testRunEnded(TestRunDevice testRunDevice, TestTask testTask, TestRun
180182
testRun.addNewTimeTag("testRunEnded", System.currentTimeMillis() - testRun.getTestStartTimeMillis());
181183
testRun.onTestEnded();
182184
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
183-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
185+
if (!testTask.isDisableGifEncoder()) {
186+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
187+
}
184188
if (!testTask.isDisableRecording()) {
185189
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), testRun.getLogger());
186190
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/t2c/T2CRunner.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ protected File runAndGetGif(File initialJsonFile, String unusedSuiteName, TestRu
7171
long recordingStartTimeMillis = System.currentTimeMillis();
7272

7373
testRunDeviceOrchestrator.startLogCollector(testRunDevice, pkgName, testRun, logger);
74-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
74+
if (!testTask.isDisableGifEncoder()) {
75+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), pkgName + ".gif");
76+
}
7577
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
7678
testRun.setTotalCount(testTask.testJsonFileList.size() + (initialJsonFile == null ? 0 : 1));
7779
testRun.setTestStartTimeMillis(System.currentTimeMillis());
@@ -96,7 +98,9 @@ protected File runAndGetGif(File initialJsonFile, String unusedSuiteName, TestRu
9698
testRun.addNewTimeTag("testRunEnded", System.currentTimeMillis() - recordingStartTimeMillis);
9799
testRun.onTestEnded();
98100
testRunDeviceOrchestrator.setRunningTestName(testRunDevice, null);
99-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
101+
if (!testTask.isDisableGifEncoder()) {
102+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), logger);
103+
}
100104
if (!testTask.isDisableRecording()) {
101105
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), logger);
102106
}

agent/src/main/java/com/microsoft/hydralab/agent/runner/xctest/XCTestRunner.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ private void initializeTest(TestRunDevice testRunDevice, TestTask testTask, Test
6060
testRunDeviceOrchestrator.startScreenRecorder(testRunDevice, testRun.getResultFolder(), testTask.getTimeOutSecond(), testRun.getLogger());
6161
}
6262
testRunDeviceOrchestrator.startLogCollector(testRunDevice, testTask.getPkgName(), testRun, testRun.getLogger());
63-
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
63+
if(!testTask.isDisableGifEncoder()) {
64+
testRunDeviceOrchestrator.startGifEncoder(testRunDevice, testRun.getResultFolder(), testTask.getPkgName() + ".gif");
65+
}
6466
testRun.setLogcatPath(agentManagementService.getTestBaseRelPathInUrl(new File(testRunDevice.getLogPath())));
6567
testRun.addNewTimeTag("Initializing", 0);
6668
testRun.setTestStartTimeMillis(System.currentTimeMillis());
@@ -206,7 +208,9 @@ private void finishTest(TestRunDevice testRunDevice, TestTask testTask, TestRun
206208
String absoluteReportPath = testRun.getResultFolder().getAbsolutePath();
207209
testRun.setTestXmlReportPath(agentManagementService.getTestBaseRelPathInUrl(new File(absoluteReportPath)));
208210
testRun.setTestGifPath(agentManagementService.getTestBaseRelPathInUrl(testRunDevice.getGifFile()));
209-
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
211+
if (!testTask.isDisableGifEncoder()) {
212+
testRunDeviceOrchestrator.stopGitEncoder(testRunDevice, agentManagementService.getScreenshotDir(), testRun.getLogger());
213+
}
210214
if (!testTask.isDisableRecording()) {
211215
testRunDeviceOrchestrator.stopScreenRecorder(testRunDevice, testRun.getResultFolder(), testRun.getLogger());
212216
}

center/src/main/java/com/microsoft/hydralab/center/controller/TestTaskController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public Result<List<TestTaskQueuedInfo>> getTaskQueue(@CurrentSecurityContext Sys
218218
*/
219219
@PostMapping(value = {"/api/test/task/list"}, produces = MediaType.APPLICATION_JSON_VALUE)
220220
public Result<Page<Task>> getTaskList(@CurrentSecurityContext SysUser requestor,
221-
@RequestBody JSONObject data) {
221+
@RequestBody JSONObject data) {
222222
try {
223223
if (requestor == null) {
224224
return Result.error(HttpStatus.UNAUTHORIZED.value(), "unauthorized");

common/src/main/java/com/microsoft/hydralab/common/entity/common/Task.java

+4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ public class Task implements Serializable {
8484
private String notifyUrl;
8585
@Transient
8686
private boolean disableRecording = false;
87+
@Transient
88+
private boolean disableGifEncoder = false;
8789
@Column(columnDefinition = "boolean default false")
8890
private boolean isSucceed = false;
8991
public String blockedDeviceSerialNumber;
@@ -169,6 +171,7 @@ public TestTaskSpec convertToTaskSpec() {
169171
testTaskSpec.teamName = getTeamName();
170172
testTaskSpec.notifyUrl = getNotifyUrl();
171173
testTaskSpec.disableRecording = isDisableRecording();
174+
testTaskSpec.disableGifEncoder = isDisableGifEncoder();
172175
testTaskSpec.retryTime = getRetryTime();
173176

174177
if (isBlockDevice()) {
@@ -215,6 +218,7 @@ public Task(TestTaskSpec testTaskSpec) {
215218
setTeamName(testTaskSpec.teamName);
216219
setNotifyUrl(testTaskSpec.notifyUrl);
217220
setDisableRecording(testTaskSpec.disableRecording);
221+
setDisableGifEncoder(testTaskSpec.disableGifEncoder);
218222

219223
if (testTaskSpec.blockDevice) {
220224
setBlockDevice(true);

common/src/main/java/com/microsoft/hydralab/common/entity/common/TestTaskSpec.java

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class TestTaskSpec {
5454
public boolean enablePerformanceSuggestion;
5555
public String notifyUrl;
5656
public boolean disableRecording = false;
57+
public boolean disableGifEncoder = false;
5758
public boolean enableNetworkMonitor;
5859
public String networkMonitorRule;
5960
public boolean enableTestOrchestrator = false;

gradle_plugin/doc/UML/gradle_plugin_yaml_config_design.puml

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ testSpec:
9494
description: test schedule
9595
notifyUrl: NOTIFY_URL
9696
disableRecording: false
97+
disableGifEncoder: false
9798
enableFailingTask: true
9899
enableNetworkMonitor: false
99100
networkMonitorRule: NETWORK_TEST_RULE_NONE

gradle_plugin/src/main/groovy/com/microsoft/hydralab/ClientUtilsPlugin.groovy

+4
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ class ClientUtilsPlugin implements Plugin<Project> {
158158
if (project.hasProperty('disableRecording')) {
159159
testConfig.disableRecording = Boolean.parseBoolean(project.disableRecording)
160160
}
161+
if (project.hasProperty('disableGifEncoder')) {
162+
testConfig.disableRecording = Boolean.parseBoolean(project.disableGifEncoder)
163+
}
164+
161165
if (project.hasProperty('enableFailingTask')) {
162166
testConfig.enableFailingTask = Boolean.parseBoolean(project.enableFailingTask)
163167
}

gradle_plugin/src/main/groovy/com/microsoft/hydralab/config/TestConfig.java

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class TestConfig {
5454
public String inspectionStrategiesStr = "";
5555
public String notifyUrl = "";
5656
public boolean disableRecording = false;
57+
public boolean disableGifEncoder = false;
5758
public boolean enableFailingTask = true;
5859
public boolean enableNetworkMonitor = false;
5960
public String networkMonitorRule = "";
@@ -123,6 +124,7 @@ public String toString() {
123124
"\tinspectionStrategiesStr=" + inspectionStrategiesStr + "\n" +
124125
"\tnotifyUrl=" + notifyUrl + "\n" +
125126
"\tdisableRecording=" + disableRecording + "\n" +
127+
"\tdisableGifEncoder=" + disableGifEncoder + "\n" +
126128
"\tenableFailingTask=" + enableFailingTask + "\n" +
127129
"\tenableNetworkMonitor=" + enableNetworkMonitor + "\n" +
128130
"\tnetworkMonitorRule=" + networkMonitorRule + "\n" +

0 commit comments

Comments
 (0)