Skip to content

Commit

Permalink
Add SetActiveScanThreadsPerHost.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Jul 26, 2024
1 parent 091c645 commit 49034d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Lombiq.Tests.UI/SecurityScanning/YamlDocumentExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,18 @@ public static void SetActiveScanMaxDuration(
yamlDocument.SetActiveScanParameter("maxRuleDurationInMins", maxRuleDurationInMinutes.ToTechnicalString());
}

/// <summary>
/// Sets the maximum number of threads per host on the "activeScan" job. The default value is 2.
/// </summary>
public static void SetActiveScanThreadsPerHost(this YamlDocument yamlDocument, int maxThreadCount) =>
yamlDocument.SetActiveScanParameter("threadPerHost", maxThreadCount.ToTechnicalString());

/// <summary>
/// Sets the maximum number of threads to 1 on the "activeScan" job. Use this if you experience deadlocks.
/// </summary>
public static void MakeActiveScanSingleThreaded(this YamlDocument yamlDocument) =>
yamlDocument.SetActiveScanThreadsPerHost(maxThreadCount: 1);

/// <summary>
/// Gets a job from the "jobs" section of the ZAP Automation Framework plan by its name.
/// </summary>
Expand Down

0 comments on commit 49034d8

Please sign in to comment.